August 22, 2004 INSTALL 8 NetBSD

NAME

INSTALL - Installation procedure for NetBSD/alpha.

CONTENTS

                                                              

About this Document............................................2 What is NetBSD?................................................3 Changes Between The NetBSD 3.0.2 and 3.0.3 updates.............3 Supported devices...........................................3 Kernel......................................................3 Networking..................................................3 File system.................................................4 Security....................................................4 Miscellaneous...............................................4 alpha specific..............................................4 mac68k specific.............................................4 sparc specific..............................................5 Changes Between The NetBSD 3.0.1 and 3.0.2 updates.............5 Kernel......................................................5 Networking..................................................5 File system.................................................5 Libraries...................................................5 Security....................................................5 Miscellaneous...............................................5 amd64 specific..............................................5 sparc specific..............................................6 mac68k specific.............................................6 Changes Between The NetBSD 3.0 release and 3.0.1 update........6 Kernel......................................................6 Networking..................................................7 File system.................................................7 Libraries...................................................7 Security....................................................7 Miscellaneous...............................................8 acorn26 specific............................................8 amiga specific..............................................8 hp300 specific..............................................8 i386 specific...............................................8 m68k specific...............................................8 mips specific...............................................8 powerpc specific............................................8 sparc specific..............................................9 xen specific................................................9 The Future of NetBSD...........................................9 Sources of NetBSD..............................................9 NetBSD 3.0.3 Release Contents.................................10 NetBSD/alpha subdirectory structure........................11 Bootable installation/upgrade floppies.....................11 Binary distribution sets...................................12 NetBSD/alpha System Requirements and Supported Devices........13 Supported PCI bus devices..................................14 Supported ISA bus devices..................................14 Supported EISA bus devices.................................14 Supported Turbochannel bus devices.........................15 Getting the NetBSD System on to Useful Media..................16 Preparing your System for NetBSD installation.................18 Installing the NetBSD System..................................18 Running the sysinst installation program...................22 Introduction............................................22 Possible PCMCIA issues..................................22 General.................................................23 Quick install...........................................23 Booting NetBSD..........................................24 Network configuration...................................25 Installation drive selection and parameters.............25 Partitioning the disk...................................25 Preparing your hard disk................................26 Getting the distribution sets...........................26 Installation using ftp..................................26 Installation using NFS..................................26 Installation from CD-ROM................................27 Installation from an unmounted file system..............27 Installation from a local directory.....................27 Extracting the distribution sets........................27 Finalizing your installation............................27 Manual and script-assisted installation....................28 Post installation steps.......................................31 Upgrading a previously-installed NetBSD System................34 Compatibility Issues With Previous NetBSD Releases............34 Issues affecting an upgrade from NetBSD 2.1 and older......35 Using online NetBSD documentation.............................35 Administrivia.................................................36 Thanks go to..................................................36 We are........................................................41 Legal Mumbo-Jumbo.............................................47 The End.......................................................53

DESCRIPTION

About this Document

This document describes the installation procedure for NetBSD3.0.3 on the alpha platform. It is available in four different formats titled INSTALL.ext, where .ext is one of .ps, .html, .more, or .txt:

.ps
PostScript.

.html
Standard Internet HTML.

.more
The enhanced text format used on UNIX-like systems by the more(1) and less(1) pager utility programs. This is the format in which the on-line man pages are generally presented.

.txt
Plain old ASCII.

You are reading the HTML version.

What is NetBSD?

The NetBSD Operating System is a fully functional Open Source UNIX-like operating system derived from the University of California, Berkeley Networking Release 2 (Net/2), 4.4BSD-Lite, and 4.4BSD-Lite2 sources. NetBSD runs on fifty four different system architectures (ports), featuring seventeen machine architectures across fifteen distinct CPU families, and is being ported to more. The NetBSD3.0.3 release contains complete binary releases for many different system architectures. (A few ports are not fully supported at this time and are thus not part of the binary distribution. For information on them, please see the NetBSD web site at http://www.NetBSD.org/.)

NetBSD is a completely integrated system. In addition to its highly portable, high performance kernel, NetBSD features a complete set of user utilities, compilers for several languages, the X Window System, firewall software and numerous other tools, all accompanied by full source code.

NetBSD is a creation of the members of the Internet community. Without the unique cooperation and coordination the net makes possible, it's likely that NetBSD wouldn't exist.

Changes Between The NetBSD 3.0.2 and 3.0.3 updates

The NetBSD 3.0.3 update is the third security/critical update of the NetBSD 3.0 release branch. This represents a selected subset of fixes deemed critical in nature for stability or security reasons.

These fixes will also appear in future releases (NetBSD 3.2 etc), together with other less-critical fixes and feature enhancements.

Specific updates are as follows:

Supported devices
Kernel
Networking
File system
Security
Miscellaneous
alpha specific
mac68k specific
sparc specific

Changes Between The NetBSD 3.0.1 and 3.0.2 updates

The NetBSD 3.0.2 update is the second security/critical update of the NetBSD 3.0 release branch. This represents a selected subset of fixes deemed critical in nature for stability or security reasons.

These fixes will also appear in future releases (NetBSD 3.1 etc), together with other less-critical fixes and feature enhancements.

Specific updates are as follows:

Kernel
Networking
File system
Libraries
Security
Miscellaneous
amd64 specific
sparc specific
mac68k specific

Changes Between The NetBSD 3.0 release and 3.0.1 update

The NetBSD 3.0.1 update is the first security/critical update of the NetBSD 3.0 release branch. This represents a selected subset of fixes deemed critical in nature for stability or security reasons.

These fixes will also appear in future releases (NetBSD 3.1 etc), together with other less-critical fixes and feature enhancements.

Specific updates are as follows:

Kernel
Networking
File system
Libraries
Security
Miscellaneous
acorn26 specific
amiga specific
hp300 specific
i386 specific
m68k specific
mips specific
powerpc specific
sparc specific
xen specific

This is the sixth major release of NetBSD for the alpha.

NetBSD 3.0.3 on alpha is, as usual, also fully backward compatible with old NetBSD/alpha binaries, so you don't need to recompile all your local programs.

The Future of NetBSD

The NetBSD Foundation has been incorporated as a non-profit organization. Its purpose is to encourage, foster and promote the free exchange of computer software, namely the NetBSD Operating System. The foundation will allow for many things to be handled more smoothly than could be done with our previous informal organization. In particular, it provides the framework to deal with other parties that wish to become involved in the NetBSD Project.

The NetBSD Foundation will help improve the quality of NetBSD by:

We intend to begin narrowing the time delay between releases. Our ambition is to provide a full release every six to eight months.

We hope to support even more hardware in the future, and we have a rather large number of other ideas about what can be done to improve NetBSD.

We intend to continue our current practice of making the NetBSD-current development source available on a daily basis.

We intend to integrate free, positive changes from whatever sources submit them, providing that they are well thought-out and increase the usability of the system.

Above all, we hope to create a stable and accessible system, and to be responsive to the needs and desires of NetBSD users, because it is for and because of them that NetBSD exists.

Sources of NetBSD

Refer to http://www.NetBSD.org/mirrors/.

NetBSD 3.0.3 Release Contents

The root directory of the NetBSD3.0.3 release is organized as follows:

.../NetBSD-3.0.3/

CHANGES
Changes since earlier NetBSD releases.

LAST_MINUTE
Last minute changes.

MIRRORS
A list of sites that mirror the NetBSD3.0.3 distribution.

README.files
README describing the distribution's contents.

TODO
NetBSD's todo list (also somewhat incomplete and out of date).

patches/
Post-release source code patches.

source/
Source distribution sets; see below.

In addition to the files and directories listed above, there is one directory per architecture, for each of the architectures for which NetBSD3.0.3 has a binary distribution.

The source distribution sets can be found in subdirectories of the source subdirectory of the distribution tree. They contain the complete sources to the system. The source distribution sets are as follows:

gnusrc
This set contains the ``gnu'' sources, including the source for the compiler, assembler, groff, and the other GNU utilities in the binary distribution sets.
79 MB gzipped, 367 MB uncompressed

pkgsrc
This set contains the ``pkgsrc'' sources, which contain the infrastructure to build third-party packages.
24 MB gzipped, 200 MB uncompressed

sharesrc
This set contains the ``share'' sources, which include the sources for the man pages not associated with any particular program; the sources for the typesettable document set; the dictionaries; and more.
5 MB gzipped, 20 MB uncompressed

src
This set contains all of the base NetBSD3.0.3 sources which are not in gnusrc, sharesrc, or syssrc.
37 MB gzipped, 176 MB uncompressed

syssrc
This set contains the sources to the NetBSD3.0.3 kernel for all architectures; config(8); and dbsym(8).
26 MB gzipped, 140 MB uncompressed

xsrc
This set contains the sources to the X Window System.
84 MB gzipped, 450 MB uncompressed

All the above source sets are located in the source/sets subdirectory of the distribution tree.

The source sets are distributed as compressed tar files. Except for the pkgsrc set, which is traditionally unpacked into /usr/pkgsrc, all sets may be unpacked into /usr/src with the command:
       #( cd / ; tar -zxpf - ) < set_name.tgz

In each of the source distribution set directories, there are files which contain the checksums of the files in the directory:

BSDSUM
Historic BSD checksums for the various files in that directory, in the format produced by the command:
cksum -o 1 file.

CKSUM
POSIX checksums for the various files in that directory, in the format produced by the command:
cksum file.

MD5
MD5 digests for the various files in that directory, in the format produced by the command:
cksum-m file.

SYSVSUM
Historic AT&T System V UNIX checksums for the various files in that directory, in the format produced by the command:
cksum -o 2 file.

The MD5 digest is the safest checksum, followed by the POSIX checksum. The other two checksums are provided only to ensure that the widest possible range of system can check the integrity of the release files.

NetBSD/alpha subdirectory structure
The alpha-specific portion of the NetBSD3.0.3 release is found in the alpha subdirectory of the distribution: .../NetBSD-3.0.3/alpha/. It contains the following files and directories:

INSTALL.html
INSTALL.ps
INSTALL.txt
INSTALL.more
Installation notes in various file formats, including this file. The .more file contains underlined text using the more(1) conventions for indicating italic and bold display.
binary/
kernel/
netbsd-GENERIC.gz
A gzipped NetBSD kernel containing code for everything supported in this release.
sets/
alpha binary distribution sets; see below.
installation/
floppy/
alpha boot and installation floppies; see below.
diskimage/
tapeimage/
cdhdtape is included for the case where the installer is written to a CD, hard drive, or tape. This image file is the same for the CD, HD, and tape cases, but a separate tapeimage/ directory exists to hold a copy of the README file and to meet the NetBSD release(7) standard.
instkernel/
contains a netbsd.gz installation kernel; this is the same installer kernel as in all the other install images, but without the various boot program and file system wrappers. It can be netbooted or diskbooted from a previous installation. no need to gunzip this image.
misc/
contains GENERIC.fs, a GENERIC kernel in a bootable file system image. This is used in some unusual installations as described in the next section.
Bootable installation/upgrade floppies

There are three bootable images in the NetBSD alpha distribution. One is for a dual-floppy boot and is split into two separate files. The other is a single-file image containing the same install kernel, but intended to be written to a CD, tape, or hard drive. The third image is a GENERIC kernel intended for production use in unusual cases. This can be useful at some sites when:

Binary distribution sets
The NetBSD alpha binary distribution sets contain the binaries which comprise the NetBSD3.0.3 release for the alpha. The binary distribution sets can be found in the alpha/binary/sets subdirectory of the NetBSD3.0.3 distribution tree, and are as follows:

base
The NetBSD3.0.3 alpha base binary distribution. You must install this distribution set. It contains the base NetBSD utilities that are necessary for the system to run and be minimally functional. It includes shared library support, and excludes everything described below.
21 MB gzipped, 63 MB uncompressed

comp
Things needed for compiling programs. This set includes the system include files (/usr/include) and the various system libraries (except the shared libraries, which are included as part of the base set). This set also includes the manual pages for all of the utilities it contains, as well as the system call and library manual pages.
24 MB gzipped, 101 MB uncompressed

etc
This distribution set contains the system configuration files that reside in /etc and in several other places. This set must be installed if you are installing the system from scratch, but should not be used if you are upgrading.
1 MB gzipped, 1 MB uncompressed

games
This set includes the games and their manual pages.
4 MB gzipped, 8 MB uncompressed

kern-GENERIC
This set contains a NetBSD/alpha 3.0.3 GENERIC kernel, named /netbsd. You must install this distribution set.
4 MB gzipped, 8 MB uncompressed

man
This set includes all of the manual pages for the binaries and other software contained in the base set. Note that it does not include any of the manual pages that are included in the other sets.
8 MB gzipped, 30 MB uncompressed

misc
This set includes the (rather large) system dictionaries, the typesettable document set, and other files from /usr/share.
3 MB gzipped, 9 MB uncompressed

text
This set includes NetBSD's text processing tools, including groff(1), all related programs, and their manual pages.
3 MB gzipped, 8 MB uncompressed

NetBSD maintains its own set of sources for the X Window System in order to assure tight integration and compatibility. These sources are based on XFree86, and tightly track XFree86 releases. They are currently equivalent to XFree86 4.4.0. Binary sets for the X Window System are distributed with NetBSD. The sets are:

xbase
The basic files needed for a complete X client environment. This does not include the X servers.
7 MB gzipped, 22 MB uncompressed

xcomp
The extra libraries and include files needed to compile X source code.
14 MB gzipped, 63 MB uncompressed

xfont
Fonts needed by X.
31 MB gzipped, 39 MB uncompressed

xetc
Configuration files for X which could be locally modified.
0.03 MB gzipped, 0.17 MB uncompressed

xserver
The X server.
6 MB gzipped, 15 MB uncompressed

The alpha binary distribution sets are distributed as gzipped tar files named with the extension .tgz, e.g. base.tgz.

The instructions given for extracting the source sets work equally well for the binary sets, but it is worth noting that if you use that method, the filenames stored in the sets are relative and therefore the files are extracted below the current directory. Therefore, if you want to extract the binaries into your system, i.e. replace the system binaries with them, you have to run the tar -xpf command from the root directory ( / ) of your system. This utility is used only in a Traditional method installation.

Note:
Each directory in the alpha binary distribution also has its own checksum files, just as the source distribution does.

NetBSD/alpha System Requirements and Supported Devices

NetBSD/alpha 3.0.3 runs on most of the DEC Alpha PCI platforms, on all of the TURBOChannel models, on the high end 8200 and 8400 systems, and on the 4100 series.

The SRM console is required. This console can be distinguished from the ARC console (which is used to boot Windows NT) by the fact that it has a command line interface, rather than a menu-driven interface. The SRM prompt is `>>>'.

Some platforms have both the SRM console and the ARC console, and can switch between them, and other platforms have only one type of console loaded at any one time. If your system comes up with the ARC firmware, it may be possible to switch it to SRM with a menu or to download SRM from ftp://gatekeeper.dec.com/pub/Digital/Alpha/firmware/index.html. You may want to buy a firmware update CD from Compaq Computer Corporation.

More information on supported platforms and devices can be found on the alpha port web pages at http://www.NetBSD.org/.

A basic system will fit on a 200 MB disk (including swap) without too much difficulty, but you will probably want at least 500 MB of disk to have any level of comfort.

Although it is actually possible to boot and install NetBSD/alpha in only 16 MB of RAM, you will want to have at least 32 MB. We support add-in devices on the PCI, ISA, EISA and TurboChannel buses. Because NetBSD has an extremely machine-independent device driver system, many device drivers are the same as used in other ports that use the same bus. For example, the de network card driver is shared by the i386 and alpha ports. Some drivers on inspection appear as if they will work on the alpha but have not been tested because that hardware was not available to NetBSD testers; these are marked as UNTESTED below. If you have one of these devices, and it does work, please get in touch with port-alpha-maintainer@NetBSD.org and let us know that it works. If it doesn't work, do the same thing and we can probably fix it pretty easily.

Supported PCI bus devices
Supported ISA bus devices
Supported EISA bus devices
Supported Turbochannel bus devices

Note that some devices, especially ISA-based devices, have to have certain settings set properly for the install and GENERIC kernels to detect them. (Once installed, you can always rebuild your own kernel to detect them anywhere you wish, of course.) Here is a list of such devices and the necessary settings:

Device          Name    Port    IRQ     DRQ     Misc
------          ----    ----    ---     ---     ----
Serial ports    com0    0x3f8   4               [8250/16450/16550/clones]
                com1    0x2f8   3               [8250/16450/16550/clones]
                com2    0x3e8   5               [8250/16450/16550/clones]
                                                                                     

Parallel ports lpt0 0x378 7 [interrupt-driven or polling] lpt1 0x278 [polling only] lpt2 0x3bc [polling only]

AHA-174x SCSI host adapters (in enhanced mode) ahb0 any any any

AHA-2X4X or AIC-7xxx-based SCSI host adapters ahc0 any any any

Bus Logic BT445, BT74x, or BT9xx SCSI host adapters bha0 0x330 any any bha1 0x334 any any

MFM/ESDI/IDE/RLL hard disk controllers wdc0 0x1f0 14 [supports two devices] wdc1 0x170 15 [supports two devices]

ATA disks wd0, wd1, ... SCSI disks sd0, sd1, ... SCSI tapes st0, st1, ... SCSI and ATAPI CD-ROMs cd0, cd1, ... For each SCSI and IDE controller found, the SCSI or ATA(PI) devices present on the bus are probed in increasing ID order for SCSI and master/slave order for ATA(PI). So the first SCSI drive found will be called sd0, the second sd1, and so on ...

3COM 3x59X or 3COM 3x90X PCI Ethernet boards ep0 any any [you must assign an interrupt in your PCI BIOS, or let it do so for you]

Intel EtherExpress 100 Fast Ethernet adapters fxp0 any any [you must assign an interrupt in your PCI BIOS, or let it do so for you]

DEC DE200,201,202 EtherWORKS II/Turbo ISA Ethernet boards le? 0x3005memory at D0000-DFFFF le? 0x20010memory at D8000-DFFFF

You should enter the following SRM console command to enable the le device: >>> isacfg -mk -slot ? -dev 0 -handle DE200-LE -irq0 5 -membase0 d0000 -memlen0 10000 -iobase0 300 -etyp 1 -enadev 1

DEC DE203,204,205 EtherWORKS III ISA Ethernet boards lc0 0x300any lc1 0x320any

You should enter the following SRM console command to enable the device: >>> add_de205


Getting the NetBSD System on to Useful Media

Note that if you are installing or upgrading from a writable media, the media can be write-protected if you wish. These systems mount a root image from inside the kernel, and will not need to write to the media. If you booted from a floppy, the floppy disk may be removed from the drive after the system has booted.

Installation is supported from several media types, including:

The steps necessary to prepare the distribution sets for installation depend upon which installation medium you choose. The steps for the various media are outlined below.

CD-ROM / DVD
Find out where the distribution set files are on the CD-ROM or DVD. Likely locations are binary/sets and alpha/binary/sets.

Proceed to the instruction on installation.

MS-DOS floppy
NetBSD doesn't include split sets to keep the distribution size down. They can be created on a seperate machine using the split(1) command, running e.g. split -b 235k base.tgz base. to split the base.tgz file from alpha/binary/sets into files named base.aa, base.ab, and so on. Repeat this for all set_name.tgz files, splitting them into set_name.xx files. Count the number of set_name.xx files that make up the distribution sets you want to install or upgrade. You will need one sixth that number of 1.44 MB floppies.

Format all of the floppies with MS-DOS. Do not make any of them bootable MS-DOS floppies, i.e. don't use format /s to format them. (If the floppies are bootable, then the MS-DOS system files that make them bootable will take up some space, and you won't be able to fit the distribution set parts on the disks.) If you're using floppies that are formatted for MS-DOS by their manufacturers, they probably aren't bootable, and you can use them out of the box.

Place all of the set_name.xx files on the MS-DOS disks.

Once you have the files on MS-DOS disks, you can proceed to the next step in the installation or upgrade process. If you're installing NetBSD from scratch, go to the section on preparing your hard disk, below. If you're upgrading an existing installation, go directly to the section on upgrading.

FTP
The preparations for this installation/upgrade method are easy; all you need to do is make sure that there's an FTP site from which you can retrieve the NetBSD distribution when you're about to install or upgrade. If you don't have DHCP available on your network, you will need to know the numeric IP address of that site, and, if it's not on a network directly connected to the machine on which you're installing or upgrading NetBSD, you need to know the numeric IP address of the router closest to the NetBSD machine. Finally, you need to know the numeric IP address of the NetBSD machine itself. If you don't have access to a functioning nameserver during installation, the IPv4 address of ftp.NetBSD.org is 204.152.184.75 and the IPv6 address is 2001:4f8:4:7:2e0:81ff:fe21:6563 (as of June, 2004).

Once you have this information, you can proceed to the next step in the installation or upgrade process. If you're installing NetBSD from scratch, go to the section on preparing your hard disk, below. If you're upgrading an existing installation, go directly to the section on upgrading.

Note:
This method of installation is recommended for those familiar with using BSD network configuration and management commands. If you aren't, this documentation should help, but is not intended to be all-encompassing.

NFS
Place the NetBSD distribution sets you wish to install into a directory on an NFS server, and make that directory mountable by the machine on which you are installing or upgrading NetBSD. This will probably require modifying the /etc/exports file on of the NFS server and resetting its mount daemon (mountd). (Both of these actions will probably require superuser privileges on the server.)

You need to know the numeric IP address of the NFS server, and, if you don't have DHCP available on your network and the server is not on a network directly connected to the machine on which you're installing or upgrading NetBSD, you need to know the numeric IP address of the router closest to the NetBSD machine. Finally, you need to know the numeric IP address of the NetBSD machine itself.

Once the NFS server is set up properly and you have the information mentioned above, you can proceed to the next step in the installation or upgrade process. If you're installing NetBSD from scratch, go to the section on preparing your hard disk, below. If you're upgrading an existing installation, go directly to the section on upgrading.

Note:
This method of installation is recommended for those already familiar with using BSD network configuration and management commands. If you aren't, this documentation should help, but is not intended to be all-encompassing.

Tape
To install NetBSD from a tape, you need to make a tape that contains the distribution set files, in `tar' format.

If you're making the tape on a UNIX-like system, the easiest way to do so is probably something like:

       # tar -cf tape_device dist_directories

where tape_device is the name of the tape device that describes the tape drive you're using; possibly /dev/rst0, or something similar, but it will vary from system to system. (If you can't figure it out, ask your system administrator.) In the above example, dist_directories are the distribution sets' directories, for the distribution sets you wish to place on the tape. For instance, to put the misc, base, and etc distributions on tape (in order to do the absolute minimum installation to a new disk), you would do the following:


       # cd .../NetBSD-3.0.3
       # cd alpha/binary
       # tar -cf tape_device misc etc kern

Note:
You still need to fill in tape_device in the example.

Once you have the files on the tape, you can proceed to the next step in the installation or upgrade process. If you're installing NetBSD from scratch, go to the section on preparing your hard disk, below. If you're upgrading an existing installation, go directly to the section on upgrading.


Preparing your System for NetBSD installation

If you have any data on your disks that you want to keep, back it up before starting. Note that NetBSD/alpha does not support booting more than one operating system from a single disk, although it's fine to have multiple operating systems on your machine if you have a separate disk for NetBSD, or if one of them uses a network boot.

Installing the NetBSD System

Installation of NetBSD/alpha is now easier than ever! For the latest news, problem reports, and discussion, join the port-alpha mailing list by mailing a line saying

       subscribe port-alpha

to majordomo@NetBSD.org. Also, see http://www.NetBSD.org/ for more information.

If you encounter any problems, please report them via the mailing list or the send-pr(1) program so that they can be fixed for the next release.

To install or upgrade NetBSD, you need to first boot an installation program and then interact with the screen-menu program sysinst. The installation program actually consists of the NetBSD kernel plus an in-memory file system of utility programs.

The usual procedure is to write the installation system to a floppy disk set and then boot from the floppies, however, there are now six ways to boot the NetBSD/alpha installation system! Each approach loads the exact same installation bits. The six paths are:

In all cases, you need to transfer a bootable image of the installation system from the NetBSD CD or from an ftp site to the chosen media type. Although booting from floppy is the usual path, the hard drive boot is useful if you have another operating system (and a spare drive) already installed, or if you don't mind swapping hard drives from box to box. CD and tape boots are nice and fast if you have a CD writer or a tape format in common with another previously installed UNIX-like system. Finally, most versions of SRM can locate the NetBSD boot program netboot via bootp and download it via tftp, netboot then mounts the root file system (/) via NFS and loads the kernel.

Note that if you are installing or upgrading from a writable media, the media can be write-protected if you wish. These systems mount a root image from inside the kernel, and will not need to write to the media. If you booted from a floppy, the floppy disk may be removed from the drive after the system has booted.

Running the sysinst installation program

  1. Introduction

    Using sysinst, installing NetBSD 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 for the sake of completeness. Do not let this discourage you; the install program is not hard to use.

  2. Possible PCMCIA issues

    Machines with PCMCIA slots may have problems during installation. If you do not have PCMCIA on your machine (PCMCIA is only really used on laptop machines), you can skip this section, and ignore the ``[PCMCIA]'' notes. If you do have PCMCIA in your machine, you can safely ignore this section and the ``[PCMCIA]'' the first time, as you are likely to not have problems. Should troubles occur during floppy boot, they may be PCMCIA specific. You should then re-read this section and try again, following the instructions in the ``[PCMCIA]'' notes.

    This section explains how to work around the installation problem.

    The kernel keeps careful track of what interrupts and I/O ports are in use during autoconfiguration. It then allows the PCMCIA devices to pick unused interrupts and I/O ports. Unfortunately, the INSTALL kernel may not detect all devices in your system. This may be because the INSTALL kernel only supports the minimum set of devices to install NetBSD on your system, or it may be that NetBSD does not have support for the device causing the conflict.

    For example, suppose your laptop has a soundblaster device built in; the INSTALL kernel has no sound support. The PCMCIA code might allocate your soundblaster's IRQ and I/O ports to PCMCIA devices, causing them not to work, or to lock up the system. This is especially bad if one of the devices in question is your ethernet card.

    The kernel attempts to probe for available interrupts that are usable by the PCIC (PCMCIA interrupt controller), which should alleviate interrupt conflicts; however, I/O port conflicts are still possible.

    This problem will impact some, but not all, users of PCMCIA. If this problem is affecting you, watch the ``[PCMCIA]'' notes that will appear in this document.

  3. General

    The following is a walk-through of the steps you will take while getting NetBSD installed on your hard disk. 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 (``[ ]'') after the question. If you wish to stop the installation, you may press CONTROL-C at any time, but if you do, you'll have to begin the installation process again from scratch by running the /sysinst program from the command prompt. It is not necessary to reboot.

  4. Quick install

    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 the next section. This section describes a basic installation, using a CD-ROM install as an example.

  5. Booting NetBSD

    [PCMCIA
    ] Unplug your PCMCIA devices, so that they won't be found by NetBSD.

    Boot your machine. The boot loader will start, and will print a countdown and begin booting.

    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.

    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 NetBSD will be probing your system to discover which hardware devices are installed. The most important thing to know is that wd0 is NetBSD's name for your first IDE disk, wd1 the second, etc. sd0 is your first SCSI disk, sd1 the second, etc.

    Note that once the system has finished booting, you need not leave the floppy in the disk drive.

    Once NetBSD 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.

  6. Network configuration

    [PCMCIA
    ] You can skip this section, as you will only get data from floppy in the first part of the install.

    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 Utility menu, and select the 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 the Domain Name System (DNS), you can give an empty response in reply to answers relating to this.

  7. Installation drive selection and parameters

    To start the installation, select Install NetBSD to hard disk from the main menu.

    The first thing is to identify the disk on which you want to install NetBSD. 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 wd0, wd1, sd0 or sd1.

  8. Partitioning the disk

  9. Editing the NetBSD disklabel

    The partition table of the NetBSD part of a disk is called a disklabel. There are 4 layouts for the NetBSD part of the disk that you can pick from: Standard, Standard with X, Custom and Use Existing. The first two use a set of default values (that you can change) suitable for a normal installation, possibly including X. With the Custom option you can specify everything yourself. The last option uses the partition info already present on the disk.

    You will be presented with the current layout of the NetBSD 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 NetBSD uses for normal file storage is called 4.2BSD. A swap partition has a special type called swap. Some partitions in the disklabel have a fixed purpose.

    a
    Root partition (/)

    b
    Swap partition.

    c
    The NetBSD portion of the disk.

    d-h
    Available for other use. Traditionally, d is the partition mounted on /usr, but this is historical practice and not a fixed value.

    You will then be asked to name your disk's disklabel. The default response will be ok for most purposes. 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.

  10. Preparing your hard disk

    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 NetBSD, your hard drive will be modified. If you are sure you want to proceed, enter yes at the prompt.

    The install program will now label your disk and make the file systems you specified. The file systems will be initialized to contain NetBSD 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.

  11. Getting the distribution sets

    The NetBSD distribution consists of a number of 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.

    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 the section labeled `Extracting the distribution sets'.

  12. Installation using ftp

    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. sysinst will do this for you, asking you if you want to use DHCP, and if not to provide data like IP address, 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.

    You will also be asked to specify the host that you want to transfer the sets from, the directory on that host, the account name and password used to log into that host using ftp, and optionally a proxy server to use. If you did not set up DNS when answering the questions to configure networking, you will need to specify an IP address instead of a hostname for the ftp server.

    sysinst will proceed to transfer all the default set files from the remote site to your hard disk.

  13. Installation using NFS

    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. sysinst will do this for you, asking you if you want to use DHCP, and if not to provide data like IP address, 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.

    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.

    If you did not set up DNS when answering the questions to configure networking, you will need to specify an IP address instead of a hostname for the NFS server.

  14. Installation from CD-ROM

    When installing from a CD-ROM, you will be asked to specify the device name for your CD-ROM player (usually cd0), and the directory name on the CD-ROM where the distribution files are.

    sysinst will then check if the files are indeed available in the specified location, and proceed to the actual extraction of the sets.

  15. Installation from an unmounted file system

    In order to install from a local file system, you will need to specify the device that the file system resides on (for example sd1e) the type of the file system, and the directory on the specified file system where the sets are located. sysinst will then check if it can indeed access the sets at that location.

  16. Installation from a local directory

    This option assumes that you have already done some preparation yourself. The sets should be located in a directory on a file system that is already accessible. sysinst will ask you for the name of this directory.

  17. Extracting the distribution sets

    After the install sets containing the NetBSD 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 (kern, base) and etc they will not be shown in this selection menu.

    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.

    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. The next menu will allow you to select the time zone that you're in, to make sure your clock has the right offset from UTC. Finally you will be asked to select a password encryption algorithm and can than set a password for the "root" account, to prevent the machine coming up without access restrictions.

  18. Finalizing your installation

    Congratulations, you have successfully installed NetBSD3.0.3. You can now reboot the machine, and boot NetBSD from hard disk.

Manual and script-assisted installation
All of the installation procedures consist of putting a label on the disk to provide information on the sizes and placement of the partitions into which the disk is divided, putting the boot blocks on the disk, creating the file systems on the partitions, and unpacking the distribution tar archives.

  1. Disk prep: label, boot block, and file system setup

    A.
    Manual Install from the Shell Prompt

    The normal installation involves running the install shell script and interactively configuring the file systems, and then simply unpacking the tar files into these followed by running MAKEDEV.

    However, as stated above it is also possible to do the installation yourself from the shell, and in any case it is helpful to understand what the install script does. The procedure is:

    • create /etc/disktab, see disktab(5)
    • run disklabel(8),
    • run newfs(8)
    • mount(8) the new root on /mnt
    • cd to /usr/mdec and run installboot(8)

    If you are reviewing man pages on NetBSD platforms other than alpha, be sure that when reading installboot(8) you read the alpha version by typing:

           # man 8 alpha/installboot

    At this point you need only unpack the distribution sets by running tar(1) as described below.

    B.
    /install and /upgrade traditional installation scripts

    The install and upgrade scripts are still there, so by exiting the sysinst program you can type install or upgrade at the shell prompt and run them as you did in the good old days.

    You may install on either a SCSI or an IDE disk; you will be prompted for the disk to install on. The disks in your system will be numbered starting at xd0 (where x is an `s' for SCSI disks, `w' for IDE disks) based on the SCSI-ID or IDE drive order; if you have more than one disk, watch the boot messages carefully to see which ones are probed as which numbers.

    Once you've selected a disk to install on, you'll be prompted for the geometry. This is also displayed in the boot messages, and you'll be given a chance to review the boot messages again to get the exact figures for the number of cylinders, heads and sectors.

    After this you must specify the size of your partitions. Generally you'll be giving the sizes in cylinders; the install program will tell you how many bytes there are in each cylinder.

    The swap partition is the second thing you specify, after the / (root) partition. Regardless of the size of your disk, you'll want to specify a swap partition that's at least as large as the amount of RAM you have, and probably not less than 64 MB in any case.

    If you have a small disk (under 500 MB), it's probably best to devote all of the disk (excepting 64 MB or more for the swap) to the / (root) partition.

    If you have more space, we recommend devoting at least 32 MB, and preferably 48 MB, to the / (root) partition. /usr will need 150 MB or so if you're not installing X, 200 MB or so if you are. A typical organization is 50 MB for / (root), 150-250 MB for swap, and the remaining space for /usr. With enough swap space configured, you can make /tmp a nice, fast mfs. See mount_mfs(8), and note that the mfs will require swap space for the largest planned amount of /tmp storage. It doesn't return space when files are deleted, but just keeps it its own freelist so the swap space required is equal to the highwater mark of /tmp use, plus space required to back up main memory and store inactive images.

    Once you've specified this information, the install script will write the disklabel, install boot blocks to make the disk bootable, initialise the file systems, and mount them all under /mnt. You are now ready to go on to the next step.

  2. Configuration: arranging access to the distribution sets

    After doing the disk and file system setup with either shell commands or the script assist, you then need only unpack the distribution sets with the tar(1) command. To do this you will need access from the target host to the tar files that contain the operating system in order to extract them to your disk. This is done via an NFS or FTP transfer over a network, via a CD-ROM archive, a tape archive, or by preloading an accessible hard drive with the necessary tar files.

  3. Unpack distribution sets: Extracting the Operating System Files

    Change to the root directory of your hard drive (which is /mnt if you've used the standard install script to this point) by typing


           # cd /mnt

    For this and the following commands, replace /mnt/usr/release/ with the path to your NFS volume or CD-ROM if that's how you chose to access your install files instead.

    The sets and kernel are extracted with:


           # cd /mnt
           # for i in base kern comp etc games man misc text; do
           tar -zxpf /mnt/usr/release/$i.tgz;
           # done

    or perhaps:


           # cd /mnt
           # for i in /mnt/usr/release/*.tgz; do
           echo $i
           tar -zxpf $i
           # done

    Now make the device nodes:


           # cd /mnt/dev
           # sh ./MAKEDEV all

  4. Restart your system

    Unmount the file systems and halt. The exact instructions to type here will depend on the file systems you created, but typically the commands are:


           # cd /
           # umount /mnt/usr
           # umount /mnt
           # sync
           (sync)is not strictly necessary but it is traditional
           # halt

    You should now be at the SRM console's >>> prompt and can reboot into the new configuration (possibly after an optional power cycle) with a command such as:


           >>> boot dka0

    This command might be: boot dka100 if your drive is on ID 1. You can usually use show device to see a full list of bootable devices in your system. Your system will come up in single-user mode, ready for you to configure it.

You can create the floppy needed for installation under MS-DOS or Windows. Supposing your 1.44 MB floppy drive is drive A:, and your CD is drive E:, do the following from an MS-DOS command prompt:


       e:
       cd \NetBSD-3.0.3\installation\misc
       rawrite

When asked for a source filename, answer


       ...\floppy\disk1of2

When asked for a destination drive answer


       a

(Repeat the procedure for installation/floppy/disk2of2.)

Post installation steps

Once you've got the operating system running, there are a few things you need to do in order to bring the system into a properly configured state, with the most important ones described below.

  1. Configuring /etc/rc.conf

    If you or the installation software haven't done any configuration of /etc/rc.conf (sysinst usually will), the system will drop you into single user mode on first reboot with the message

           /etc/rc.conf is not configured. Multiuser boot aborted.

    and with the root file system (/) mounted read-only. When the system asks you to choose a shell, simply press RETURN to get to a /bin/sh prompt. If you are asked for a terminal type, respond with vt220 (or whatever is appropriate for your terminal type) and press RETURN. You may need to type one of the following commands to get your delete key to work properly, depending on your keyboard:
           # stty erase '^h'
           # stty erase '^?'
    At this point, you need to configure at least one file in the /etc directory. You will need to mount your root file system read/write with:
           # /sbin/mount -u -w /
    Change to the /etc directory and take a look at the /etc/rc.conf file. Modify it to your tastes, making sure that you set rc_configured=YES so that your changes will be enabled and a multi-user boot can proceed. Default values for the various programs can be found in /etc/defaults/rc.conf, where some in-line documentation may be found. More complete documentation can be found in rc.conf(5).

    If your /usr directory is on a separate partition and you do not know how to use ed, you will have to mount your /usr partition to gain access to ex or vi. Do the following:


           # mount /usr
           # export TERM=vt220

    If you have /var on a separate partition, you need to repeat that step for it. After that, you can edit /etc/rc.conf with vi(1). When you have finished, type exit at the prompt to leave the single-user shell and continue with the multi-user boot.

    Other values that need to be set in /etc/rc.conf for a networked environment are hostname and possibly defaultroute, furthermore add an ifconfig_int for your <int> network interface, along the lines of


           ifconfig_de0="inet 123.45.67.89 netmask 255.255.255.0"

    or, if you have myname.my.dom in /etc/hosts:


           ifconfig_de0="inet myname.my.dom netmask 255.255.255.0"

    To enable proper hostname resolution, you will also want to add an /etc/resolv.conf file or (if you are feeling a little more adventurous) run named(8). See resolv.conf(5) or named(8) for more information. Instead of manually configuring network and naming service, DHCP can be used by setting dhclient=YES in /etc/rc.conf.

    Other files in /etc that may require modification or setting up include /etc/mailer.conf, /etc/nsswitch.conf, and /etc/wscons.conf.

  2. Logging in

    After reboot, you can log in as root at the login prompt. Unless you've set a password in sysinst, there is no initial password. If you're using the machine in a networked environment, you should create an account for yourself (see below) and protect it and the ``root'' account with good passwords. By default, root login from the network is disabled (even via ssh(1)). One way to become root over the network is to log in as a different user that belongs to group ``wheel'' (see group(5)) and use su(1) to become root.

    Unless you have connected an unusual terminal device as the console you can just press RETURN when it prompts for Terminal type? [...].

  3. Adding accounts

    Use the useradd(8) command to add accounts to your system. Do not edit /etc/passwd directly! See vipw(8) and pwd_mkdb(8) if you want to edit the password database.

  4. The X Window System

    If you have installed the X Window System, look at the files in /usr/X11R6/lib/X11/doc for information.

    Don't forget to add /usr/X11R6/bin to your path in your shell's dot file so that you have access to the X binaries.

  5. Installing third party packages

    If you wish to install any of the software freely available for UNIX-like systems you are strongly advised to first check the NetBSD package system. This automatically handles any changes necessary to make the software run on NetBSD, retrieval and installation of any other packages on which the software may depend, and simplifies installation (and deinstallation), both from source and precompiled binaries.

  6. Misc

Upgrading a previously-installed NetBSD System

The upgrade to NetBSD3.0.3 is a binary upgrade; it can be quite difficult to update the system from an earlier version by recompiling from source, primarily due to interdependencies in the various components.

To do the upgrade, you must have the boot floppy set available. You must also have at least the base and kern binary distribution sets available, so that you can upgrade with them, using one of the upgrade methods described above. Finally, you must have sufficient disk space available to install the new binaries. Since files already installed on the system are overwritten in place, you only need additional free space for files which weren't previously installed or to account for growth of the sets between releases. If you have a few megabytes free on each of your root (/) and /usr partitions, you should have enough space.

Since upgrading involves replacing the kernel, the boot blocks on your NetBSD partition, and most of the system binaries, it has the potential to cause data loss. You are strongly advised to back up any important data on the NetBSD partition or on another operating system's partition on your disk before beginning the upgrade process.

The upgrade procedure using the sysinst tool is similar to an installation, but without the hard disk partitioning. sysinst will attempt to merge the settings stored in your /etc directory with the new version of NetBSD. Getting the binary sets is done in the same manner as the installation procedure; refer to the installation part of the document for how to do this. Also, some sanity checks are done, i.e. file systems are checked before unpacking the sets.

After a new kernel has been copied to your hard disk, your machine is a complete NetBSD3.0.3 system. However, that doesn't mean that you're finished with the upgrade process. You will probably want to update the set of device nodes you have in /dev. If you've changed the contents of /dev by hand, you will need to be careful about this, but if not, you can just cd into /dev, and run the command:

       # sh MAKEDEV all

Finally, you will want to delete old binaries that were part of the version of NetBSD that you upgraded from and have since been removed from the NetBSD distribution.

Compatibility Issues With Previous NetBSD Releases

Users upgrading from previous versions of NetBSD may wish to bear the following problems and compatibility issues in mind when upgrading to NetBSD3.0.3.

Issues affecting an upgrade from NetBSD 2.1 and older releases.
It is very important that you populate the directory /etc/pam.d with appropriate configuration files for the Pluggable Authentication Modules (PAM) because you will not be able to login any more otherwise. Using postinstall as described below will take care of this. Please refer to http://www.netbsd.org/guide/en/chap-pam.html for documentation about PAM.

The following issues can generally be resolved by extracting the etc set into a temporary directory and running postinstall:

postinstall -s /path/to/etc.tgz check
postinstall -s /path/to/etc.tgz fix

Issues fixed by postinstall: