Home | History | Annotate | Line # | Download | only in i386
install revision 1.3
      1 Installing NetBSD is a relatively complex process, but if you have
      2 this document in hand and are careful to read and remember the
      3 information which is presented to you by the install program, it
      4 shouldn't be too much trouble.
      5 
      6 Before you begin, you should know the geometry of your hard disk, i.e.
      7 the sector size (note that sector sizes other than 512 bytes are not
      8 currently supported), the number of sectors per track, the number of
      9 tracks per cylinder (also known as the number of heads), and the
     10 number of cylinders on the disk.  The NetBSD kernel will try to
     11 discover these parameters on its own, and if it can it will print them
     12 at boot time.  If possible, you should use the parameters it prints.
     13 (You might not be able to because you're sharing your disk with
     14 another operating system, or because your disk is old enough that the
     15 kernel can't figure out its geometry.)
     16 
     17 If NetBSD will be sharing the disk with DOS or another operating
     18 system, you should have already completed the section of these notes
     19 that instructed you on how to prepare your hard disk.  You should know
     20 the size of the NetBSD area of the disk and its offset from the
     21 beginning of the disk.  You will need this information when setting up
     22 your NetBSD partitions.
     23 
     24 You should now be ready to install NetBSD.  It might be handy for you
     25 to have a pencil, some paper, and a calculator handy.
     26 
     27 The following is a walk-through of the steps you will take while
     28 getting NetBSD installed on your hard disk.  If any question has a
     29 default answer, it will be displayed in brackets ("[]") after the
     30 question.  If you wish to stop the installation, you may hit Control-C
     31 at any time, but if you do, you'll have to begin the installation
     32 process again from scratch.
     33 
     34 	Boot your machine using of the appropriate kernel-copy floppy.
     35 	When presented with the boot prompt (the prompt begins with
     36 	"Boot" and ends with ":-"), hit return.  If the boot prompt
     37 	does not appear in a reasonable amount of time, you either
     38 	have a bad boot floppy or a hardware problem.  Try writing the
     39 	kernel-copy floppy image to a different disk, and using that.
     40 	If that doesn't work, try booting after disabling your CPU's
     41 	internal and external caches (if any).  If it still doesn't
     42 	work, NetBSD probably can't be run on your hardware.  This can
     43 	probably be considered a bug, so you might want to report it.
     44 	If you do, please include as many details about your system
     45 	configuration as you can.
     46 
     47 	It will take a while to load the kernel from the floppy,
     48 	probably around a minute or so.  After its loaded, you will be
     49 	presented with the message:
     50 		"Insert file system floppy"
     51 	If you do not see that message after a reasonable time has
     52 	elapsed, or the spinning cursor has stopped and nothing
     53 	further has happened, either your boot floppy is bad or you
     54 	are having hardware problems, and should proceed as outlined
     55 	above.
     56 
     57 	Once you have reached that prompt, remove the kernel-copy
     58 	floppy from the floppy drive.  Make sure that the installation
     59 	disk (the "inst-10" floppy) is writable, insert it into the
     60 	floppy drive, and hit any key.
     61 
     62 	You will then be presented with the NetBSD kernel boot
     63 	messages.  You will want to read them, to determine your
     64 	disk's name and geometry.  Its name will be something like
     65 	"sd0" or "wd0" and the geometry will be printed on a line that
     66 	begins with its name.  As mentioned above, you will need your
     67 	disk's geometry when creating NetBSD's partitions.  You will
     68 	also need to know the name, to tell the install tools what
     69 	disk to install on.
     70 
     71 	While booting, you will probably see several warnings.  You
     72 	should be warned that no swap space is present, and that
     73 	init(8) cannot find /etc/rc.  Do not be alarmed, these are
     74 	completely normal.  When you reach the prompt asking you for a
     75 	shell name, just hit return.
     76 
     77 	You will be presented with a welcome message and a prompt,
     78 	asking if you wish to proceed with the installation process.
     79 	If you wish to proceed, enter "y" and hit return.
     80 
     81 	You will be asked what type of disk driver you have.  The
     82 	valid options are listed by the install program, to make sure
     83 	you get it right.  If you're installing on an ST-506 or ESDI
     84 	drive, you'll be asked if your disk supports automatic sector
     85 	forwarding.  If you are SURE that it does, reply
     86 	affirmatively.  Otherwise, the install program will
     87 	automatically reserve space for bad144 tables.
     88 
     89 	The install program will then tell you which disks of that
     90 	type it can install on, and ask you which it should use.
     91 	Reply with the name of your disk.  (The first disk of the type
     92 	you selected, either "wd0" for ST-506/ESDI/IDE disks, or "sd0"
     93 	for SCSI disks, is the default.)
     94 
     95 	You will then be asked to name your disk's disklabel.  The
     96 	default response is "mywd" or "mysd" depending on the type of
     97 	your disk, and for most purposes it will be OK.  If you choose
     98 	to name it something different, make sure the name is a single
     99 	word and contains no special characters.  You don't need to
    100 	remember this name.
    101 
    102 	You will be prompted for your disk's geometry information,
    103 	i.e. the number of bytes per sector, cylinders on the disk,
    104 	tracks per cylinder (heads), and sectors per track.  Enter
    105 	them when they are requested.  If you make a mistake, hit
    106 	Control-C and when you get to the shell prompt, restart the
    107 	install process by running the "install" command.  Once you
    108 	have entered this data, the install program will tell you the
    109 	total size of your disk, in both sectors, and cylinders.
    110 	Remember this number; if you're installing on the whole disk,
    111 	you'll need it again soon.
    112 
    113 	When describing your partitions, you will have the option of
    114 	entering data about them in units of disk sectors or
    115 	cylinders.  If you choose to enter the information in units of
    116 	sectors, remember that, for optimal performance, partitions
    117 	should begin and end on cylinder boundaries.  You will be
    118 	asked about which units you wish to use, and you should reply
    119 	with "c" for cylinders, or "s" for sectors.
    120 
    121 	You will be asked for the size of the NetBSD portion of the
    122 	disk.  If you're installing on the whole disk, reply with the
    123 	size of the disk, as printed earlier by the install program.
    124 	If you're using only part of the disk, reply with the size
    125 	that you specified in the partition editor.  (Don't forget to
    126 	enter the size in the units you specified in the last step!)
    127 
    128 	If you are not installing on the whole disk, you will be asked
    129 	fro the offset of the NetBSD partition from the beginning of
    130 	the disk.  Reply with the appropriate offset (again, in
    131 	whichever units you specified), as determined by how you
    132 	set up your disk using the partition editor.
    133 
    134 	You will be asked to enter the size of your NetBSD root
    135 	partition.  It should be at least 13M, but if you are going to
    136 	be doing development, 14-16M is a more desirable size.  This
    137 	size should be expressed in units of sectors or cylinders,
    138 	depending on which you said you wanted to use.
    139 
    140 	Next, you will be asked for the size of your swap partition.
    141 	You should probably allocate twice as much swap space as you
    142 	have real memory.  Systems that will be heavily used should
    143 	have more swap space allocated, and systems that will be
    144 	lightly used can get by with less.  If you want the system to
    145 	be able to save crash dumps when it panics, you will need at
    146 	least as much swap space as you have RAM.  Again, this number
    147 	should be expressed in units of sectors or cylinders, as
    148 	appropriate.
    149 
    150 	The install program will then ask you for information about
    151 	the rest of the partitions you want on your disk.  For most
    152 	purposes, you will want only one more partition, "/usr".
    153 	(Machines used as servers will probably also want /var as a
    154 	separate partition.  That can be done with these installation
    155 	tools, but is not covered here.)  The install program will
    156 	tell you how much space there is left to be allocated in the
    157 	NetBSD area of the disk, and, if you only want one more
    158 	partition ("/usr"), you should enter it at the prompt when the
    159 	installer asks you how large the next partition should be.
    160 	It will then ask you for the name of the mount point for that
    161 	partition.  If you're doing a basic installation, that is
    162 	"/usr".
    163 
    164 	YOU ARE NOW AT THE POINT OF NO RETURN.  Nothing has been
    165 	written to your disk yet, but if you confirm that you want to
    166 	install NetBSD, your hard drive will be modified, and its
    167 	contents may be scrambled at the whim of the install program.
    168 	This is especially likely if you have given the install
    169 	program incorrect information.  If you are sure you want to
    170 	proceed, enter "yes" at the prompt.
    171 
    172 	The install program will now label your disk and make the file
    173 	systems you specified.  It will also create an /etc/fstab for
    174 	your system, and mount all of the file systems under /mnt.
    175 	(In other words, your root partition will be mounted on /mnt,
    176 	your /usr partition on /mnt/usr, and so on.)  There should be
    177 	no errors in this section of the installation.  If there are,
    178 	restart from the beginning of the installation process.
    179 
    180 	You will be placed at a shell prompt ("#"), and from there you
    181 	have to load and install the distribution sets.  How you do
    182 	this depends on which installation medium you've chosen;
    183 	instructions for the various types are below.
    184 
    185 	To install from floppy:
    186 		NOTE THAT THE NetBSD 1.0 DISTRIBUTION DOES _NOT_
    187 		SUPPORT INSTALLATION VIA FLOPPY ON MACHINES WITH ONE
    188 		FLOPPY DRIVE.  If you only have one floppy drive,
    189 		you'll have to use a different method of installation.
    190 		This will be fixed in the future.
    191 
    192 		The first thing you should do is pick a temporary
    193 		directory where the distribution files can be stored.
    194 		To do this, enter the command "Set_tmp_dir", and enter
    195 		the name of the temporary directory.  (Don't forget
    196 		that your disk is mounted under /mnt; you should
    197 		probably pick a directory under /mnt/usr.)  The
    198 		default is /mnt/usr/distrib.
    199 
    200 		After you have picked a temporary directory, enter the
    201 		"Load_fd" command, to load the distribution sets from
    202 		your floppies.
    203 
    204 		You will be asked which floppy drive to use.  Enter
    205 		"0" (zero) if you're using the first floppy drive
    206 		(i.e. what DOS would call "A:"), or enter "1" if
    207 		you're using the second.  (Remember that you CANNOT
    208 		use the floppy drive that you booted from.  If you
    209 		booted from "A:", you must load from "B:".)
    210 
    211 		You will be prompted to insert a floppy into the drive,
    212 		to have its contents copied to your hard disk.  Do so,
    213 		and hit return to begin copying.  When that is done,
    214 		read the remainder of the floppies that contain the
    215 		distribution sets that you want to install, one by
    216 		one.  When the last is read, and you are being
    217 		prompted for another, hit Control-C.
    218 
    219 		Run the "Extract" command once for each distribution
    220 		set you wish to install.  For instance, if you wish to
    221 		install the "base10" distribution set, followed by the
    222 		"man10" distribution set, and finally the "etc10"
    223 		distribution set, use the commands:
    224 			Extract base10
    225 			Extract man10
    226 			Extract etc10
    227 
    228 		For each extraction, it will ask you if the extraction
    229 		should be verbose.  If you reply affirmatively, it
    230 		will print out the name of each file that's being
    231 		extracted.
    232 
    233 		(Note: if you know that you will be running low on
    234 		disk space when installing NetBSD, you can load and
    235 		extract one distribution set at a time.  To do this,
    236 		load only the floppies which contain the files for the
    237 		first distribution set, extract them, and then change
    238 		to the temporary directory and remove them with the
    239 		command "rm set_name.??".)
    240 
    241 		Once you are finished extracting all of the sets that
    242 		you wish to install, you should proceed to the
    243 		instructions below (after the last install medium
    244 		type-specific instructions), that explain how you
    245 		should configure your system.
    246 
    247 	To install from tape:
    248 		The first thing you should do is pick a temporary
    249 		directory where the distribution files can be stored.
    250 		To do this, enter the command "Set_tmp_dir", and enter
    251 		the name of the temporary directory.  (Don't forget
    252 		that your disk is mounted under /mnt; you should
    253 		probably pick a directory under /mnt/usr.)  The
    254 		default is /mnt/usr/distrib.
    255 
    256 		After you have picked a temporary directory, enter the
    257 		"Load_tape" command, to load the distribution sets from
    258 		tape.
    259 
    260 		You will be asked which tape drive to use.  The
    261 		default is "rst0", which is correct if you're using
    262 		the SCSI tape drive with the lowest SCSI ID number.
    263 		(For the SCSI tape drive with the next lowest SCSI ID
    264 		number, you should use "rst1", and so on.)
    265 
    266 		You will be prompted to hit return when you have
    267 		inserted the tape into the tape drive.  When you do,
    268 		the contents of the tape will be extracted into the
    269 		temporary directory, and the names of the files being
    270 		extracted will be printed.
    271 
    272 		After the tape has been extracted, to go the directory
    273 		containing the first distribution set you wish to
    274 		install.  (Depending on how you made the tape, it's
    275 		probably a subdirectory of the temporary directory you
    276 		specified above.)  Once there, run the "Set_tmp_dir"
    277 		command again, and accept its default answer by
    278 		hitting return at the prompt.
    279 
    280 		Use the "Extract" command to extract the distribution
    281 		set.  For instance, if you're extracting the "base10"
    282 		set, use the command:
    283 			Extract base10
    284 		You will be asked if you wish the extraction to be
    285 		verbose.  If you reply affirmatively, the name of each
    286 		file being extracted will be printed.
    287 
    288 		Repeat the previous two steps for each distribution
    289 		set you wish to install.  Change to the set's
    290 		directory, run "Set_tmp_dir", and then run
    291 		"Extract <set_name>" to extract the set.
    292 
    293 		Once you are finished extracting all of the sets that
    294 		you wish to install, you should proceed to the
    295 		instructions below (after the last install medium
    296 		type-specific instructions), that explain how you
    297 		should configure your system.
    298 
    299 	To install via FTP or NFS:
    300 		The first thing you should do is pick a temporary
    301 		directory where the distribution files can be stored.
    302 		To do this, enter the command "Set_tmp_dir", and enter
    303 		the name of the temporary directory.  (Don't forget
    304 		that your disk is mounted under /mnt; you should
    305 		probably pick a directory under /mnt/usr.)  The
    306 		default is /mnt/usr/distrib.
    307 
    308 		Configure the appropriate ethernet interface (e.g.
    309 		ed0, ep0, etc.) up, with a command like:
    310 
    311 		ifconfig <ifname> <ipaddr> [netmask <netmask>]
    312 
    313 		where "<ifname>" is the interface name, like those
    314 		listed above, and "<ipaddr>" is the numeric IP address
    315 		of the interface.  If the interface has a special
    316 		netmask, supply the word "netmask" at and that netmask
    317 		at the end of the command line.  (The brackets
    318 		indicate that those arguments are optional.)  For
    319 		instance, to configure interface ed0 with IP address
    320 		129.133.10.10, use the command:
    321 
    322 		ifconfig ed0 129.133.10.10
    323 
    324 		and to configure interface ep0 with IP address
    325 		128.32.240.167 and a special netmask, 0xffffff00, use
    326 		the command:
    327 
    328 		ifconfig ep0 128.32.240.167 netmask 0xffffff00
    329 
    330 		If your board selects software selection of the
    331 		ethernet interface to use, you might have to add
    332 		special flags to the "ifconfig" command you use.
    333 		Consult the table below for the appropriate flags:
    334 
    335 		Interface Type	Connector	Flags
    336 		--------- ----	---------	-----
    337 		ed with WD/SMC*	BNC		[none necessary]
    338 		ed with WD/SMC*	UTP		[none necessary]
    339 		ed with WD/SMC*	AUI		link0
    340 		ed with 3c503	BNC		[none necessary]
    341 		ed with 3c503	AUI		link0
    342 		ep		BNC		[none necessary]
    343 		ep		AUI		link0
    344 		ep		UTP		link0 link1
    345 
    346 		* Older WD boards do not support software configuration,
    347 		  and must be configured via jumpers.  These flags
    348 		  will have no effect on them.
    349 
    350 		In other words, if, in the last example, the AUI port
    351 		of the board were being used, you would use the
    352 		command:
    353 
    354 		ifconfig ep0 128.32.240.167 netmask 0xffffff00 link0
    355 
    356 		If the NFS server or FTP server is not on a directly-
    357 		connected network, you need to set up a route to it
    358 		using a command like:
    359 
    360 		route add default <gate_ipaddr>
    361 
    362 		where <gate_ipaddr> is your gateway's numeric IP
    363 		address.
    364 
    365 		If you are NFS-mounting the distribution sets, mount
    366 		them on the temporary directory with a command like:
    367 
    368 		mount -t nfs <serv_ipaddr>:<dist_dir> <tmp_dir>
    369 
    370 		where <serv_ipaddr> is the server's numeric IP address,
    371 		<dist_dir> is the path to the distribution files on
    372 		the server, and <tmp_dir> is the name of the local
    373 		temporary directory.
    374 
    375 		Once this is done, proceed as if you had loaded the
    376 		files from tape, changing to the appropriate
    377 		directories, running "Set_tmp_dir", and running
    378 		"Extract" as appropriate.
    379 
    380 		If you are retrieving the distribution sets using ftp,
    381 		change into the temporary directory, and execute the
    382 		command:
    383 
    384 		ftp <serv_ipaddr>
    385 
    386 		where <serv_ipaddr> is once again the server's numeric
    387 		IP address.  Get the files with FTP, taking care to
    388 		use binary mode when transferring the files.
    389 
    390 		Once you have all of the files for the distribution
    391 		sets that you wish to install, you can proceed using
    392 		the instructions above, as if you had installed from a
    393 		floppy.  (Note that as with the floppy install, if
    394 		you're short on disk space, you can transfer only one
    395 		set at a time, extract it, then delete it, to save
    396 		space.)
    397 
    398 	Once you have finished extracting all of the distribution sets
    399 	that you wish to install, and are back at the "#" prompt, you
    400 	are ready to configure your system.  The configuration utility
    401 	expects that you have installed the "base10" and "etc10"
    402 	distribution sets.  If you have not, you will not be able to
    403 	run it successfully (nor will you have a functional system, in
    404 	any case).  To configure your newly-installed NetBSD system,
    405 	run the command "Configure".  It will ask you for the system's
    406 	host name, domain name, and other network configuration
    407 	information.  It will set up your configuration files and make
    408 	the device nodes for the newly-installed system.
    409 
    410 	Once your system is configured, you must install a kernel on
    411 	your hard disk.  Enter "halt" at the prompt to halt the
    412 	system.  When the system is halted, remove the "inst-10"
    413 	floppy from the floppy drive, and replace it with the NetBSD
    414 	1.0 kernel-copy floppy that you previously booted from. Reboot
    415 	with that floppy.
    416 
    417 	Once again, you will be prompted to insert a file system
    418 	floppy.  DO NOT replace the kernel-copy floppy, just hit any
    419 	key.
    420 
    421 	Again, While booting, you may see several warnings.  You may
    422 	be warned that no swap space is present, that init(8) cannot
    423 	find /etc/rc, and that one or more databases with names like
    424 	"pwd.db" cannot be found.  Do not be alarmed, as, again, these
    425 	are completely normal.  Hit return at the prompt asking you
    426 	for a shell name.
    427 
    428 	You will be presented with a shell prompt, at which you should
    429 	enter the "copy_kernel" command.  It will ask you what
    430 	partition to copy the kernel to, and you should reply with the
    431 	name of your root partition (e.g. sd0a or wd0a).
    432 
    433 	You will be asked if you are sure that you want to copy the
    434 	kernel.  Reply affirmatively, and it will check the file
    435 	system on your root partition, mount it, and copy the kernel.
    436 	Once the kernel is copied, you should use "halt" to halt the
    437 	system.
    438 
    439 	Once the system is halted, remove the kernel-copy floppy from
    440 	the floppy disk drive, and hit any key to reboot.
    441 
    442 Congratulations, you have successfully installed NetBSD 1.0.  When you
    443 reboot into NetBSD, you should log in as "root" at the login prompt.
    444 There is no initial password, but if you're using the machine in a
    445 networked environment, you should create yourself an account and
    446 protect it and the "root" account with good passwords.
    447 
    448 Some of the files in the NetBSD 1.0 distribution might need to be
    449 tailored for your site.  In particular, the /etc/sendmail.cf file will
    450 almost definitely need to be adjusted, and other files in /etc will
    451 probably need to be modified, as well.  If you are unfamiliar with
    452 UN*X-like system administration, it's recommended that you buy a book
    453 that discusses it.
    454