install revision 1.1 1 1.1 deraadt Installing NetBSD is a relatively complex process, but if you have
2 1.1 deraadt this document in hand it shouldn't be too much trouble.
3 1.1 deraadt
4 1.1 deraadt You need a SunOS machine to install NetBSD. You also need at
5 1.1 deraadt least the following pieces:
6 1.1 deraadt
7 1.1 deraadt the *.tar.gz files you want to install (as a minimum, base.tar.gz)
8 1.1 deraadt gzip (GNU gzip) SunOS binary
9 1.1 deraadt gtar (GNU tar) SunOS binary
10 1.1 deraadt the "install.sh" script
11 1.1 deraadt a "/boot" file from a SunOS sun4c machine
12 1.1 deraadt a kernel, most likely "netbsd.id3_scsi"
13 1.1 deraadt
14 1.1 deraadt All these pieces, except "/boot", are supplied in the NetBSD/sparc
15 1.1 deraadt distribution.
16 1.1 deraadt
17 1.1 deraadt You need to format and partition the disk using SunOS (since
18 1.1 deraadt NetBSD/sparc uses SunOS disk labels.) Give yourself adequate
19 1.1 deraadt partition sizes. Here is an example layout:
20 1.1 deraadt
21 1.1 deraadt partition size offset will be..
22 1.1 deraadt sd2a 28140 0 /
23 1.1 deraadt sd2b 16170 28140 swap
24 1.1 deraadt sd2c 204540 0 `whole disk'
25 1.1 deraadt sd2g 160230 44310 /usr
26 1.1 deraadt
27 1.1 deraadt BTW, These are not recommended sizes. They simply match the first
28 1.1 deraadt (tiny) disk that NetBSD/sparc ran on.
29 1.1 deraadt
30 1.1 deraadt Use SunOS to newfs the partitions which will have filesystems on them.
31 1.1 deraadt (NetBSD's filesystem format is identical to SunOS).
32 1.1 deraadt
33 1.1 deraadt sunos# newfs /dev/rsd2a
34 1.1 deraadt [... lots of output]
35 1.1 deraadt sunos# newfs /dev/rsd2g
36 1.1 deraadt [... lots of output]
37 1.1 deraadt
38 1.1 deraadt NOTE: If you are able to, there is a performance benefit from
39 1.1 deraadt newfs'ing using NetBSD. If you newfs using the NetBSD newfs command,
40 1.1 deraadt be sure to use the -O flag for your / partition, so that newfs will
41 1.1 deraadt use the 4.3BSD filesystem format, rather than the new 4.4BSD filesystem
42 1.1 deraadt format. If you forget, you will not be able to boot -- the SunOS boot
43 1.1 deraadt blocks do not understand the extended 4.4BSD filesystem format.
44 1.1 deraadt
45 1.1 deraadt Mount those partitions in a tree formation, under /mnt; ie:
46 1.1 deraadt
47 1.1 deraadt sunos# df
48 1.1 deraadt Filesystem kbytes used avail capacity Mounted on
49 1.1 deraadt [...]
50 1.1 deraadt /dev/sd2a 11501 0 11501 0% /mnt
51 1.1 deraadt /dev/sd2g 179529 0 179529 0% /mnt/usr
52 1.1 deraadt
53 1.1 deraadt Place a standard SunOS "/boot" program in /mnt (your new root
54 1.1 deraadt partition), and use the SunOS command "installboot" to make it work.
55 1.1 deraadt The installboot man page says to do something like this:
56 1.1 deraadt
57 1.1 deraadt sunos# cp /boot /mnt/boot
58 1.1 deraadt sunos# /usr/mdec/installboot -vlt /mnt/boot /usr/mdec/bootsd /dev/rsd2a
59 1.1 deraadt
60 1.1 deraadt You can now extract the provided "*.tar.gz files onto your disk. The
61 1.1 deraadt provided script, "install.sh" will help you:
62 1.1 deraadt
63 1.1 deraadt sunos# ls -FC
64 1.1 deraadt base.tar.gz etc.tar.gz man.tar.gz secr.tar.gz
65 1.1 deraadt comp.tar.gz games.tar.gz misc.tar.gz text.tar.gz
66 1.1 deraadt install.sh netbsd.id3_scsi
67 1.1 deraadt sunos# ./install.sh
68 1.1 deraadt [...]
69 1.1 deraadt
70 1.1 deraadt This script NEEDS gzip and gtar (GNU gzip and GNU tar) on your
71 1.1 deraadt execution path! The tar files are in a "new format" that includes
72 1.1 deraadt directory information, and SunOS tar will not read them. Statically
73 1.1 deraadt linked versions of these programs for SunOS are supplied in the
74 1.1 deraadt distribution.
75 1.1 deraadt
76 1.1 deraadt After the files have been extracted, repair /mnt/etc/fstab to match
77 1.1 deraadt your actual disk layout. (Minus the "/mnt" component of each path, of
78 1.1 deraadt course :-)
79 1.1 deraadt
80 1.1 deraadt The install script copies the kernel called "netbsd.id3_scsi" to
81 1.1 deraadt /mnt/netbsd. Two sample kernels are supplied: "netbsd.first_scsi"
82 1.1 deraadt and "netbsd.id3_scsi". An explanation follows:
83 1.1 deraadt
84 1.1 deraadt Unlike SunOS and the OpenBOOT ROM, NetBSD numbers scsi drives
85 1.1 deraadt sequentially as it finds them. The drive with the lowest scsi-id will
86 1.1 deraadt be called sd0, the next one sd1, etc.
87 1.1 deraadt
88 1.1 deraadt SunOS and the OpenBOOT ROM map according to this table:
89 1.1 deraadt
90 1.1 deraadt SCSI-ID -> SunOS SD-UNIT
91 1.1 deraadt 0 sd3
92 1.1 deraadt 1 sd1
93 1.1 deraadt 2 sd2
94 1.1 deraadt 3 sd3
95 1.1 deraadt 4 sd4
96 1.1 deraadt 5 sd5
97 1.1 deraadt 6 sd6
98 1.1 deraadt
99 1.1 deraadt If you have two drives, NetBSD and the OpenBOOT ROM will likely
100 1.1 deraadt disagree. The "netbsd.id3_scsi" kernel gets around this problem by
101 1.1 deraadt hard-wiring scsi-id#3 to sd0. The remaining drives will be
102 1.1 deraadt dynamically mapped to other sd* numbers. If you have more than one
103 1.1 deraadt drive you will want to use this kernel.
104 1.1 deraadt
105 1.1 deraadt If you know what you are doing the other kernel, "netbsd.first_scsi"
106 1.1 deraadt will do the standard NetBSD probe ordering.
107 1.1 deraadt
108 1.1 deraadt Your OpenBOOT ROM may need some setup. make sure you boot from `new
109 1.1 deraadt command mode'. If your machine comes up and gives you a `>' prompt
110 1.1 deraadt instead of `ok', type:
111 1.1 deraadt
112 1.1 deraadt >n
113 1.1 deraadt ok setenv sunmon-compat? false
114 1.1 deraadt ok
115 1.1 deraadt
116 1.1 deraadt This is needed because netbsd cannot handle the old-mode yet, and will
117 1.1 deraadt firework on you.
118 1.1 deraadt
119 1.1 deraadt As well, you cannot use the security modes of the sparc OpenBOOT ROM.
120 1.1 deraadt
121 1.1 deraadt ok setenv security-mode none
122 1.1 deraadt
123 1.1 deraadt Now try a reboot. (If needed, swap your scsi id's first). Initially
124 1.1 deraadt I'd suggest you "boot sd()netbsd -bs", then try multiuser after that.
125 1.1 deraadt if you boot single-user the NetBSD incantation to make the root
126 1.1 deraadt filesystem read-write is
127 1.1 deraadt
128 1.1 deraadt netbsd# mount -u /dev/sd0a /
129 1.1 deraadt
130 1.1 deraadt The OpenBOOT ROM normally tries to load a file called "vmunix". You
131 1.1 deraadt can change it to load NetBSD instead using the following command:
132 1.1 deraadt
133 1.1 deraadt >n
134 1.1 deraadt ok setenv boot-from sd(0,0,0)netbsd
135 1.1 deraadt ok
136 1.1 deraadt
137 1.1 deraadt Congratulations, you have successfully installed NetBSD 1.0. When you
138 1.1 deraadt reboot into NetBSD, you should log in as "root" at the login prompt.
139 1.1 deraadt There is no initial password, but if you're using the machine in a
140 1.1 deraadt networked environment, you should create yourself an account and
141 1.1 deraadt protect it and the "root" account with good passwords.
142 1.1 deraadt
143 1.1 deraadt Some of the files in the NetBSD 1.0 distribution might need to be
144 1.1 deraadt tailored for your site. In particular, the /etc/sendmail.cf file will
145 1.1 deraadt almost definitely need to be adjusted, and other files in /etc will
146 1.1 deraadt probably need to be modified, as well. If you are unfamiliar with
147 1.1 deraadt UN*X-like system administration, it's recommended that you buy a book
148 1.1 deraadt that discusses it.
149