NetBSD/distrib/notes/common/sysinst
2000-03-08 13:09:00 +00:00

807 lines
23 KiB
Plaintext

.\" $NetBSD: sysinst,v 1.5 2000/03/08 13:09:00 hubertf Exp $
.\"
.\" Copyright (c) 1999 The NetBSD Foundation, Inc.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\" 3. All advertising materials mentioning features or use of this software
.\" must display the following acknowledgement:
.\" This product includes software developed by the NetBSD
.\" Foundation, Inc. and its contributors.
.\" 4. Neither the name of The NetBSD Foundation nor the names of its
.\" contributors may be used to endorse or promote products derived
.\" from this software without specific prior written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
.
.
.de (pcmcia
. Bl -tag -width x[PCMCIA]x
.It [ Tn PCMCIA ]
..
.de pcmcia)
. El
..
.
.de It_need
.br
.ne 6P
\\*[It]\\
..
.
.
.Ss2 "Running the Sysinst Installation Program"
.Bl -enum
.It_need
.Em Introduction
.Pp
Using
.Ic sysinst ,
installing
.Nx
is a relatively easy process. You
still should read this document and have it in hand when doing the
installation process. This document tries to be a good guideline
for the installation and as such covers many details to be completed.
Do not let this discourage you, the install program is not hard
to use.
.
.if !r_pmax \{\
.It_need
.Em Possible Tn PCMCIA Em issues
.Pp
There is a serious bug that may make installation of
.Nx
on
.Tn PCMCIA
machines difficult. This bug does not make
.Em use
of
.Tn PCMCIA
difficult once a machine is installed. If you do not have
.Tn PCMCIA
on your
machine
.Op Tn PCMCIA
is only really used on laptop machines), you
can skip this section, and ignore the
.Dq Bq Tn PCMCIA
notes.
.Pp
This will explains how to work around the installation problem.
.Pp
What is the bug: The kernel keeps careful track of what interrupts
and i/o ports are in use during autoconfiguration. It then allows
the
.Tn PCMCIA
devices to pick unused interrupts and ports.
Unfortunately, not all devices are included in the
.Tn Li INSTALL
kernels in order to save space. Let's say your laptop has a
soundblaster device built in. The
.Tn Li INSTALL
kernel has no sound support. The
.Tn PCMCIA No code might allocate your soundblaster's
.Tn IRQ No and I/O ports to
.Tn PCMCIA
devices, causing them not to work. This
is especially bad if one of the devices in question is your
ethernet card.
.Pp
This problem will impact some, but not all, users of
.Tn PCMCIA .
If this bug is affecting you, watch the
.Bq Tn PCMCIA
notes that will appear in this document.
.if r_i386 \{\
.Pp
If the kernel by default allocates an interrupt for PCMCIA which is
allocated to other (typically undetected) hardware, you may use a
workaround by booting the install kernel with "boot -d" to drop into
DDB (the in-kernel debugger) and use "write pcic_isa_intr_alloc_mask 0x0808"
(or any appropriate value for your machine) to mask out the offending
interrupt before continuing. By default the kernel masks out IRQ 10, and
the corresponding mask is 0xfbff.
.\}
.\}
.It_need
.Em General
.Pp
The following is a walk-through of the steps you will take while
getting
.Nx
installed on your hard disk.
.Ic sysinst
is a menu driven
installation system that allows for some freedom in doing the
installation. Sometimes, questions will be asked and in many cases
the default answer will be displayed in brackets
.Pq Dq \&[\ ]
after the question. If you wish to stop the installation, you may hit Control-C
at any time, but if you do, you'll have to begin the installation
process again from scratch.
.It_need
.Em Quick install
.Pp
First, let's describe a quick install. The other sections of
this document go into the installation procedure in more
detail, but you may find that you do not need this. If you
want detailed instructions, skip to section 3. This section
describes a basic installation, using a CD-ROM install as
an example.
.Pp
.Bl -bullet
.It_need
What you need.
.Bl -hyphen
.It_need
The distribution sets (in this example, they are on CD).
.if !r_pmax \{\
.It_need
.ie r_alpha Two floppy disks.
.ie r_i386 Two 1.44M 3.5" floppy disks.
.el One 1.44M 3.5" floppy.
.\}
.It_need
.if r_i386 A PC with a 386 or newer processor.
A CD-ROM drive (SCSI or ATAPI), a harddisk and a minimum of
.if r_alpha 32Mb
.if r_i386 4Mb
.if r_pmax 8Mb
of memory installed.
.It_need
The harddisk should have at least
.if r_alpha 200
.if r_i386 70
.if r_pmax 200
+
.Em n
megabytes of
space free, where
.Em n
is the number of megabytes of
main memory in your system. If you wish to install
the X window system as well, you will need at least
60Mb more.
.El
.if r_i386 \{\
.It_need
Creating the boot floppies.
You can create the floppies needed for installation
under DOS or Windows. Supposing your 1.44M floppy
drive is drive A:, and your CD is drive E: do the
following from an MS-DOS command prompt:
.D1 Ic "\&e:
.D1 Ic "\&cd \eNetBSD-\*V\einstallation\emisc
.D1 Ic "\&rawrite
When asked for a source filename, answer
.if r_i386 .D1 Ic \&..\efloppy\eboot1.fs for the first diskette and
.if r_i386 .D1 Ic \&..\efloppy\eboot2.fs for the second diskette
.if r_alpha .D1 Em \&(...alpha installation root) Ns Ic \efloppy\edisk1of2
When asked for a destination drive answer
.D1 Ic a
.It_need
To create a bootfloppy under
.Nx
or other UNIX-like system, you
would type something like:
.D1 Ic "dd if=.../boot1.fs bs=18k of=/dev/rfd0a
.\}
.It_need
The Quick Installation
.Bl -hyphen
.It_need
.ie r_pmax \{\
Boot the system as desribed in the previous section. You
should be at the
.Ic sysinst
main menu.
.\}
.el \{\
Insert the
.ie r_i386 first
.ie r_alpha first
boot floppy you just created.
.ie r_i386 Restart
.el Boot
the computer.
.if r_alpha Type
.if r_alpha .Dl \&\*>\*>\*> Ic "B DVA0
.if r_i386 When prompted, insert the second boot floppy.
The main menu will be displayed.
.\}
.It_need
If you wish, you can configure some network settings
immediately by choosing the
.Me utilities
menu and then
.Me configure network .
It isn't actually required at this point, but
it may be more convenient. Go back to the main menu.
.It_need
Choose
.Me install
.It_need
You will be guided through some steps regarding the
setup of your disk, and the selection of distributed components
to install. When in doubt, refer to the rest of this document for details.
.It_need
After your disk has been prepared, choose
.Me CD-ROM
as the medium. The default values for the path and device should be ok.
.It_need
After all the files have been unpacked, go back to
the main menu and select
.Me reboot ,
after you have removed the bootfloppy from the drive.
.It_need
.Nx
will now boot. You should log in as
.Li root ,
and set a password for that account. You are also
advised to edit the file
.Pa /etc/rc.conf No to match your system needs.
.It_need
Your installation is now complete.
.It_need
For configuring the X window system, if installed, see the files in
.Dl /usr/X11R6/lib/X11/doc .
Further information can be found on
.Lk http://www.xfree86.org/
.El
.El
.It_need
.Em Booting
.Nx
.
.
.ie r_pmax \{\
.Pp
Boot the system as desribed in the previous section.
.\}
.el \{\
.(pcmcia
Unplug your
.Tn PCMCIA
devices, so that they won't be found by
.Nx .
.pcmcia)
.
.
.Pp
Boot your machine using the boot floppy. The boot loader will
start, and will print a countdown and begin booting.
.Pp
If the boot loader messages do not appear in a reasonable
amount of time, you either have a bad boot floppy or a
hardware problem. Try writing the install floppy image to
a different disk, and using that.
.if r_i386 \{\
.Pp
If that doesn't work, try booting after disabling your CPU's
internal and external caches (if any). If it still doesn't
work,
.Nx
probably can't be run on your hardware. This can
probably be considered a bug, so you might want to report it.
If you do, please include as many details about your system
configuration as you can.
.\}
.Pp
It will take a while to load the kernel from the floppy,
probably around a minute or so, then, the kernel boot messages
will be displayed. This may take a little while also, as
.Nx
will be probing your system to discover which hardware devices are
installed.
.if r_i386 \{\
You may want to read the
boot messages, to notice your disk's name and geometry. Its name
will be something like
.Li sd0
or
.Li wd0
and the geometry will be
printed on a line that begins with its name. As mentioned above,
you may need your disk's geometry when creating NetBSD's partitions.
You will also need to know the name, to tell
.Ic sysinst
on which disk
to install.
.\}
The most important thing to know is that
.Li wd0
is NetBSD's name for your first IDE disk,
.Li wd1
the second, etc.
.Li sd0
is your first SCSI disk,
.Li sd1
the second, etc.
.Pp
Note that, once the system has finished booting, you need not
leave the floppy in the disk drive.
.if r_i386 \{\
Earlier version of
the
.Nx
install floppies mounted the floppy as the system's
root partition, but the new installation floppies use a
ramdisk file system and are no longer dependent on the floppy
once it has booted.
.\}
.\}
.Pp
Once
.Nx
has booted and printed all the boot messages,
you will be presented with a welcome message and a main menu.
It will also include instructions for using the menus.
.It_need
.Em Network configuration
.if !r_pmax \{\
.(pcmcia
You can skip this section, as you will only get data
from floppy in the first part of the install.
.pcmcia)
.\}
.Pp
If you will not use network operation during the installation,
but you do want your machine to be configured for networking once
it is installed, you should first go to the utilities menu, and select
.Ic Configure network option .
If you only want to temporarily
use networking during the installation, you can specify these
parameters later. If you are not using Domain Name Service (DNS),
you can give an empty response in reply to answers relating to
this.
.It_need
.Em Installation drive selection and parameters
.Pp
To start the installation, select the menu option to install
.Nx
from the main menu.
.Pp
The first thing is to identify the disk on which you want to
install
.Nx .
.Ic sysinst
will report a list of disks it finds
and ask you for your selection. Depending on how many disks
are found, you may get a different message. You should see
disk names like
.ie r_pmax \{\
.Li rz0
or
.Li rz1
.\}
.el \{\
.Li wd0 ,
.Li wd1 ,
.Li sd0 ,
or
.Li sd1 .
.if r_i386 \{\
.Pp
.Ic sysinst
next tries to figure out the real and BIOS geometry
of your disk. It will present you with the values it found,
if any, and will give you a chance to change them.
.\}
.Pp
Next, depending on whether you are using a
.Li Pf wd Em x
or
.Li Pf wd Em x
disk,
you will either be asked for the type of disk
.Pq Li Pf wd Em x
you are
using or you will be asked if you want to specify a fake geometry
for your SCSI disk
.Pq Li Pf sd Em x .
The types of disk are be
.Tn IDE, ST-506
or
.Tn ESDI .
If you're installing on an
.Tn ST-506
or
.Tn ESDI
drive, you'll be asked if your disk supports automatic sector forwarding.
If you are
.Em sure
that it does, reply affirmatively. Otherwise, the install
program will automatically reserve space for bad144 tables.
.\}
.It_need
.Em Partitioning the disk.
.Bl -bullet
.It_need
Which portion of the disk to use.
.Pp
You will be asked if you want to use the entire disk or
only part of the disk. If you decide to use the entire disk
for
.Nx ,
it will be checked if there are already other
systems present on the disk, and you will be asked to confirm
whether you want to overwrite these.
.Pp
If you want to use the entire disk for
.Nx ,
you can skip
the following section and go to
.Em Editing the
.Nx
.Em disklabel .
.if r_i386 \{\
.It_need
Editing the Master Boot Record.
.Pp
First, you will be prompted to specify the units of size
that you want to express the sizes of the partitions in.
You can either pick megabytes, cylinders or sectors.
.Pp
After this, you will be presented with the current values
stored in the MBR, and will be given the opportunity to
change, create or delete partitions. For each partition
you can set the type, the start and the size. Setting the type to
.Ic unused
will delete a partition. You can
also mark a partition as active, meaning that this is
the one that the BIOS will start from at boot time.
.Pp
Be sure to mark the partition you want to boot from as active!
.Pp
After you are done editing the MBR, a sanity check
will be done, checking for partitions that overlap.
Depending on the BIOS capabilities of your machine and the
parameters of the NetBSD partition you have specified, you
may also be asked if you want to install newer bootcode in
your MBR. If you have multiple operating systems on the
disk that you are installing on, you will also be given
the option to install a bootselector, that will allow you
to pick the operating system to start up when your computer
is (re-)started.
.Pp
If everything is ok, you can go on to the next step,
editing the
.Nx
disklabel.
.Pp
.\}
.It_need
.Em Editing the
.Nx
.Em disklabel .
.Pp
The partition table of the
.Nx
part of a disk is called a
.Em disklabel .
There are 3 layouts for the
.Nx
part of the disk that you can pick from:
.Ic Standard, Standard with X
and
.Ic Custom .
The first two use a set of default
values (that you can change) suitable for a normal
installation, possibly including X. The last option
lets you specify everything yourself.
.Pp
You will be presented with the current layout of the
.Nx
disklabel, and given a chance to change it.
For each partition, you can set the type, offset and size,
block and fragment size, and the mount point. The type
that
.Nx
uses for normal file storage is called
.Sy 4.2BSD .
A swap partition has a special type called
.Sy swap .
.
.
.ie r_i386 \{\
.
.
You can also specify a partition as type
.Sy msdos .
This is useful if you share the disk with
.Tn MS-DOS
or Windows95;
.Nx
is able to access the files on these partitions.
You can use the values from the MBR for the MS-DOS part
of the disk to specify the partition of type
.Sy msdos
(you don't have to do this now, you can always re-edit
the disklabel to add this once you have installed NetBSD).
.Pp
Some partitions in the disklabel have a fixed purpose.
Partition
.Sy \&a
is always the root partition,
.Sy \&b
is the swap partition,
.Sy \&c
is the entire
.Nx
part of the disk, and
.Sy \&d
is the whole disk. Partitions
.Sy \&e-h
are available
for other use. Traditionally,
.Sy \&e
is the partition mounted on the
.Pa /usr
directory, but this is historical practice, not a fixed value.
.
.
.\}
.el \{\
.
.
.Pp
Some partitions in the disklabel have a fixed purpose. Partition
.Sy a No is always the root partition,
.Sy b No is the swap partition, and
.Sy c No is the whole disk. Partitions
.Sy \&e-h
are available for other use. Traditionally,
.Sy \&d
is the partition mounted on the
.Pa /usr
directory, but this is historical practice, not a fixed value.
.
.
.\}
.
.
.Pp
You will then be asked to name your disk's disklabel. The
default response is
.Sy mydisk .
For most purposes this will be OK.
If you choose to name it something different, make sure the name
is a single word and contains no special characters. You don't
need to remember this name.
.El
.Pp
.It_need
.Em Preparing your hard disk
.Pp
.Em You\ are\ now\ at\ the\ point\ of\ no\ return .
Nothing has been
written to your disk yet, but if you confirm that you want to
install
.Nx ,
your hard drive will be modified. If you are
sure you want to proceed, enter
.Li yes
at the prompt.
.Pp
The install program will now label your disk and make the file
systems you specified. The filesystems will be initialized to
contain
.Nx
bootstrapping binaries and configuration files.
You will see messages on your screen from the various NetBSD
disk preparation tools that are running. There should be no
errors in this section of the installation. If there are,
restart from the beginning of the installation process.
Otherwise, you can continue the installation program
after pressing the return key.
.if r_i386 \{\
.Pp
NOTE: In previous versions of
.Nx ,
the kernel from the
install floppy was copied onto the hard drive in a special
step. In the new install system, the kernel on the floppy is
unsuited to being copied onto the hard drive. Instead, a new set,
.Sy kern ,
has been added which contains a generic kernel to
be unloaded onto the drive. So, you can not boot from your
hard drive yet at this point.
.\}
.It_need
.Em Getting the distribution sets.
.if r_i386 \{\
.(pcmcia
.
Load a kernel tar file (i.e. the kern.tgz set file)
on to your hard disk, for example by mounting the
hard disk first, copying the kern.tgz file from
floppy and unpacking it. Example:
.(disp
mount /dev/wd0a /mnt
cd /mnt
\*<repeat following 3 steps until all kern.* files are there\*>
mount -t msdos /dev/fd0a /mnt2
cp /mnt2/kern.* .
umount /mnt2
cat kern.* | tar vxzf -
.disp)
.Pp
Then halt the machine using the 'halt' command. Power
the machine down, and re-insert all the
.Tn PCMCIA
devices.
Remove any floppy from the floppy drive.
Start the machine up. After booting
.Nx ,
you will
be presented with the main
.Ic sysinst
menu. Choose the
option to re-install sets. Wait for the filesystem
checks that it will do to finish, and then proceed
as described below.
.pcmcia)
.\}
.Pp
The
.Nx
distribution consists of a number of
.Em sets ,
that come in the form of gzipped tarfiles. A few sets must be
installed for a working system, others are optional. At this
point of the installation, you will be presented with a menu
which enables you to choose from one of the following methods
of installing the sets. Some of these methods will first
load the sets on your hard disk, others will extract the sets
directly.
.Pp
For all these methods, the first step is making the sets
available for extraction, and then do the actual installation.
The sets can be made available in a few different ways. The
following sections describe each of those methods. After
reading the one about the method you will be using, you
can continue to section 9
.It_need
.Em Installation using ftp
.Pp
To be able to install using ftp, you first need to configure
your network setup, if you haven't already at the start of
the install procedure.
.Ic sysinst
will do this for you, asking you
to provide some data, like IP number, hostname, etc. If you
do not have name service set up for the machine that you
are installing on, you can just press return in answer
to these questions, and DNS will not be used.
.Pp
You will also be asked to specify the host that you want
to transfer the sets from, the directory on that host,
and the account name and password used to log into that
host using ftp. If you did not set up DNS when answering
the questions to configure networking, you will need to
specify an IP number instead of a hostname for the ftp
server.
.Pp
.Ic sysinst
will proceed to transfer all the default set files
from the remote site to your hard disk.
.It_need
.Em Installation using NFS
.Pp
To be able to install using NFS, you first need to configure
your network setup, if you haven't already at the start of
the install procedure.
.Ic sysinst
will do this for you, asking you
to provide some data, like IP number, hostname, etc. If you
do not have name service set up for the machine that you
are installing on, you can just press return in answer
to these questions, and DNS will not be used.
.Pp
You will also be asked to specify the host that you want
to transfer the sets from, and the directory on that host
that the files are in. This directory should be mountable
by the machine you are installing on, i.e. correctly
exported to your machine.
.Pp
If you did not set up DNS when answering the questions to
configure networking, you will need to specify an IP number
instead of a hostname for the NFS server.
.It_need
.Em Installation from CD-ROM
.Pp
When installing from a CD-ROM, you will be asked to specify
the device name for your CD-ROM player
.Pq usually Li cd0 ,
and the directory name on the CD-ROM where the distribution files are.
.Pp
.Ic sysinst
will then check if the files are indeed available
in the specified location, and proceed to the actual
extraction of the sets.
.if !ralpha \{\
.It_need
.Em Installation from a floppy set
.Pp
Because the installation sets are too big to fit on one floppy,
the floppies are expected to be filled with the split set
files. The floppies are expected to be in MS-DOS
format. You will be asked for a directory where the sets
should be reassembled. Then you will be prompted to insert
the floppies containing the split sets. This process
will continue until all the sets have been loaded from floppy.
.\}
.It_need
.Em Installation from an unmounted filesystem
.Pp
In order to install from a local filesystem, you will
need to specify the device that the filesystem resides
on
.ie r_pmax .Pq for example Li rz1e
.el .Pq for example Li wd1e
the type of the filesystem,
and the directory on the specified filesystem where the sets are located.
.Ic sysinst
will then check if it
can indeed access the sets at that location.
.It_need
.Em Installation from a local directory
.Pp
This option assumes that you have already done some preparation
yourself. The sets should be located in a directory on a
filesystem that is already accessible.
.Ic sysinst
will ask you
for the name of this directory.
.It_need
.Em Extracting the distribution sets
.Pp
After the install sets containing the
.Nx
distribution
have been made available, you can either extract all the
sets (a full installation), or only extract sets that
you have selected. In the latter case you will be shown the
currently selected sets, and given the opportunity to select
the sets you want. Some sets always need to be installed
.Pq Ic kern, base No and Ic etc
they will not be shown in this selection menu.
.Pp
Before extraction begins, you can elect to watch the files being
extracted; the name of each file that is extracted will be shown.
This can slow down the installation process considerably, especially
on machines with slow graphics consoles or serial consoles.
.Pp
After all the files have been extracted, all the necessary
device node files will be created. If you have already
configured networking, you will be asked if you want to
use this configuration for normal operation. If so, these
values will be installed in the network configuration files.
.It_need
.Em Finalizing your installation.
.Pp
Congratulations, you have successfully installed
.Nx \*V .
You can now reboot the machine, and boot from harddisk.
.El