install revision 1.5
1 $NetBSD: install,v 1.5 1998/10/21 14:32:36 minoura Exp $ 2 3Installing NetBSD is a relatively complex process, but if you have 4this document in hand and are careful to read and remember the 5information which is presented to you by the install program, it 6shouldn't be too much trouble. 7 8Before you begin, you should know the geometry of your hard disk, i.e. 9the sector size (note that sector sizes other than 512 bytes are not 10currently supported), the number of sectors per track, the number of 11tracks per cylinder (also known as the number of heads), and the 12number of cylinders on the disk. The NetBSD kernel will try to 13discover these parameters on its own, and if it can it will print them 14at boot time. If possible, you should use the parameters it prints. 15(You might not be able to because you're sharing your disk with 16another operating system, or because your disk is old enough that the 17kernel can't figure out its geometry.) 18 19You should now be ready to install NetBSD. It might be handy for you 20to have a pencil, some paper, and a calculator handy. 21 22The following is a walk-through of the steps you will take while 23getting NetBSD installed on your hard disk. If any question has a 24default answer, it will be displayed in brackets ("[]") after the 25question. If you wish to stop the installation, you may hit Control-C 26at any time, but if you do, you'll have to begin the installation 27process again from scratch. 28 29 Boot your machine using of boot floppy. If the boot prompt 30 does not appear in a reasonable amount of time, you either 31 have a bad boot floppy or a hardware problem. Try writing the 32 boot floppy image to a different disk, and using that. If it 33 still doesn't work, NetBSD probably can't be run on your 34 hardware. This can probably be considered a bug, so you might 35 want to report it. If you do, please include as many details 36 about your system configuration as you can. 37 38 It will take a while to load the kernel from the floppy, 39 probably around a minute or so. 40 41 You will then be presented with the NetBSD kernel boot 42 messages. You will want to read them, to determine your 43 disk's name and geometry. Its name will be something like 44 "sd0" and the geometry will be printed on a line that 45 begins with its name. As mentioned above, you will need your 46 disk's geometry when creating NetBSD's partitions. You will 47 also need to know the name, to tell the install tools what 48 disk to install on. 49 50 While booting, you will probably see several warnings. You 51 should be warned that no swap space is present, and that 52 init(8) cannot find /etc/rc. Do not be alarmed, these are 53 completely normal. When you reach the prompt asking you for a 54 shell name, just hit return. 55 56 You will be presented with a welcome message and a prompt, 57 asking if you wish to proceed with the installation process. 58 If you wish to proceed, enter "y" and hit return. 59 60 You will be asked what type of disk driver you have. The 61 valid options are listed by the install program, to make sure 62 you get it right. If you are SURE that it does, reply 63 affirmatively. Otherwise, the install program will 64 automatically reserve space for bad144 tables. 65 66 The install program will then tell you which disks of that 67 type it can install on, and ask you which it should use. 68 Reply with the name of your disk. 69 70 You will then be asked to name your disk's disklabel. The 71 default response is "mysd", and for most purposes it will be 72 OK. If you choose to name it something different, make sure 73 the name is a single word and contains no special characters. 74 You don't need to remember this name. 75 76 You will be prompted for your disk's geometry information, 77 i.e. the number of bytes per sector, cylinders on the disk, 78 tracks per cylinder (heads), and sectors per track. Enter 79 them when they are requested. If you make a mistake, hit 80 Control-C and when you get to the shell prompt, restart the 81 install process by running the "install" command. Once you 82 have entered this data, the install program will tell you the 83 total size of your disk, in both sectors, and cylinders. 84 Remember this number; if you're installing on the whole disk, 85 you'll need it again soon. 86 87 When describing your partitions, you will have the option of 88 entering data about them in units of disk sectors or 89 cylinders. If you choose to enter the information in units of 90 sectors, remember that, for optimal performance, partitions 91 should begin and end on cylinder boundaries. You will be 92 asked about which units you wish to use, and you should reply 93 with "c" for cylinders, or "s" for sectors. 94 95 You will be asked to enter the size of your NetBSD root 96 partition. It should be at least 15M, but if you are going to 97 be doing development, 20M is a more desirable size. This 98 size should be expressed in units of sectors or cylinders, 99 depending on which you said you wanted to use. 100 101 Next, you will be asked for the size of your swap partition. 102 You should probably allocate twice as much swap space as you 103 have real memory. Systems that will be heavily used should 104 have more swap space allocated, and systems that will be 105 lightly used can get by with less. If you want the system to 106 be able to save crash dumps when it panics, you will need at 107 least as much swap space as you have RAM. Again, this number 108 should be expressed in units of sectors or cylinders, as 109 appropriate. 110 111 The install program will then ask you for information about 112 the rest of the partitions you want on your disk. For most 113 purposes, you will want only one more partition, "/usr". 114 (Machines used as servers will probably also want /var as a 115 separate partition. That can be done with these installation 116 tools, but is not covered here.) The install program will 117 tell you how much space there is left to be allocated in the 118 NetBSD area of the disk, and, if you only want one more 119 partition ("/usr"), you should enter it at the prompt when the 120 installer asks you how large the next partition should be. 121 It will then ask you for the name of the mount point for that 122 partition. If you're doing a basic installation, that is 123 "/usr". 124 125 YOU ARE NOW AT THE POINT OF NO RETURN. Nothing has been 126 written to your disk yet, but if you confirm that you want to 127 install NetBSD, your hard drive will be modified, and its 128 contents may be scrambled at the whim of the install program. 129 This is especially likely if you have given the install 130 program incorrect information. If you are sure you want to 131 proceed, enter "yes" at the prompt. 132 133 The install program will now label your disk and make the file 134 systems you specified. The filesystems will be initialized to 135 contain NetBSD bootstrapping binaries and configuration files. 136 It will also create an /etc/fstab for your system, and mount 137 all of the file systems under /mnt. (In other words, your root 138 partition will be mounted on /mnt, your /usr partition on 139 /mnt/usr, and so on.) There should be no errors in this 140 section of the installation. If there are, restart from the 141 beginning of the installation process. 142 143 You will be placed at a shell prompt ("#"). The remaining 144 tasks are to copy the kernel from the kernel copy floppy to 145 the hard drive's root filesystem and install the distribution 146 sets. The flow of installation differs depending on your 147 hardware resources, and on what media the distribution sets 148 reside. 149 150 To install from removable hard disk: 151 The first thing you should do is pick a temporary 152 directory where the distribution files can be stored. 153 To do this, enter the command "Set_tmp_dir", and enter 154 the name of the temporary directory. (Don't forget 155 that your disk is mounted under /mnt; you should 156 probably pick a directory under /mnt/usr.) The 157 default is /mnt/usr/distrib. 158 159 Insert the media onto the drive. Check the device 160 name of your drive from the boot message. The device 161 name is something like "sd2" depending on the SCSI 162 disk drives connected to your machine. Note that the 163 boot message can be displayed with the command 164 "more /kern/msgbuf". 165 166 Mount the disk on the temporary directory with a 167 command like: 168 169 mount -t msdos /dev/sd2c <tmp_dir> 170 171 if your removable drive's name is sd2. 172 173 To install from floppy: 174 The first thing you should do is pick a temporary 175 directory where the distribution files can be stored. 176 To do this, enter the command "Set_tmp_dir", and enter 177 the name of the temporary directory. (Don't forget 178 that if your disk is still mounted under /mnt; you 179 should probably pick a directory under /mnt/usr.) 180 181 After you have picked a temporary directory, enter the 182 "Load_fd" command, to load the distribution sets from 183 your floppies. 184 185 You will be asked which floppy drive to use. Enter 186 "0" (zero) if you're using the first floppy drive 187 (i.e. what DOS would call "A:"), or enter "1" if 188 you're using the second. 189 190 You will be prompted to insert a floppy into the drive, 191 to have its contents copied to your hard disk. Do so, 192 and hit return to begin copying. When that is done, 193 read the remainder of the floppies that contain the 194 distribution sets that you want to install, one by 195 one. When the last is read, and you are being 196 prompted for another, hit Control-C. 197 198 Run the "Extract" command once for each distribution 199 set you wish to install. For instance, if you wish to 200 install the "base" distribution set, followed by the 201 "man" distribution set, and finally the "etc" 202 distribution set, use the commands: 203 Extract base 204 Extract man 205 Extract etc 206 207 For each extraction, it will ask you if the extraction 208 should be verbose. If you reply affirmatively, it 209 will print out the name of each file that's being 210 extracted. 211 212 (Note: if you know that you will be running low on 213 disk space when installing NetBSD, you can load and 214 extract one distribution set at a time. To do this, 215 load only the floppies which contain the files for the 216 first distribution set, extract them, and then change 217 to the temporary directory and remove them with the 218 command "rm set_name.??".) 219 220 Once you are finished extracting all of the sets that 221 you wish to install, you should proceed to the 222 instructions below (after the last install medium 223 type-specific instructions), that explain how you 224 should configure your system. 225 226 To install from tape: 227 The first thing you should do is pick a temporary 228 directory where the distribution files can be stored. 229 To do this, enter the command "Set_tmp_dir", and enter 230 the name of the temporary directory. (Don't forget 231 that your disk is mounted under /mnt; you should 232 probably pick a directory under /mnt/usr.) The 233 default is /mnt/usr/distrib. 234 235 After you have picked a temporary directory, enter the 236 "Load_tape" command, to load the distribution sets from 237 tape. 238 239 You will be asked which tape drive to use. The 240 default is "rst0", which is correct if you're using 241 the SCSI tape drive with the lowest SCSI ID number. 242 (For the SCSI tape drive with the next lowest SCSI ID 243 number, you should use "rst1", and so on.) 244 245 You will be prompted to hit return when you have 246 inserted the tape into the tape drive. When you do, 247 the contents of the tape will be extracted into the 248 temporary directory, and the names of the files being 249 extracted will be printed. 250 251 After the tape has been extracted, to go the directory 252 containing the first distribution set you wish to 253 install. (Depending on how you made the tape, it's 254 probably a subdirectory of the temporary directory you 255 specified above.) Once there, run the "Set_tmp_dir" 256 command again, and accept its default answer by 257 hitting return at the prompt. 258 259 Use the "Extract" command to extract the distribution 260 set. For instance, if you're extracting the "base" 261 set, use the command: 262 Extract base 263 You will be asked if you wish the extraction to be 264 verbose. If you reply affirmatively, the name of each 265 file being extracted will be printed. 266 267 Repeat the previous two steps for each distribution 268 set you wish to install. Change to the set's 269 directory, run "Set_tmp_dir", and then run 270 "Extract <set_name>" to extract the set. 271 272 Once you are finished extracting all of the sets that 273 you wish to install, you should proceed to the 274 instructions below (after the last install medium 275 type-specific instructions), that explain how you 276 should configure your system. 277 278 To install via FTP or NFS: 279 The first thing you should do is pick a temporary 280 directory where the distribution files can be stored. 281 To do this, enter the command "Set_tmp_dir", and enter 282 the name of the temporary directory. (Don't forget 283 that your disk is mounted under /mnt; you should 284 probably pick a directory under /mnt/usr.) The 285 default is /mnt/usr/distrib. 286 287 Configure the SLIP interface, with the following 288 command sequence: 289 290 slattach -h -s <speed> tty00 291 ifconfig sl0 <my_ipaddr> <peer_ipaddr> 292 293 where "<speed>" is the network speed, and "<my_ipaddr>" 294 is the numeric IP address of the machine you are going 295 to install NetBSD/x68k, while "<peer_ipaddr>" is the 296 address of the peer machine connected with your machine. 297 You might have to configure the peer SLIP interface 298 with similar sequence (depending on the peer system). 299 300 For instance, the sequence 301 302 slattach -h -s 38400 tty00 303 ifconfig sl0 192.168.0.1 192.168.0.10 304 305 configures the SLIP interface for the network between 306 your machine (with IP address 192.168.0.1) and the peer 307 (192.168.0.10) with speed 38400 bps. Note that IP 308 addresses 192.168.*.* are the private IP addresses 309 described in RFC 1597. 310 311 If you are NFS-mounting the distribution sets, mount 312 them on the temporary directory with a command like: 313 314 mount -t nfs <serv_ipaddr>:<dist_dir> <tmp_dir> 315 316 where <serv_ipaddr> is the server's numeric IP address, 317 <dist_dir> is the path to the distribution files on 318 the server, and <tmp_dir> is the name of the local 319 temporary directory. 320 321 Once this is done, proceed as if you had loaded the 322 files from tape, changing to the appropriate 323 directories, running "Set_tmp_dir", and running 324 "Extract" as appropriate. 325 326 If you are retrieving the distribution sets using ftp, 327 change into the temporary directory, and execute the 328 command: 329 330 ftp <serv_ipaddr> 331 332 where <serv_ipaddr> is once again the server's numeric 333 IP address. Get the files with FTP, taking care to 334 use binary mode when transferring the files. 335 336 Once you have all of the files for the distribution 337 sets that you wish to install, you can proceed using 338 the instructions above, as if you had installed from a 339 floppy. (Note that as with the floppy install, if 340 you're short on disk space, you can transfer only one 341 set at a time, extract it, then delete it, to save 342 space.) 343 344 Once you have finished extracting all of the distribution sets 345 that you wish to install, and are back at the "#" prompt, you 346 are ready to configure your system. The configuration utility 347 expects that you have installed the "base" and "etc" 348 distribution sets. If you have not, you will not be able to 349 run it successfully (nor will you have a functional system, in 350 any case). To configure your newly-installed NetBSD system, 351 run the command "Configure". It will ask you for the system's 352 host name, domain name, and other network configuration 353 information. It will set up your configuration files and make 354 the device nodes for the newly-installed system. 355 356Kernel Installation: 357 The kernel must be installed by hand. Type 358 # cd /mnt 359 # gzip -dc $tmp_dir/netbsd-ALL.gz > netbsd 360 where $tmp_dir will be extracted to the distribution sets 361 directory. 362 363 364Congratulations, you have successfully installed NetBSD _VER. When you 365reboot into NetBSD, you should log in as "root" at the login prompt. 366There is no initial password, but if you're using the machine in a 367networked environment, you should create yourself an account and 368protect it and the "root" account with good passwords. 369 370Some of the files in the NetBSD _VER distribution might need to be 371tailored for your site. In particular, the /etc/sendmail.cf file will 372almost definitely need to be adjusted, and other files in /etc 373including /etc/rc.conf will probably need to be modified, as well. If 374you are unfamiliar with UN*X-like system administration, it's 375recommended that you buy a book that discusses it. 376