Home | History | Annotate | Line # | Download | only in i386
install revision 1.17
      1 
      2 0. Introduction
      3 
      4 	Using "sysinst", installing NetBSD is a relatively easy process.  You
      5 	still should read this document and have it in hand when doing the
      6 	installation process. This document tries to be a good guideline
      7 	for the installation and as such covers many details to be complete.
      8 	Do not let this discourage you, the install program is not hard
      9 	to use.
     10 
     11 0.1 Possible PCMCIA issues
     12 
     13 	There is a serious bug that may make installation of NetBSD on PCMCIA
     14 	machines difficult. This bug does not make USE of PCMCIA difficult  
     15 	once a machine is installed. If you do not have PCMCIA on your
     16 	machine (PCMCIA is only really used on laptop machines), you
     17 	can skip this section, and ignore the "[PCMCIA]" notes.
     18 
     19 	This will explains how to work around the installation problem.
     20 	It is anticipated that this bug will be fixed by NetBSD 1.4
     21    
     22 	What is the bug: The kernel keeps careful track of what interrupts
     23 	and i/o ports are in use during autoconfiguration. It then allows
     24 	the PCMCIA devices to pick unused interrupts and ports.
     25 	Unfortunately, not all devices are included in the INSTALL
     26 	kernels in order to save space. Let's say your laptop has a
     27 	soundblaster device built in. The INSTALL kernel has no sound
     28 	support. The PCMCIA code might allocate your soundblaster's IRQ
     29 	and i/o ports to PCMCIA devices, causing them not to work. This
     30 	is especially bad if one of the devices in question is your
     31 	ethernet card.
     32 
     33 	This problem will impact some, but not all, users of PCMCIA. If
     34 	this bug is hurting you, watch the "[PCMCIA]" notes that will
     35 	appear in this document.
     36 
     37 1. General
     38 
     39 	The following is a walk-through of the steps you will take while
     40 	getting NetBSD installed on your hard disk.  sysinst is a menu driven
     41 	installation system that allows for some freedom in doing the
     42 	installation.  Sometimes, questions will be asked and in many cases
     43 	the default answer will be displayed in brackets ("[]") after the
     44 	question.  If you wish to stop the installation, you may hit Control-C
     45 	at any time, but if you do, you'll have to begin the installation
     46 	process again from scratch.
     47 
     48 2. Booting NetBSD
     49 
     50 	[PCMCIA]: unplug your PCMCIA devices, so that they won't be
     51 	found by NetBSD.
     52 
     53         Boot your machine using the boot floppy.  The boot loader will
     54         start, and will print a countdown and begin booting. You will
     55         likely see one "file not found" warning from the boot loader
     56         -- ignore this as it is normal, and indicates the boot loader
     57         failed to find a normal kernel to boot before trying to boot a
     58         compressed kernel.
     59 
     60         If the boot loader messages do not appear in a reasonable
     61         amount of time, you either have a bad boot floppy or a
     62         hardware problem.  Try writing the install floppy image to
     63         a different disk, and using that.
     64 
     65 	If that doesn't work, try booting after disabling your CPU's
     66 	internal and external caches (if any).  If it still doesn't
     67 	work, NetBSD probably can't be run on your hardware.  This can
     68 	probably be considered a bug, so you might want to report it.
     69 	If you do, please include as many details about your system
     70 	configuration as you can.
     71 
     72 	It will take a while to load the kernel from the floppy,
     73 	probably around a minute or so.
     74 
     75 	You will then be presented with the NetBSD kernel boot
     76 	messages. This may take a little while, as NetBSD will
     77 	be probing for a lot of types of hardware,  You may want to read the
     78 	boot messages, to notice your disk's name and geometry.  Its name
     79 	will be something like "sd0" or "wd0" and the geometry will be
     80 	printed on a line that begins with its name.  As mentioned above,
     81 	you may need your disk's geometry when creating NetBSD's partitions.
     82 	You will also need to know the name, to tell sysinst on which disk
     83 	to install. The most important thing to know is that
     84 	'wd0 is NetBSD's name for your first IDE disk, wd1 the second,
     85 	etc. 'sd0' is your first SCSI disk, sd1 the second, etc.
     86 
     87         Note that, once the system has finished booting, you need no
     88         longer leave the floppy in the disk drive. Earlier version of
     89         the NetBSD install floppies mounted the floppy as the system's
     90         root partition, but the new installation floppies use a
     91         ramdisk file system and are no longer dependent on the floppy
     92         once it has booted.
     93 
     94 	Once NetBSD has booted and printed all the boot messages,
     95 	you will be presented with a welcome message and a main menu.
     96 	It will also include instructions for using the menus.
     97 
     98 3. Network configuration
     99 
    100 	[PCMCIA] You can skip this section, as you will only get data
    101 	         from floppy in the first part of the install.
    102 
    103 	If you will not use network operation during the installation,
    104 	but you do want your machine to be configured for networking once
    105 	it is installed, you should first go to the utilities menu, and select
    106 	the "Configure network option". If you only want to temporarily
    107 	use networking during the installation, you can specify these
    108 	parameters later. If you are not using Domain Name Service (DNS),
    109 	you can give an empty response in reply to answers relating to
    110 	this.
    111 
    112 4. The hard disk to install on and its parameters.
    113 
    114 	To start the installation, select the menu option to install
    115 	NetBSD from the main menu.
    116 
    117 	The first thing is to identify the disk on which you want to
    118 	install NetBSD.  sysinst will report a list of disks it finds
    119 	and ask you for your selection.  Depending on how many disks
    120 	are found, you may get a different message.  You should see
    121 	disk names like "wd0", "wd1", "sd0", or "sd1".
    122 
    123 	sysinst next tries to figure out the real and BIOS geometry
    124 	of your disk. It will present you with the values it found,
    125 	if any, and will give you a chance to change them.
    126 	Please note that if you change the values, sysinst WILL ALSO
    127 	REINITIALIZE YOUR MBR.
    128 
    129 	You will also be asked if you want to use the last cylinder of
    130 	the disk. Originally, the last cylinder of the disk was used for
    131 	diagnostic purposes, but this is usually not a concern anymore
    132 	these days. You will be able to specify whether you want to
    133 	skip the last cylinder anyway.
    134 
    135 	Next, depending on whether you are using a "wdX" or a "sdX" disk,
    136 	you will either be asked for the type of disk (wdX) you are
    137 	using or you will be asked if you want to specify a fake geometry
    138 	for your SCSI disk (sdX).  The types of disk are be IDE, ST-506
    139 	or ESDI.  If you're installing on an ST-506 or ESDI drive, you'll
    140 	be asked if your disk supports automatic sector forwarding.  If you
    141 	are SURE that it does, reply affirmatively.  Otherwise, the install
    142 	program will automatically reserve space for bad144 tables.
    143 
    144 5. Partitioning the disk.
    145 
    146 5.1 Which portion of the disk to use.
    147 
    148 	You will be asked if you want to use the entire disk or
    149 	only part of the disk. If you decide to use the entire disk
    150 	for NetBSD, it will be checked if there are already other
    151 	systems present on the disk, and you will be asked to confirm
    152 	whether you want to overwrite these.
    153 
    154 	If you want to use the entire disk for NetBSD, you can skip
    155 	the following section and go to section 5.3, "Editing the
    156 	NetBSD disklabel".
    157 
    158 5.2 Editing the Master Boot Record.
    159 
    160 	First, you will be prompted to specify the units of size
    161 	that you want to express the sizes of the partitions in.
    162 	You can either pick megabytes, cylinders or sectors.
    163 
    164 	After this, you will be presented with the current values
    165 	stored in the MBR, and will be given the opportunity to
    166 	change, create or delete partitions. For each partition
    167 	you can set the type, the start and the size. Setting
    168 	the type to 'unused' will delete a partition. You can
    169 	also mark a partition as active, meaning that this is
    170 	the one that the BIOS will start from at boot time.
    171 
    172 	Be sure to mark the partition you want to boot from as active!
    173 
    174 	After you are done editing the MBR, a sanity check
    175 	will be done, checking for partitions that overlap.
    176 	If everything is ok, you can go on to the next step,
    177 	editing the NetBSD disklabel.
    178 
    179 5.3 Editing the NetBSD disklabel.
    180 
    181 	The partition table of a NetBSD part of a disk is called
    182 	a 'disklabel'. There are 3 layouts for the NetBSD part
    183 	of the disk that you can pick from: Standard, Standard
    184 	with X and Custom. The first two use a set of default
    185 	values (that you can change) suitable for a normal
    186 	installation, possibly including X. The last option
    187 	lets you specify everything yourself.
    188 
    189 	You will be presented with the current layout of the
    190 	NetBSD disklabel, and given a chance to change it.
    191 	For each partition, you can set the type, offset and size,
    192 	block and fragment size, and the mount point. The type
    193 	that NetBSD uses for normal file storage is called
    194 	"4.2BSD". A swap partition has a special type called "swap".
    195 	You can also specify a partition as type "msdos". This
    196 	is useful if you share the disk with MS-DOS or Windows95,
    197 	NetBSD is able to access the files on these partitions.
    198 	You can use the values from the MBR for the MS-DOS part
    199 	of the disk to specify the partition of type "msdos"
    200 	(you don't have to do this now, you can always re-edit
    201 	the disklabel to add this once you have installed NetBSD).
    202 
    203 	Some partitions in the disklabel have a fixed purpose.
    204 	Partition 'a' is always the root partition, 'b' is the
    205 	swap partition, 'c' is the entire NetBSD part of the disk,
    206 	and 'd' is the whole disk. Partitions 'e'-'h' are available
    207 	for other use. Traditionally, 'e' is the partition mounted
    208 	on the /usr directory, but this is historical practice,
    209 	not a fixed value.
    210 
    211 	You will then be asked to name your disk's disklabel.  The
    212 	default response is "mydisk". For most purposes this will be OK.
    213 	If you choose to name it something different, make sure the name
    214 	is a single word and contains no special characters.  You don't
    215 	need to remember this name.
    216 
    217 6. Preparing your hard disk
    218 
    219 	YOU ARE NOW AT THE POINT OF NO RETURN.  Nothing has been
    220 	written to your disk yet, but if you confirm that you want to
    221 	install NetBSD, your hard drive will be modified. If you are
    222 	sure you want to proceed, enter "yes" at the prompt.
    223 
    224 	The install program will now label your disk and make the file
    225 	systems you specified. The filesystems will be initialized to
    226 	contain NetBSD bootstrapping binaries and configuration files.
    227 	You will see messages on your screen from the various NetBSD
    228 	disk preparation tools that are running. There should be no
    229 	errors in this section of the installation. If there are,
    230 	restart from the beginning of the installation process.
    231 	Otherwise, you can continue the installation program
    232 	after pressing 'return'.
    233 
    234         NOTE: In previous versions of NetBSD, the kernel from the
    235         install floppy was copied onto the hard drive in a special
    236         step. In the new install system, the kernel on the floppy is
    237         unsuited to being copied onto the hard drive. Instead, a new
    238         set, "kern", has been added which contains a generic kernel to
    239         be unloaded onto the drive. So, you can not boot from your
    240 	hard drive yet at this point.
    241 
    242 7. Getting the distribution sets.
    243 
    244 	[PCMCIA] Load a kernel tar file (i.e. the kern.tgz set file)
    245 	         on to your hard disk, for example by mounting the
    246 	         hard disk first, copying the kern.tgz file from
    247 	         floppy and unpacking it. Example:
    248 
    249 		 mount /dev/wd0a /mnt
    250 		 cd /mnt
    251 
    252 		 <repeat following 3 steps until all kern.* files are there>
    253 		 mount -t msdos /dev/fd0a /mnt2
    254 		 cp /mnt2/kern.* .
    255 		 umount /mnt2
    256 
    257 		 cat kern.* | tar vxzf -
    258 
    259 		 Then halt the machine using the 'halt' command. Power
    260 		 the machine down, and re-insert all the PCMCIA devices.
    261 		 Remove any floppy from the floppy drive.
    262 		 Start the machine up. After booting NetBSD, you will
    263 		 be presented with the main sysinst menu. Choose the
    264 		 option to re-install sets. Wait for the filesystem
    265 		 checks that it will do to finish, and then proceed
    266 		 as described below.
    267 
    268 
    269 	The NetBSD distribution consists of a number of 'sets', that
    270 	come in the form of gzipped tarfiles. A few sets must be
    271 	installed for a working system, others are optional. At this
    272 	point of the installation, you will be presented with a menu
    273 	which enables you to choose from one of the following methods
    274 	of installing the sets. Some of these methods will first
    275 	load the sets on your hard disk, others will extract the sets
    276 	directly.
    277 
    278 	For all these methods, the first step is making the sets
    279 	available for extraction, and then do the actual installation.
    280 	The sets can be made available in a few different ways. The
    281 	following sections describe each of those methods. After
    282 	reading the one about the method you will be using, you
    283 	can continue to section 8
    284 
    285 7.1 Installation using ftp
    286 
    287 	To be able to install using ftp, you first need to configure
    288 	your network setup, if you haven't already at the start of
    289 	the install procedure. sysinst will do this for you, asking you
    290 	to provide some data, like IP number, hostname, etc. If you
    291 	do not have name service set up for the machine that you
    292 	are installing on, you can just press 'return' in answer
    293 	to these questions, and DNS will not be used.
    294 
    295 	You will also be asked to specify the host that you want
    296 	to transfer the sets from, the directory on that host,
    297 	and the account name and password used to log into that
    298 	host using ftp. If you did not set up DNS when answering
    299 	the questions to configure networking, you will need to
    300 	specify an IP number instead of a hostname for the ftp
    301 	server.
    302 
    303 	sysinst will proceed to transfer all the default set files
    304 	from the remote site to your hard disk.
    305 
    306 7.2 Installation using NFS
    307 
    308 	To be able to install using NFS, you first need to configure
    309 	your network setup, if you haven't already at the start of
    310 	the install procedure. sysinst will do this for you, asking you
    311 	to provide some data, like IP number, hostname, etc. If you
    312 	do not have name service set up for the machine that you
    313 	are installing on, you can just press 'return' in answer
    314 	to these questions, and DNS will not be used.
    315 
    316 	You will also be asked to specify the host that you want
    317 	to transfer the sets from, and the directory on that host
    318 	that the files are in. This directory should be mountable
    319 	by the machine you are installing on, i.e. correctly
    320 	exported to your machine.
    321 
    322 	If you did not set up DNS when answering the questions to
    323 	configure networking, you will need to specify an IP number
    324 	instead of a hostname for the NFS server.
    325 
    326 
    327 7.3 Installation from CD-ROM
    328 
    329 	When installing from a CD-ROM, you will be asked to specify
    330 	the device name for your CD-ROM player (usually 'cd0'), and
    331 	directory name on the CD-ROM where the distribution files are.
    332 
    333 	sysinst will then check if the files are indeed available
    334 	in the specified location, and proceed to the actual
    335 	extraction of the sets.
    336 
    337 7.4 Installation from floppy
    338 
    339 	Because the installation sets are too big to fit on one floppy,
    340 	the floppies are expected to be filled with the split set
    341 	files. The floppies are expected to be in MS-DOS
    342 	format. You will be asked for a directory where the sets
    343 	should be reassembled. Then you will be prompted to insert
    344 	the floppies containing the split sets. This process
    345 	will continue until all the sets have been loaded from floppy.
    346 	
    347 
    348 7.5 Installation from an unmounted filesystem
    349 
    350 	In order to install from a local filesystem, you will
    351 	need to specify the device that the filesystem resides
    352 	on (for example 'wd1e'), the type of the filesystem,
    353 	and the directory on the specified filesystem where the
    354 	sets are located. sysinst will then check if it
    355 	can indeed access the sets at that location. 
    356 
    357 7.6 Installation from a local directory
    358 
    359 	This option assumes that you have already done some preparation
    360 	yourself. The sets should be located in a directory on a
    361 	filesystem that is already accessible. sysinst will ask you
    362 	for the name of this directory.
    363 
    364 8. Extracting the distribution sets
    365 
    366 	After you the install sets containing the NetBSD distribution
    367 	have been made available, you can either extract all the
    368 	sets (a full installation), or only extract sets that
    369 	you have selected. In the latter case you will be shown the
    370 	currently selected sets, and given the opportunity to select
    371 	the sets you want. Some sets always need to be installed
    372 	("kern", "base" and "etc"), they will not be shown in
    373 	this selection menu.
    374 
    375 	Before extraction begins, you can elect to watch the files
    376 	being extracted; the name of each file that is extracted will
    377 	be shown.
    378 
    379 	After all the files have been extracted, all the necessary
    380 	device node files will be created. If you have already
    381 	configured networking, you will be asked if you want to
    382 	use this configuration for normal operation. If so, these
    383 	values will be installed in the network configuration files.
    384 
    385 9. Finalizing your installation.
    386 
    387 	Congratulations, you have successfully installed NetBSD _VER.
    388 	You can now reboot the machine, and boot from harddisk. NetBSD
    389 	will enter single-user mode, and you will be presented with
    390 	a shell prompt. You should now edit the /etc/rc.conf file
    391 	to configure the system to suit your needs. To do this,
    392 	you might want to first make all local filesystems accessible
    393 	and set the terminal type, so that, for example, vi will work
    394 	properly. The following commands will do this:
    395 
    396 		mount -a
    397 		TERM=pc3 ; export TERM
    398 
    399 	You should at least do the following in /etc/rc.conf:
    400 
    401 		* Change rc_configured=NO to rc_configured=YES
    402 		* Set the hostname in the 'hostname' line, e.g.
    403 		  hostname="somename"
    404 
    405 	You are advised to take a look at the other items in the
    406 	/etc/rc.conf file, and change them if you wish. After you
    407 	have made and saved the changes, reboot the machine again.
    408 
    409 	After reboot, you can log in "root" at the login prompt.  There
    410 	is no initial password, but if you're using the machine in a
    411 	networked environment, you should create yourself an account
    412 	and protect it and the "root" account with good passwords.
    413 
    414 	Some other files in the NetBSD _VER distribution might need to be
    415 	tailored for your site.  In particular, the /etc/sendmail.cf file will
    416 	almost definitely need to be adjusted, and other files in /etc will
    417 	probably need to be modified, as well.
    418 
    419 	Some leftover files from the installation may be on your hard disk,
    420 	depending on the procedure you followed. If you find any of
    421 	the files, you should remove them:
    422 
    423 		/.termcap
    424 		/sysinst
    425 
    426 	If you are unfamiliar with UN*X-like system administration, it's
    427 	recommended that you buy a book that discusses it.
    428