NetBSD/distrib/notes/sparc/install

155 lines
5.5 KiB
Plaintext

Installing NetBSD is a relatively complex process, but if you have
this document in hand it shouldn't be too much trouble.
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 sun4c machine
a kernel, most likely "netbsd.id3_scsi"
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.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.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 :-)
The install script copies the kernel called "netbsd.id3_scsi" to
/mnt/netbsd. Two sample kernels are supplied: "netbsd.first_scsi"
and "netbsd.id3_scsi". An explanation follows:
Unlike SunOS and the OpenBOOT ROM, NetBSD numbers scsi drives
sequentially as it finds them. The drive with the lowest scsi-id will
be called sd0, the next one sd1, etc.
SunOS and the OpenBOOT ROM map according to this table:
SCSI-ID -> SunOS SD-UNIT
0 sd3
1 sd1
2 sd2
3 sd0
4 sd4
5 sd5
6 sd6
If you have two drives, NetBSD and the OpenBOOT ROM will likely
disagree. The "netbsd.id3_scsi" kernel gets around this problem by
hard-wiring scsi-id#3 to sd0. The remaining drives will be
dynamically mapped to other sd* numbers. If you have more than one
drive you will want to use this kernel.
If you know what you are doing the other kernel, "netbsd.first_scsi"
will do the standard NetBSD probe ordering.
Your OpenBOOT ROM may need some setup. make sure you boot from `new
command mode'. If your machine comes up and gives you a `>' prompt
instead of `ok', type:
>n
ok setenv sunmon-compat? false
ok
This is needed because netbsd cannot handle the old-mode yet, and will
firework on you.
Also, you cannot use the security modes of the sparc OpenBOOT ROM.
ok setenv security-mode none
Now try a reboot. (If needed, swap your scsi id's first). Initially
I'd suggest you "boot sd()netbsd -bs", then try multiuser after that.
if you boot single-user the NetBSD incantation to make the root
filesystem read-write is
netbsd# mount -u /dev/sd0a /
The OpenBOOT ROM normally tries to load a file called "vmunix". You
can change it to load NetBSD instead using the following command:
>n
ok setenv boot-from sd(0,0,0)netbsd
ok
Newer versions of the OpenBOOT ROM will require this syntax instead:
ok setenv boot-file netbsd
ok setenv boot-device /sbus/esp/sd@0,0
Congratulations, you have successfully installed NetBSD 1.0. When you
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
networked environment, you should create yourself an account and
protect it and the "root" account with good passwords.
Some of the files in the NetBSD 1.0 distribution might need to be
tailored for your site. In particular, the /etc/sendmail.cf file 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
system administration, it's recommended that you buy a book that
discusses it.