version 1.9, 1995/11/29 23:51:27 |
version 1.9.4.2, 1997/03/13 00:49:29 |
|
|
Installing NetBSD is a relatively complex process, but if you have |
Installing NetBSD is a relatively complex process, but if you have |
this document in hand it shouldn't be too much trouble. |
this document in hand it shouldn't be too much trouble. |
|
|
There are several ways to install NetBSD onto a disk. If your Sparcstation |
There are several ways to install NetBSD onto a disk. The easiest way |
is hooked up in a network you can find find a server and arrange for a |
in terms of preliminary setup is to use the NetBSD miniroot that can |
diskless setup which is a convenient way to install on a machine with |
be booted off your local disk's swap partition. Alternatively, if your |
a single disk attached. Alternatively, you could use SunOS (booted from |
Sparcstation is hooked up in a network you can find a server and arrange |
a local disk) and install NetBSD onto a second disk. For the latter method, |
for a diskless setup which is a convenient way to install on a machine |
skip to the section "Installing from SunOS" below. |
whose disk does not currently hold a usable operating system (see the |
|
section `Installing using a diskless setup' below). |
|
|
|
|
|
Installing using the NetBSD miniroot. |
|
|
|
The miniroot is a self-contained NetBSD filesystem holding all utilities |
|
necessary to install NetBSD on a local disk. It is distributed as a plain |
|
file designed to be transferred to a raw disk partition from which it can |
|
be booted using the appropriate PROM command. Usually, the miniroot will |
|
be loaded into the swap partition of a disk. If needed, you can use any |
|
other unused partition, but remember that the partition will then not |
|
available during the installation process. |
|
|
|
Loading the miniroot onto your raw partition is simple. On NetBSD as well |
|
as SunOS you use a command like: |
|
|
|
# dd if=miniroot-12.fs of=/dev/rsd0b bs=20b conv=sync |
|
|
|
(here `/dev/rsd0b' is assumed to be your swap partition). There's a |
|
potential problem here if /dev/rsd0b is actually in use as a swap |
|
partition by your currently running system. If you don't have another |
|
disk or partition to spare, you can usually get away with running this |
|
command anyway after first booting into single-user mode to ensure a |
|
quiet system. |
|
|
|
After transferring the miniroot to disk, bring the system down by: |
|
|
|
# halt |
|
|
|
Then boot the miniroot by typing the appropriate command at the PROM: |
|
|
|
> b sd(,,1)netbsd -s # for sun4 monitors |
|
ok boot sd(,,1)netbsd -s # for version 1 OpenBOOT ROMs |
|
ok boot disk:b netbsd -s # for version 2 OpenBOOT ROMs |
|
|
|
If you've loaded the miniroot onto some other disk than `sd0' adapt |
|
the boot specifier accordingly, e.g.: |
|
|
|
ok boot disk1:b netbsd -s |
|
|
|
to boot from SCSI disk target 1 from a version 2 OpenBOOT ROM. |
|
|
|
This will cause the kernel contained in the miniroot to be booted. |
|
After the initial probe messages you'll asked to start the install |
|
or upgrade procedure. Proceed to the section `Running the installation |
|
scripts' below. |
|
|
|
|
Installing using a diskless setup. |
Installing using a diskless setup. |
Line 19 documentation that came with it (on SunO |
|
Line 65 documentation that came with it (on SunO |
|
good start). |
good start). |
|
|
Your Sparcstation expects to be able to download a second stage bootstrap |
Your Sparcstation expects to be able to download a second stage bootstrap |
program via TFTP after havinf acquired its IP address through RevARP when |
program via TFTP after having acquired its IP address through RevARP when |
instructed to boot "over the net". It will look for a filename composed of |
instructed to boot "over the net". It will look for a filename composed of |
the machine's IP address followed by the machine's architecture, separated |
the machine's IP address followed by the machine's architecture, separated |
by a period. For example, a sun4c machine which has been assigned IP |
by a period. For example, a sun4c machine which has been assigned IP |
address 130.115.144.11, will make an TFTP request for `8273900B.SUN4C'. |
address 130.115.144.11, will make an TFTP request for `8273900B.SUN4C'. |
Normally, this file is symbolic link to an appropriate second-stage |
Normally, this file is a symbolic link to an appropriate second-stage |
boot program, which should be located in a place where the TFTP daemon |
boot program, which should be located in a place where the TFTP daemon |
can find it (remember, many TFTP daemons run in a chroot'ed environment). |
can find it (remember, many TFTP daemons run in a chroot'ed environment). |
You can find the boot program in `/usr/mdec/boot' in the NetBSD/sparc |
You can find the boot program in `/usr/mdec/boot' in the NetBSD/sparc |
Line 46 Here's an example to illustrate this who |
|
Line 92 Here's an example to illustrate this who |
|
server# cd /tftpboot |
server# cd /tftpboot |
server# ln -s boot.sparc.netbsd.$KARCH 8273900B.$KARCH |
server# ln -s boot.sparc.netbsd.$KARCH 8273900B.$KARCH |
|
|
Note: some versions of Openboot ROMs (sun4c) seem to require that the |
Note: some versions of Openboot ROMs (sun4c/sun4m) seem to require that the |
boot program size is nicely rounded. Therefore it may be necessary to |
boot program size is nicely rounded. Therefore it may be necessary to |
strip(8) off the symbol table. |
strip(8) off the symbol table. |
|
|
|
After the boot program has been loaded into memory and given control by |
|
the PROM, it starts locating the machine's remote root directory through |
|
the BOOTPARAM protocol. First a BOOTPARAM WHOAMI request is broadcast |
|
on the local net. The answer to this request (if it comes in) contains |
|
the client's name. This name is used in next step, a BOOTPARAM GETFILE |
|
request -- sent to the server that responded to the WHOAMI request -- |
|
requesting the name and address of the machine that will serve the client's |
|
root directory, as well as the path of the client's root on that server. |
|
|
|
Finally, this information (if it comes in) is used to issue a REMOTE MOUNT |
|
request to the client's root filesystem server, asking for an NFS file |
|
handle corresponding to the root filesystem. If successful, the boot |
|
program starts reading from the remote root filesystem in search of the |
|
kernel which is then read into memory. |
|
|
|
|
As noted above in the section `Preparing your System for NetBSD Installation', |
As noted above in the section `Preparing your System for NetBSD Installation', |
you have several options when choosing a location to store the installation |
you have several options when choosing a location to store the installation |
Line 86 and run the MAKEDEV script: `sh MAKEDEV |
|
Line 147 and run the MAKEDEV script: `sh MAKEDEV |
|
On SunOS 5.x systems, MAKEDEV can also be used, but there'll be error |
On SunOS 5.x systems, MAKEDEV can also be used, but there'll be error |
messages about unknown user and groups. These errors are inconsequential |
messages about unknown user and groups. These errors are inconsequential |
for the purpose of installing NetBSD. However, you may want to correct them |
for the purpose of installing NetBSD. However, you may want to correct them |
if you plan to the diskless setup regularly. In that case, you may re-run |
if you plan to use the diskless setup regularly. In that case, you may re-run |
MAKEDEV on your NetBSD machine once it has booted. |
MAKEDEV on your NetBSD machine once it has booted. |
|
|
Boot your workstation from the server by entering the appropriate `boot' |
Boot your workstation from the server by entering the appropriate `boot' |
Line 119 the disk you want to install NetBSD onto |
|
Line 180 the disk you want to install NetBSD onto |
|
disklabels, so if your disk was previously used by SunOS there will be |
disklabels, so if your disk was previously used by SunOS there will be |
a usable label on it. Use `disklabel -e <disk>' (where <disk> is the |
a usable label on it. Use `disklabel -e <disk>' (where <disk> is the |
device name assigned by the NetBSD kernel, e.g. `sd0') to view and |
device name assigned by the NetBSD kernel, e.g. `sd0') to view and |
modify the partition sizes. A comfortable size for the root filesystem |
modify the partition sizes. See the section `Preparing your System for |
partition is about 20MB; a good initial size for the swap partition is |
NetBSD Installation' above for suggestions about disk partition sizes. |
twice the amount of physical memory in your machine (though, unlike |
Make sure all your partitions start and end on cylinder boundaries. |
SunOS 4.x, there are no restrictions on the size of the swap partition |
|
that would render part of your memory unusable). A full binary installation |
|
takes about 60MB in `/usr'. Make all your partitions start and end on |
|
cylinder boundaries. |
|
|
|
NOTE: if you are installing on a SCSI disk that does *not* have a SunOS |
NOTE: if you are installing on a SCSI disk that does *not* have a SunOS |
or NetBSD label on it, you may still be able to use disklabel(8) but you'll |
or NetBSD label on it, you may still be able to use disklabel(8) but you'll |
have to create all partitions from scratch. If your disk is listed in |
have to create all partitions from scratch. If your disk is listed in |
`/etc/disktab', you may use the entry (which in most cases only defines |
`/etc/disktab', you may use the entry (which in most cases only defines |
a `c' partition to describe the whole disk) to put an initial label on |
a `c' partition to describe the whole disk) to put an initial label on |
the disk. |
the disk. DO NOT USE `disklabel -r ...' TO INITIALIZE YOUR DISK LABEL; |
|
THIS WILL LEAD TO UNPREDICTABLE RESULTS. This deficiency will be fixed |
|
in a next release. |
|
|
Here follows an example of what you'll see while in the dislabel editor. |
Here follows an example of what you'll see while in the dislabel editor. |
Do not touch any of the parameters except for the `label: ' entry and |
Do not touch any of the parameters except for the `label: ' entry and |
Line 143 The size and offset fields are given in |
|
Line 202 The size and offset fields are given in |
|
these numbers multiples of the of the number of sectors per cylinder: |
these numbers multiples of the of the number of sectors per cylinder: |
the kernel might be picky about these things, but aside from this you'll |
the kernel might be picky about these things, but aside from this you'll |
have the least chance of wasting disk space. |
have the least chance of wasting disk space. |
Partitions on which you intend to have a a mountable filesystem, should |
Partitions on which you intend to have a mountable filesystem, should |
be given fstype `4.2BSD'. Remember, the `c' partition should describe |
be given fstype `4.2BSD'. Remember, the `c' partition should describe |
the whole disk. |
the whole disk. |
The `(Cyl. x - y)' info that appears after the hash (`#') character is |
The `(Cyl. x - y)' info that appears after the hash (`#') character is |
Line 193 else, start the installation script: |
|
Line 252 else, start the installation script: |
|
netbsd# sh install.sh |
netbsd# sh install.sh |
|
|
|
|
These scripts will do most of the work of transferring the system from the |
Running the installation scripts. |
tar files onto your disk. You will frequently be asked for confirmation |
|
before the script proceeds with each phase of the installation process. |
The installation scripts will do most of the work of transferring the |
|
system from the distribution sets onto your disk. You will frequently be |
|
asked for confirmation before the script proceeds with each phase of the |
|
installation process. |
|
|
Occasionally, you'll have to provide a piece of information such as the |
Occasionally, you'll have to provide a piece of information such as the |
name of the disk you want to install on or IP addresses and domain names |
name of the disk you want to install on or IP addresses and domain names |
you want to assign. If your system has more than one disk, you may want |
you want to assign. If your system has more than one disk, you may want |
Line 212 The installation script goes through the |
|
Line 275 The installation script goes through the |
|
- installation of boot programs |
- installation of boot programs |
|
|
|
|
Now try a reboot. (If needed, swap your scsi id's first). Initially |
Now try a reboot. Initially I'd suggest you "boot sd()netbsd -bs", then |
I'd suggest you "boot sd()netbsd -bs", then try multiuser after that. |
try multiuser after that. If you boot single-user the NetBSD incantation |
if you boot single-user the NetBSD incantation to make the root |
to make the root filesystem writable is |
filesystem writable is |
|
|
|
netbsd# mount -u /dev/sd0a / |
netbsd# mount -u /dev/sd0a / |
|
|
The Sun monitor normally tries to load a file called "vmunix". On |
The Sun monitor might have been setup to instruct the boot program to load |
OpenBOOT ROM systems you can change it to load NetBSD instead using |
a file called "vmunix". On OpenBOOT ROM systems you can change it to load |
the following commands: |
"netbsd" instead using the following commands: |
|
|
On version 1 OpenBOOT ROMs: |
On version 1 OpenBOOT ROMs: |
>n |
>n |
Line 233 On version 2 OpenBOOT ROMs: |
|
Line 295 On version 2 OpenBOOT ROMs: |
|
ok setenv boot-device /sbus/esp/sd@0,0 |
ok setenv boot-device /sbus/esp/sd@0,0 |
|
|
|
|
Congratulations, you have successfully installed NetBSD RELEASE. When you |
Congratulations, you have successfully installed NetBSD 1.2.1. When you |
reboot into NetBSD, you should log in as "root" at the login prompt. |
reboot into NetBSD, you should log in as "root" at the login prompt. |
There is no initial password, but if you're using the machine in a |
There is no initial password, but if you're using the machine in a |
networked environment, you should create yourself an account and |
networked environment, you should create yourself an account and |
protect it and the "root" account with good passwords. |
protect it and the "root" account with good passwords. |
|
|
Some of the files in the NetBSD RELEASE distribution might need to be |
Some of the files in the NetBSD 1.2.1 distribution might need to be |
tailored for your site. In particular, the /etc/sendmail.cf file will |
tailored for your site. In particular, the /etc/sendmail.cf file will |
almost definitely need to be adjusted, and other files in /etc will |
almost definitely need to be adjusted, and other files in /etc will |
probably need to be modified. If you are unfamiliar with UN*X-like |
probably need to be modified. If you are unfamiliar with UN*X-like |
system administration, it's recommended that you buy a book that |
system administration, it's recommended that you buy a book that |
discusses it. |
discusses it. |
|
|
|
|
|
|
Installing from SunOS. |
|
|
|
You need a SunOS machine to install NetBSD. You also need at |
|
least the following pieces: |
|
|
|
the *.tar.gz files you want to install (as a minimum, base.tar.gz) |
|
gzip (GNU gzip) SunOS binary |
|
gtar (GNU tar) SunOS binary |
|
the "install.sh" script |
|
a "/boot" file from a SunOS machine that matches your machine type |
|
(e.g. sun or sun4c) |
|
a kernel, most likely "/netbsd" |
|
|
|
All these pieces, except "/boot", are supplied in the NetBSD/sparc |
|
distribution. |
|
|
|
You need to format and partition the disk using SunOS (since |
|
NetBSD/sparc uses SunOS disk labels.) Give yourself adequate |
|
partition sizes. Here is an example layout: |
|
|
|
partition size offset will be.. |
|
sd2a 28140 0 / |
|
sd2b 16170 28140 swap |
|
sd2c 204540 0 `whole disk' |
|
sd2g 160230 44310 /usr |
|
|
|
BTW, These are not recommended sizes. They simply match the first |
|
(tiny) disk that NetBSD/sparc ran on. |
|
|
|
Use SunOS to newfs the partitions which will have filesystems on them. |
|
(NetBSD's filesystem format is identical to SunOS). |
|
|
|
sunos# newfs /dev/rsd2a |
|
[... lots of output] |
|
sunos# newfs /dev/rsd2g |
|
[... lots of output] |
|
|
|
NOTE: If you are able to, there is a performance benefit from |
|
newfs'ing using NetBSD. If you newfs using the NetBSD newfs command, |
|
be sure to use the -O flag for your / partition, so that newfs will |
|
use the 4.3BSD filesystem format, rather than the new 4.4BSD filesystem |
|
format. If you forget, you will not be able to boot -- the SunOS boot |
|
blocks do not understand the extended 4.4BSD filesystem format. |
|
|
|
Mount those partitions in a tree formation, under /mnt; ie: |
|
|
|
sunos# df |
|
Filesystem kbytes used avail capacity Mounted on |
|
[...] |
|
/dev/sd2a 11501 0 11501 0% /mnt |
|
/dev/sd2g 179529 0 179529 0% /mnt/usr |
|
|
|
Place a standard SunOS "/boot" program in /mnt (your new root |
|
partition), and use the SunOS command "installboot" to make it work. |
|
The installboot man page says to do something like this: |
|
|
|
sunos# cp /boot /mnt/boot |
|
sunos# /usr/mdec/installboot -vlt /mnt/boot /usr/mdec/bootsd /dev/rsd2a |
|
|
|
You can now extract the provided "*.tar.gz files onto your disk. The |
|
provided script, "install_from_sunos.sh" will help you: |
|
|
|
sunos# ls -FC |
|
base.tar.gz etc.tar.gz man.tar.gz secr.tar.gz |
|
comp.tar.gz games.tar.gz misc.tar.gz text.tar.gz |
|
install.sh netbsd.id3_scsi |
|
sunos# ./install_from_sunos.sh |
|
[...] |
|
|
|
This script NEEDS gzip and gtar (GNU gzip and GNU tar) on your |
|
execution path! The tar files are in a "new format" that includes |
|
directory information, and SunOS tar will not read them. Statically |
|
linked versions of these programs for SunOS are supplied in the |
|
distribution. |
|
|
|
After the files have been extracted, repair /mnt/etc/fstab to match |
|
your actual disk layout. (Minus the "/mnt" component of each path, of |
|
course :-) |
|
|
|
Now proceed to reboot the machine as described above in "Installing |
|
using a diskless setup". |
|