1dnl 2dnl $OpenBSD: m4.common,v 1.44 2003/08/11 22:21:15 miod Exp $ 3dnl 4dnl a simple MACHINE->MACHINE_ARCH converter. 5define(`MACHINE_ARCH', 6`ifelse( 7MACHINE,amiga,m68k, 8MACHINE,hp300,m68k, 9MACHINE,mac68k,m68k, 10MACHINE,macppc,powerpc, 11MACHINE,mvme68k,m68k, 12MACHINE,mvme88k,m88k, 13MACHINE,mvmeppc,powerpc, 14MACHINE,sun3,m68k, 15MACHINE)')dnl 16dnl simulate an include path with a macro 'includeit'. 17define(`includeit',`sinclude('INCLUDE/`$1)sinclude('INCLUDE/../`$1)')dnl 18dnl 19dnl 20dnl TopPart 21dnl Describes the beginning of the distribution files listing. 22dnl 23define(`TopPart', 24`The MACHINE-specific portion of the OpenBSD OSREV release is found in the 25"MACHINE" subdirectory of the distribution. That subdirectory is laid 26out as follows: 27 28.../OSREV/MACHINE/ 29 INSTALL.MACHINE Installation notes; this file. 30 31 CKSUM Output of the cksum(1) and md5(1) programs 32 MD5 usable for verification of the correctness 33 of downloaded files.')dnl 34dnl 35dnl Change the quote. There were too many `word' situations that would have 36dnl to have been changed to ``word''. The quote gets changed to {:- and -:}. 37dnl It can really be anything, but it needs to be unique. 38dnl 39changequote(`{:-',`-:}')dnl 40dnl 41dnl Conventions when editing: 42dnl o base`'OSrev is required because if it appears as baseOSrev the defined 43dnl value OSrev does not get substituted. Same goes for MACHINE, 44dnl MACHINE_ARCH and OSREV, assigned as cmd line parameters to m4 in the 45dnl Makefile. 46dnl o `include' and `define' is required as include and define are both m4 47dnl reserved words that evaluate to NULL if not quoted. 48dnl 49dnl 50dnl ========== Distribution files description 51dnl (usually used by arch/contents) 52dnl 53dnl showsize(gzipped size, uncompressed size) 54dnl 55dnl If both the 1st and the 2nd argument exist, show the sizes. 56dnl Otherwise, evaluate to NULL. 57dnl showsize() must not be on a new line. It creates its own new line if 58dnl there are sizes to display, otherwise, evaluates to NULL 59dnl 60dnl XXX fix to allow - empty 1st arg, for files uncompressed 61dnl - empty 2nd arg, for files where only compressed size is 62dnl known 63dnl 64define({:-showsize-:},{:-ifelse(X$1,X,,X$2,X,,X,X,{:- 65 [ $1 MB gzipped, $2 MB uncompressed ]-:})-:})dnl 66dnl 67dnl 68dnl 69dnl DistributionDescription( number of sets ) 70dnl Header paragraph before the individual sets descriptions. 71dnl 72define({:-DistributionDescription-:}, 73{:-The OpenBSD/MACHINE binary distribution sets contain the binaries which 74comprise the OpenBSD OSREV release for MACHINE systems. There are $1 75binary distribution sets. The binary distribution sets can be found in 76the "MACHINE" subdirectory of the OpenBSD OSREV distribution tree, 77and are as follows:-:})dnl 78dnl 79dnl 80dnl OpenBSDbase( compressed size, uncompressed size [, shared]) 81dnl Describes baseXX.tgz. Put ``shared'' as third argument if shared libraries 82dnl are available. 83dnl 84define({:-OpenBSDbase-:}, 85{:- base{:--:}OSrev The OpenBSD/MACHINE OSREV base binary distribution. You 86 MUST install this distribution set. It contains the 87 base OpenBSD utilities that are necessary for the 88 system to run and be minimally functional. 89 ifelse(X$3,Xshared,{:-It includes shared library support, and excludes 90 everything described below.-:},{:-It excludes everything described below.-:})showsize($1,$2)-:})dnl 91dnl 92dnl 93dnl OpenBSDcomp( compressed size, uncompressed size [, shared]) 94dnl Describes compXX.tgz. Put ``shared'' as third argument if shared libraries 95dnl are available. 96dnl 97define({:-OpenBSDcomp-:}, 98{:- comp{:--:}OSrev The OpenBSD/MACHINE Compiler tools. All of the tools 99 relating to C, C++, and fortran are supported. This set 100 includes the system {:-include-:} files (/usr/{:-include-:}), the 101 linker, the compiler tool chain, and the various system 102 libraries{:--:}ifelse(X$3,Xshared,{:- (except the shared libraries, which are 103 included as part of the base set).-:},.) 104 This set also includes the manual pages for all 105 of the utilities it contains, as well as the system 106 call and library manual pages.showsize($1,$2)-:})dnl 107dnl 108dnl 109dnl OpenBSDetc( compressed size, uncompressed size [, noupgrade]) 110dnl Describes etcXX.tgz. 111dnl 112define({:-OpenBSDetc-:}, 113{:- etc{:--:}OSrev This distribution set contains the system configuration 114 files that reside in /etc and in several other places. 115 This set MUST be installed{:--:}ifelse(X$3,X,{:- if you are installing the 116 system from scratch, but should NOT be used if you are 117 upgrading. (If you are upgrading, it's recommended that 118 you get a copy of this set and CAREFULLY upgrade your 119 configuration files by hand, see the section named "Upgrading 120 a previously-installed OpenBSD System" below.)-:},.)showsize($1,$2)-:})dnl 121dnl 122dnl 123dnl OpenBSDgame( compressed size, uncompressed size ) 124dnl Describes gameXX.tgz. 125dnl 126define({:-OpenBSDgame-:}, 127{:- game{:--:}OSrev This set includes the games and their manual pages.showsize($1,$2)-:})dnl 128dnl 129dnl 130dnl OpenBSDman( compressed size, uncompressed size ) 131dnl Describes manXX.tgz. 132dnl 133define({:-OpenBSDman-:}, 134{:- man{:--:}OSrev This set includes all of the manual pages for the 135 binaries and other software contained in the base set. 136 Note that it does not {:-include-:} any of the manual pages 137 that are included in the other sets.showsize($1,$2)-:})dnl 138dnl 139dnl 140dnl OpenBSDmisc( compressed size, uncompressed size ) 141dnl Describes miscXX.tgz. 142dnl 143define({:-OpenBSDmisc-:}, 144{:- misc{:--:}OSrev This set includes the system dictionaries (which are 145 rather large), and the typesettable document set.showsize($1,$2)-:})dnl 146dnl 147dnl 148dnl OpenBSDxbase( compressed size, uncompressed size ) 149dnl Describes xbaseXX.tgz. 150dnl 151define({:-OpenBSDxbase-:}, 152{:- xbase{:--:}OSrev This set includes the base X distribution. This includes 153 programs, headers, libraries, and configuration files.showsize($1,$2)-:})dnl 154dnl 155dnl 156dnl OpenBSDxshare( compressed size, uncompressed size ) 157dnl Describes xshareXX.tgz. 158dnl 159define({:-OpenBSDxshare-:}, 160{:- xshare{:--:}OSrev This set includes all text files equivalent between 161 all architectures.showsize($1,$2)-:})dnl 162dnl 163dnl 164dnl OpenBSDxfont( compressed size, uncompressed size ) 165dnl Describes xfontXX.tgz. 166dnl 167define({:-OpenBSDxfont-:}, 168{:- xfont{:--:}OSrev This set includes all of the X fonts.showsize($1,$2)-:})dnl 169dnl 170dnl 171dnl OpenBSDxserv(compressed size,uncompressed size,optional extra notes) 172dnl Describes xservXX.tgz. 173dnl 174define({:-OpenBSDxserv-:}, 175{:- xserv{:--:}OSrev This set includes all of the X servers.$3{:--:}showsize($1,$2)-:})dnl 176dnl 177dnl 178dnl Floppy and bootable cdrom stuff 179dnl 180define({:-OpenBSDfloppy-:}, 181{:- floppy{:--:}OSrev.fs The standard MACHINE boot and installation 182 floppy; see below.-:})dnl 183dnl 184define({:-OpenBSDcd-:}, 185{:- cd{:--:}OSrev.iso A miniroot filesystem image suitable to be used 186 as a bootable CD-ROM image; otherwise similar 187 to the bsd.rd image above.-:})dnl 188dnl 189dnl OpenBSDfloppydesc(number of floppies, Article, plural) 190dnl 191dnl Describe what the boot floppy/ies contain and how they may be used. 192dnl Use as: OpenBSDfloppydesc(single,The) or OpenBSDfloppydesc(three,Each,s) 193define({:-OpenBSDfloppydesc-:}, 194{:-Bootable installation/upgrade floppy image$3: 195 196 The $1 floppy image$3 can be copied to a floppy using rawrite.exe, 197 ntrw.exe or `dd', as described later in this document. 198 $2 floppy image is a bootable install floppy which can be used 199 both to install and to upgrade OpenBSD to the current version. 200 It is also useful for maintenance and disaster recovery.-:})dnl 201dnl 202dnl 203dnl A few extra straightforward macros describing more components. 204dnl 205define({:-OpenBSDdistsets-:}, 206{:- *.tgz MACHINE binary distribution sets; 207 see below.-:})dnl 208dnl 209define({:-OpenBSDbsd-:}, 210{:- bsd A stock GENERIC MACHINE kernel which 211 will be installed on your system 212 during the install.-:})dnl 213dnl 214define({:-OpenBSDrd-:}, 215{:- bsd.rd A compressed RAMDISK kernel; the embedded 216 filesystem contains the installation tools. 217 Used for simple installation from a pre- 218 existing system.-:})dnl 219dnl 220define({:-OpenBSDminiroot-:}, 221{:- miniroot{:--:}OSrev.fs A miniroot filesystem image to be used 222 if you for some reason can't or don't 223 want to use the ramdisk installation 224 method.-:})dnl 225dnl 226dnl 227dnl ========== Various Install Instructions 228dnl (usually used by arch/install) 229dnl 230dnl Short or longer installation introduction. The longer version warns 231dnl about disk geometry hell. 232define({:-OpenBSDInstallShortPrelude-:}, 233{:-Installing OpenBSD is a relatively complex process, but if you have 234this document in hand and are careful to read and remember the 235information which is presented to you by the install program, it 236shouldn't be too much trouble.-:})dnl 237dnl 238define({:-OpenBSDInstallPrelude-:}, 239{:-OpenBSDInstallShortPrelude 240 241Before you begin, you should know the geometry of your hard disk, i.e. 242the sector size (note that sector sizes other than 512 bytes are not 243currently supported), the number of sectors per track, the number of 244tracks per cylinder (also known as the number of heads), and the 245number of cylinders on the disk. The OpenBSD kernel will try to 246discover these parameters on its own, and if it can it will print them 247at boot time. If possible, you should use the parameters it prints. 248(You might not be able to because you're sharing your disk with 249another operating system, or because your disk is old enough that the 250kernel can't figure out its geometry.)-:})dnl 251dnl 252dnl OpenBSDInstallPart2 253dnl Describes the beginning of the installation process, once the 254dnl installation media is ready. 255define({:-OpenBSDInstallPart2-:}, 256{:-You should now be ready to install OpenBSD. 257 258The following is a walk-through of the steps you will take while 259getting OpenBSD installed on your hard disk. If any question has a 260default answer, it will be displayed in brackets ("[]") after the 261question. If you wish to stop the installation, you may hit Control-C 262at any time, but if you do, you'll have to begin the installation 263process again from scratch. Using Control-Z to suspend the process 264may be a better option, or at any prompt enter '!' to get a shell, 265from which 'exit' will return you back to that prompt (no refresh 266of the prompt though).-:})dnl 267dnl 268dnl OpenBSDBootMsgs 269dnl Describes the boot of the ramdisk. 270define({:-OpenBSDBootMsgs-:}, 271{:- Once the kernel has loaded, you will be presented with the 272 OpenBSD kernel boot messages. You will want to read them 273 to determine your disk's name and geometry. Its name will 274 be something like "sd0" or "wd0" and the geometry will be 275 printed on a line that begins with its name. As mentioned 276 above, you will need your disk's geometry when creating 277 OpenBSD partitions. You will also need to know the device 278 name to tell the install tools what disk to install on. If 279 you cannot read the messages as they scroll by, do not 280 worry -- you can get at this information later inside the 281 install program.-:})dnl 282dnl 283dnl OpenBSDInstallPart3(alternate common disk type description) 284dnl Describes the beginning of the bsd.rd operation 285dnl 286define({:-OpenBSDInstallPart3-:}, 287{:- After entering the terminal type you will be asked whether you 288 wish to do an "(I)nstall" or an "(U)pgrade". Enter 'I' for a 289 fresh install or 'U' to upgrade an existing installation. 290 291 You will be presented with a welcome message and asked if 292 you really wish to install (or upgrade). Assuming you 293 answered yes, the install program will then tell you which 294 disks of that type it can install on, and ask you which it 295 should use. The name of the disk is typically "sd0" for 296 SCSI drives$2. 297 Reply with the name of your disk.-:})dnl 298dnl 299dnl OpenBSDInstallPart4(mention about other OS partitions) 300dnl Describes the disklabel operation 301dnl 302define({:-OpenBSDInstallPart4-:}, 303{:- Next the disk label which defines the layout of the OpenBSD 304 file systems must be set up. The installation script will 305 invoke an interactive editor allowing you to do this. Note 306 that partition 'c' inside this disk label should ALWAYS 307 reflect the entire disk, including any non-OpenBSD portions. 308 If you are labeling a new disk, you will probably start 309 out with an 'a' partition that spans the disk. In this 310 case you should delete 'a' before adding new partitions. 311 The root file system should be in partition 'a', and swap 312 is usually in partition 'b'.$4 313 314 It is recommended that you create separate partitions for /usr, 315 /tmp and /var, and if you have room for it, one for /home. In 316 doing this, remember to skip 'c', leaving it as type "unused". 317 For help in the disk label editor, enter '?' or 'M' to view the 318 manual page (see the info on the ``-E'' flag).-:})dnl 319dnl 320dnl OpenBSDInstallPart5 321dnl More disklabel notes(disk) 322define({:-OpenBSDInstallPart5-:}, 323{:- The swap partition (usually 'b') should have a type of "swap", all 324 other native OpenBSD partitions should have a type of "4.2BSD". 325 Block and fragment sizes are usually 8192 and 1024 bytes, but can 326 also be 4096 and 512 or even 16384 and 2048 bytes. 327 328 The install program will now label your disk and ask which file 329 systems should be created on which partitions. It will auto- 330 matically select the 'a' partition to be the root file system. 331 Next it will ask for which disk and partition you want a file 332 system created on. This will be the same as the disk name (e.g. 333 "$1") with the letter identifying the partition (e.g. "d") 334 appended (e.g. "$1d"). Then it will ask where this partition is 335 to be mounted, e.g. /usr. This process will be repeated until 336 you enter "done". 337 338 At this point you will be asked to confirm that the file system 339 information you have entered is correct, and given an opportunity 340 to change the file system table. Next it will create the new file 341 systems as specified, OVERWRITING ANY EXISTING DATA. This is the 342 point of no return.-:})dnl 343dnl 344dnl OpenBSDInstallNet(other installation sources,hasfloppy) 345dnl Setting up the network 346define({:-OpenBSDInstallNet-:}, 347{:- After all your file systems have been created, the install program 348 will give you an opportunity to configure the network. The network 349 configuration you enter (if any) can then be used to do the install 350 from another system using HTTP or FTP, and will also be the 351 configuration used by the system after the installation is complete. 352 353 If you select to configure the network, the install program will 354 ask you for a name of your system and the DNS domain name to use. 355 Note that the host name should be without the domain part, and that 356 the domain name should NOT {:-include-:} the host name part. 357 358 Next the system will give you a list of network interfaces you can 359 configure. For each network interface you select to configure, it 360 will ask for the IP address to use, the symbolic host name to use, 361 the netmask to use and any interface-specific flags to set. The 362 interface-specific flags are usually used to determine which media 363 the network card is to use. Typically no media flags are required 364 as autodetection normally works, but you will be prompted with a 365 list of the acceptable media flags, and asked if you want to provide 366 any. In doubt, do not enter any media flags; or you can refer to 367 the manual page for your interface for the appropriate flags. 368 369 After all network interfaces has been configured the install pro- 370 gram will ask for a default route and IP address of the primary 371 name server to use. You will also be presented with an opportunity 372 to edit the host table. 373 374 At this point you will be allowed to edit the file system table 375 that will be used for the remainder of the installation and that 376 will be used by the finished system, following which the new file 377 systems will be mounted to complete the installation. 378 379 After these preparatory steps have been completed, you will be 380 able to extract the distribution sets onto your system. There 381 are several install methods supported; FTP, HTTP, tape, 382 $1or a local disk partition. 383 ifelse(X$2,X,,{:-Note that installation from floppies is not currently supported.-:})-:})dnl 384dnl 385dnl Notes for various installation methods. 386dnl 387define({:-OpenBSDFTPInstall-:}, 388{:- To install via FTP: 389 To begin an FTP install you will need the following 390 pieces of information. Don't be daunted by this list; 391 the defaults are sufficient for most people. 392 1) Proxy server URL if you are using a URL-based 393 ftp proxy (squid, CERN ftp, Apache 1.2 or higher). 394 You need to {:-define-:} a proxy if you are behind a 395 firewall that blocks outgoing ftp (assuming you 396 have a proxy available to use). 397 2) Do you need to use active mode ftp? By default, 398 ftp will attempt to use passive mode and fall 399 back to an active connection if the server does 400 not support passive mode. You only need to enable 401 this option if you are connecting to a buggy ftp 402 daemon that implements passive ftp incorrectly. 403 Note that you will not be asked about active 404 ftp if you are using a proxy. 405 3) The IP address (or hostname if you enabled 406 DNS earlier in the install) of an ftp server 407 carrying the OpenBSD OSREV distribution. 408 If you don't know, just hit return when 409 asked if you want to see a list of such hosts. 410 4) The ftp directory holding the distribution sets. 411 The default value of pub/OpenBSD/OSREV/MACHINE 412 is almost always correct. 413 5) The login and password for the ftp account. 414 You will only be asked for a password for 415 non-anonymous ftp. 416 417 For instructions on how to complete the installation via 418 ftp, see the section named "Common URL installations" below.-:})dnl 419dnl 420define({:-OpenBSDHTTPInstall-:}, 421{:- To install via HTTP: 422 To begin an HTTP install you will need the following 423 pieces of information: 424 1) Proxy server URL if you are using a URL-based 425 http proxy (squid, CERN ftp, Apache 1.2 or higher). 426 You need to {:-define-:} a proxy if you are behind a 427 firewall that blocks outgoing http connections 428 (assuming you have a proxy available to use). 429 2) The IP address (or hostname if you enabled 430 DNS earlier in the install) of an http server 431 carrying the OpenBSD OSREV distribution. 432 If you don't know, just hit return when 433 asked if you want to see a list of such hosts. 434 3) The directory holding the distribution sets. 435 There is no standard location for this; 436 You should use the directory specified 437 along with the server in the list of official 438 http mirror sites that you received in step 3. 439 440 For instructions on how to complete the installation via 441 http, see the section named "Common URL installations" below.-:})dnl 442dnl 443dnl For arches where you can create a boot tape, $1 can be set as the 444dnl file index of the first set, after the boot files. 445define({:-OpenBSDTAPEInstall-:}, 446{:- To install from tape: 447 In order to install from tape, the distribution sets to be 448 installed must have been written to tape previously, either 449 in tar format or gzip-compressed tar format. 450 451 You will also have to identify the tape device where the 452 distribution sets are to be extracted from. This will 453 typically be "nrst0" (no-rewind, raw interface). 454 455 Next you will have to provide the file number of the set 456 that is to be extracted. Note that the file number starts 457 at 1, which is the first file written to the tape{:--:}ifelse(X$1,X,,{:-, unless 458 you have created a bootable tape, in which case the file 459 number starts at $1-:}). 460 461 The install program will not automatically detect whether 462 an image has been compressed, so it will ask for that 463 information before starting the extraction.-:})dnl 464dnl 465define({:-OpenBSDCDROMInstall-:}, 466{:- To install from CD-ROM: 467 When installing from a CD-ROM, you will be asked which 468 device holds the distribution sets. This will typically 469 be "cd0". Next you will be asked which partition on the 470 CD-ROM the distribution is to be loaded from. This is 471 normally partition "a". 472 473 Next you will have to identify the file system type that 474 has been used to create the distribution on the CD-ROM, 475 this can be either FFS or ISO CD9660. The OpenBSD CD-ROM 476 distribution uses the CD9660 format. 477 478 You will also have to provide the relative path to the 479 directory on the CD-ROM which holds the distribution, for 480 the MACHINE this is "OSREV/MACHINE". 481 482 For instructions on how to complete the installation from 483 the CD-ROM distribution, see the section named "Common 484 file system installations" below.-:})dnl 485dnl 486define({:-OpenBSDNFSInstall-:}, 487{:- To install from a NFS mounted directory: 488 When installing from a NFS-mounted directory, you must 489 have completed network configuration above, and also 490 set up the exported file system on the NFS server in 491 advance. 492 493 First you must identify the IP address of the NFS server 494 to load the distribution from, and the file system the 495 server expects you to mount. 496 497 The install program will also ask whether or not TCP 498 should be used for transport (the default is UDP). Note 499 that TCP only works with newer NFS servers. 500 501 You will also have to provide the relative path to the 502 directory on the file system where the distribution sets 503 are located. Note that this path should not be prefixed 504 with a '/'. 505 506 For instructions on how to complete the installation from 507 the CD-ROM distribution, see the section named "Common 508 file system installations" below.-:})dnl 509dnl 510dnl OpenBSDDISKInstall({:-<additional disk> or-:}, <-- $1 511dnl {:-only -:}, <-- $2 512dnl {:- or <other fs name>-:}) <-- $3 513dnl 514dnl Note the spacing used above. It is crucial to keep words from running 515dnl together in the actual document. 516dnl 517dnl Arg 1 is optional. 518dnl Choices for args 2 & 3: 519dnl - OpenBSDDISKInstall(,{:-only -:}) 520dnl (only have 1 fs possible, ffs) 521dnl - OpenBSDDISKInstall(,,{:-or <insert some other filesystem name>-:}) 522dnl (have another fs possible for reading during disk install) 523dnl 524dnl see $1, $2, and $3 below for further usage information. 525dnl 526define({:-OpenBSDDISKInstall-:}, 527{:- To install from a local disk partition: 528 When installing from a local disk partition, you will 529 first have to identify which disk holds the distribution 530 sets. This is normally $1"sdN" where N is a number 531 0 through 9. Next you will have to identify the partition 532 within that disk that holds the distribution, this is a 533 single letter between 'a' and 'p'. 534 535 You will also have to identify the type of file system 536 residing in the partition identified. Currently, you can 537 $2{:--:}install from partitions that has been formatted as the 538 Berkeley fast file system (ffs)$3. 539 540 You will also have to provide the relative path to the 541 directory on the file system where the distribution sets 542 are located. Note that this path should not be prefixed 543 with a '/'. 544 545 For instructions on how to complete the installation from 546 the a local disk partition, see the next section.-:})dnl 547dnl 548dnl For arches where you can install from NFS, $1 should be set to "NFS", 549dnl otherwise there should be no parameter. 550define({:-OpenBSDCommonFS-:}, 551{:- Common file system installations: 552 The following instructions are common to installations 553 from mounted disk partitions{:--:}ifelse(X$1,XNFS,{:-, NFS mounted directories and 554 CD-ROMs-:},{:- and CD-ROMs-:}). 555 556 A list of available distribution sets will be listed. 557 You may individually select distribution sets to install 558 or enter `all' to install all of the sets (which is what 559 most users will want to do). You may also enter `list' 560 to get a file list or `done' when you are done selecting 561 distribution sets. You may also use wildcards in place of 562 a file name, e.g. `*.tgz' or even `base*|comp*'. It is 563 also possible to enter an arbitrary filename and have it 564 treated as a file set. 565 566 Once you have selected the file sets you want to install 567 and entered `done' you will be prompted to verify that 568 you really do want to extract file sets. Assuming you 569 acquiesce, the files will begin to extract. If not, you 570 will be given the option of installing sets via one of 571 the other install methods.-:})dnl 572dnl 573define({:-OpenBSDCommonURL-:}, 574{:- Common URL installations: 575 Once you have entered the required information, the 576 install program will fetch a file list and present 577 a list of all the distribution sets that were found 578 in the specified directory. (If no valid sets were found, 579 you will be notified and given the option of unpacking 580 any gzipped tar files found or getting a file list if 581 none were found.) 582 583 At this point you may individually select distribution 584 sets to install or enter `all' to install all of the 585 sets (which is what most users will want to do). You 586 may also enter `list' to get a file list or `done' when 587 you are done selecting distribution sets. You may also 588 use wildcards in place of a file name, e.g. `*.tgz' or 589 even `base*|comp*'. It is also possible to enter an 590 arbitrary filename and have it treated as a file set. 591 592 Once you have selected the file sets you want to install 593 and entered `done' you will be prompted to verify that 594 you really do want to download and install the files. 595 Assuming you acquiesce, the files will begin to download 596 and unpack. If not, you will be given the option of 597 installing sets via one of the other install methods. 598 599 600 When all the selected distribution sets has been extracted, you 601 will be allowed to select which time zone your system will be 602 using, all the device nodes needed by the installed system will 603 be created for you and the file systems will be unmounted. For 604 this to work properly, it is expected that you have installed 605 at least the "base{:--:}OSrev", "etc{:--:}OSrev", and "bsd" distribution sets.-:})dnl 606dnl 607define({:-OpenBSDCongratulations-:}, 608{:-Congratulations, you have successfully installed OpenBSD OSREV. When you 609reboot into OpenBSD, you should log in as "root" at the login prompt. 610You should create yourself an account and protect it and the "root" account 611with good passwords. You should have got a mail from the install program we 612recommend you to read, it contains answers to basic questions you might 613have about OpenBSD (like setting up your system, installing packages, getting 614more information about OpenBSD, sending in your dmesg output and more). 615This you can do by running 616 617 mail 618 619and then just enter "more 1" to get the first message. You quit mail by 620entering "q". 621 622Some of the files in the OpenBSD OSREV distribution might need to be 623tailored for your site. We recommend you run: 624 625 man afterboot 626 627which will tell you about a bunch of the files needing to be reviewed. 628If you are unfamiliar with UN*X-like system administration, it's 629recommended that you buy a book that discusses it.-:})dnl 630dnl 631dnl 632dnl ========== Upgrade instructions 633dnl (usually used by arch/upgrade) 634dnl 635dnl OpenBSDUpgrade({:-<list of available boot methods>-:})dnl 636dnl Parameter is optional. 637define({:-OpenBSDUpgrade-:}, 638{:-Warning! Upgrades to OpenBSD OSREV are currently only supported from the 639immediately previous release. The upgrade process will also work with older 640releases, but might not execute some migration tasks that would be necessary 641for a proper upgrade. The best solution, whenever possible, is to backup 642your data and reinstall from scratch. 643 644To upgrade OpenBSD OSREV from a previous version, start with the general 645instructions in the section "Installing OpenBSD". 646 647Boot from $1. 648When prompted, select the (U)pgrade option rather than the (I)nstall 649option at the prompt in the install process. 650 651The upgrade script will ask you for the existing root partition, and 652will use the existing filesystems defined in /etc/fstab to install the 653new system in. It will also use your existing network parameters. 654 655From then, the upgrade procedure is very close to the installation 656procedure described earlier in this document. Note that the upgrade 657procedure will not let you pick the ``etc{:--:}OSrev.tgz'' set, so as to 658preserve your files in `/etc' which you are likely to have customized 659since a previous installation. 660 661However, it is strongly advised that you unpack the etc{:--:}OSrev.tgz set in 662a temporary directory and merge changes by hand, since all components of 663your system may not function correctly until your files in `/etc' are 664updated.-:})dnl 665dnl 666dnl 667dnl ========== Installation media preparation 668dnl (usually used by arch/xfer) 669dnl 670dnl Generic preparation introduction, after the list of various sources. 671dnl Use the short version unless there are too many methods, in this case 672dnl the long versions adds a ``don't panic!'' notice. 673define({:-OpenBSDXferShortPrelude-:}, 674{:-The steps necessary to prepare the distribution sets for installation 675depend on which method of installation you choose. Some methods 676require a bit of setup first that is explained below. 677 678The installation allows installing OpenBSD directly from FTP mirror 679sites over the internet, however you must consider the speed and 680reliability of your internet connection for this option. It may save 681much time and frustration to use ftp get/reget to transfer the 682distribution sets to a local server or disk and perform the installation 683from there, rather than directly from the internet.-:})dnl 684define({:-OpenBSDXferPrelude-:}, 685{:-OpenBSDXferShortPrelude 686 687The variety of options listed may seem confusing, but situations vary 688widely in terms of what peripherals and what sort of network arrangements 689a user has, the intent is to provide some way that will be practical.-:})dnl 690dnl 691dnl Various floppy generation instructions. 692dnl 693define({:-OpenBSDXferFloppyFromDOS-:}, 694{:-Creating a bootable floppy disk using DOS/Windows: 695 696 First you need to get access to the OpenBSD bootable floppy 697 images. If you can access the distribution from the CD-ROM under 698 DOS, you will find the bootable disks in the OSREV/MACHINE 699 directory. Otherwise, you will have to download them from one of 700 the OpenBSD ftp or http mirror sites, using an ftp client or a web 701 browser. In either case, take care to do "binary" transfers, since 702 these are images files and any DOS cr/lf translations or control/z 703 EOF interpretations will result in corrupted transfers. 704 705 You will also need to go to the "tools" directory and grab a 706 copy of the rawrite.exe utility and its documentation. This 707 program is needed to correctly copy the bootable filesystem 708 image to the floppy, since it's an image of a unix partition 709 containing a ffs filesystem, not a MSDOS format diskette. 710 711 Once you have installed rawrite.exe, just run it and specify the 712 name of the bootable image, such as "floppy{:--:}OSrev.fs" and the name of 713 the floppy drive, such as "a:". Be sure to use good quality HD 714 (1.44MB) floppies, formatted on the system you're using. The 715 image copy and boot process is not especially tolerant of read 716 errors. 717 718 Note that if you are using NT, 2000, or XP to write the 719 images to disk, you will need to use ntrw.exe instead. It 720 is also available in the "tools" directory. Grab it and 721 run in with the correct arguments like this "ntrw <image> 722 <drive>:" 723 724 Note that, when installing, the boot floppy can be write-protected 725 (i.e read-only).-:})dnl 726dnl 727define({:-OpenBSDXferFloppyFromUNIX-:}, 728{:-Creating a bootable floppy disk using SunOS, Solaris or other Un*x-like system: 729 730 First, you will need obtain a local copy of the bootable filesystem 731 image as described above. If possible use the cksum(1) or md5(1) 732 commands to verify the checksums of the images vs. the values in 733 the CKSUM or MD5 files on the mirror site. 734 735 Next, use the dd(1) utility to copy the file to the floppy drive. 736 The command would likely be, under SunOS: 737 dd if=floppy{:--:}OSrev.fs of=/dev/rfd0c bs=36b 738 and, under Solaris: 739 dd if=floppy{:--:}OSrev.fs of=/dev/rdiskette0 bs=36b 740 unless the volume management daemon, vold(1M), is running, in 741 which case the following command is preferable: 742 dd if=floppy{:--:}OSrev.fs of=/vol/dev/rdiskette0 bs=36b 743 744 If you are using another operating system, you may have to adapt 745 this to conform to local naming conventions for the floppy and 746 options suitable for copying to a "raw" floppy image. The key 747 issue is that the device name used for the floppy *must* be one 748 that refers to the correct block device, not a partition or 749 compatibility mode, and the copy command needs to be compatible 750 with the requirement that writes to a raw device must be in 751 multiples of 512-byte blocks. The variations are endless and 752 beyond the scope of this document. 753 754 If you're doing this on the system you intend to boot the floppy on, 755 copying the floppy back to a file and doing a compare or checksum 756 is a good way to verify that the floppy is readable and free of 757 read/write errors. 758 759 Note that, when installing, the boot floppy can be write-protected 760 (i.e. read-only).-:})dnl 761dnl 762dnl Tape preparation instructions. 763dnl 764dnl OpenBSDXferBareTape describes how to set up a non-bootable distribution 765dnl tape, and takes as an optional argument, the list of X11 sets which 766dnl may be put on the tape. 767define({:-OpenBSDXferBareTape-:}, 768{:-Creating an installation tape: 769 770 While you won't be able to boot OpenBSD from a tape, you can use 771 one to provide the installation sets. To do so, you need to make 772 a tape that contains the distribution set files, each in "tar" 773 format or in "gzipped tar format". First you will need to 774 transfer the distribution sets to your local system, using ftp or 775 by mounting the CD-ROM containing the release. Then you need to 776 make a tape containing the files. 777 778 If you're making the tape on a UN*X-like system, the easiest way 779 to do so is make a shell script along the following lines, call it 780 "/tmp/maketape". 781 782 #! /bin/sh 783 TAPE=${TAPE:-/dev/nrst0} 784 mt -f ${TAPE} rewind 785 for file in base etc comp game man misc $1 786 do 787 dd if=${file}OSrev.tgz of=${TAPE} obs=8k conv=sync 788 done 789 tar cf ${TAPE} bsd 790 mt -f ${TAPE} offline 791 # end of script 792 793 And then: 794 795 cd .../OSREV/MACHINE 796 sh -x /tmp/maketape 797 798 If you're using a system other than OpenBSD or SunOS, the tape 799 name and other requirements may change. You can override the 800 default device name (/dev/nrst0) with the TAPE environment 801 variable. For example, under Solaris, you would probably run: 802 803 TAPE=/dev/rmt/0n sh -x /tmp/maketape 804 805 Note that, when installing, the tape can be write-protected 806 (i.e. read-only).-:})dnl 807dnl OpenBSDXferBootTape describes how to set up a non-bootable distribution 808dnl tape, and takes as first argument, the list of X11 sets which may be put 809dnl on the tape. Then at least one, and up to three arguments list the first 810dnl files to be put on the tape to make it bootable. Each filename can be 811dnl followed by dd(1) arguments (such as conv=sync). 812define({:-OpenBSDXferBootTape-:}, 813{:-Creating an (optionally bootable) installation tape: 814 815 To install OpenBSD from a tape, you need to make a tape that 816 contains the distribution set files, each in "tar" format or in 817 "gzipped tar format". First you will need to transfer the 818 distribution sets to your local system, using ftp or by 819 mounting the CD-ROM containing the release. Then you need to 820 make a tape containing the files. 821 822 If you're making the tape on a UN*X-like system, the easiest way 823 to do so is make a shell script along the following lines, call it 824 "/tmp/maketape". 825 826 #! /bin/sh 827 TAPE=${TAPE:-/dev/nrst0} 828 mt -f ${TAPE} rewind 829 if test {:-$-:}# -lt 1 830 then 831 dd of=${TAPE} if=$2 832ifelse(X$3,X,,{:- dd of=${TAPE} if=$3 833-:})dnl 834ifelse(X$4,X,,{:- dd of=${TAPE} if=$4 835-:})dnl 836 fi 837 for file in base etc comp game man misc $1 838 do 839 dd if=${file}OSrev.tgz of=${TAPE} obs=8k conv=sync 840 done 841 tar cf ${TAPE} bsd 842 mt -f ${TAPE} offline 843 # end of script 844 845 And then: 846 847 cd .../OSREV/MACHINE 848 sh -x /tmp/maketape 849 850 Note that, by default, this script creates a bootable tape. If 851 you only want to fetch the OpenBSD files from tape, but want to 852 boot from another device, you can save time and space creating 853 the tape this way: 854 855 cd .../OSREV/MACHINE 856 sh -x /tmp/maketape noboot 857 858 If you're using a system other than OpenBSD or SunOS, the tape 859 name and other requirements may change. You can override the 860 default device name (/dev/nrst0) with the TAPE environment 861 variable. For example, under Solaris, you would probably run: 862 863 TAPE=/dev/rmt/0n sh -x /tmp/maketape 864 865 Note that, when installing, the tape can be write-protected 866 (i.e. read-only).-:})dnl 867dnl OpenBSDXferNFS [(noupgrade)] 868define({:-OpenBSDXferNFS-:}, 869{:-To install OpenBSD using a remote partition, mounted via 870NFS, you must do the following: 871 872 NOTE: This method of installation is recommended only for 873 those already familiar with using BSD network 874 configuration and management commands. If you aren't, 875 this documentation should help, but is not intended to 876 be all-encompassing. 877 878 Place the OpenBSD distribution sets you wish to install 879 into a directory on an NFS server, and make that directory 880 mountable by the machine on which you are installing or 881 upgrading OpenBSD. This will probably require modifying 882 the /etc/exports file of the NFS server and resetting 883 its mount daemon (mountd). (Both of these actions will 884 probably require superuser privileges on the server.) 885 886 You need to know the numeric IP address of the NFS 887 server, and, if the server is not on a network directly 888 connected to the machine on which you're installing or 889 upgrading OpenBSD, you need to know the numeric IP address 890 of the router closest to the OpenBSD machine. Finally, 891 you need to know the numeric IP address of the OpenBSD 892 machine itself. 893 894 Once the NFS server is set up properly and you have the 895 information mentioned above, you can proceed to the next 896 step in the installation ifelse(X$1,X,{:-or upgrade -:})process.ifelse(X$1,X,,{:- If you're 897 installing OpenBSD from scratch, go to the section on 898 preparing your hard disk, below. If you're upgrading an 899 existing installation, go directly to the section on 900 upgrading.-:})-:})dnl 901dnl 902define({:-OpenBSDXferFFS-:}, 903{:-If you are upgrading OpenBSD, you also have the option of installing 904OpenBSD by putting the new distribution sets somewhere in your 905existing file system, and using them from there. To do that, do 906the following: 907 908 Place the distribution sets you wish to upgrade somewhere 909 in your current file system tree. At a bare minimum, you 910 must upgrade the "base" binary distribution, and so must 911 put the "base{:--:}OSrev" set somewhere in your file system. It 912 is recommended that you upgrade the other sets, as well.-:})dnl 913dnl 914