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