install revision 1.4 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.4 pk There are several ways to install NetBSD onto a disk. If your Sparcstation
5 1.4 pk is hooked up in a network you can find find a server and arrange for a
6 1.4 pk diskless setup which is a convenient way to install on a machine with
7 1.4 pk a single disk attached. Alternatively, you could use SunOS (booted from
8 1.4 pk a local disk) and install NetBSD onto a second disk. For the latter method,
9 1.4 pk skip to the section "Installing from SunOS" below.
10 1.4 pk
11 1.4 pk Installing using a diskless setup.
12 1.4 pk
13 1.4 pk First, you must setup a diskless client configuration on a server. Consult
14 1.4 pk your server installation documents on how to proceed with this.
15 1.4 pk Put all the *.tar.gz files you want to install into the root directory
16 1.4 pk for your client on the server.
17 1.4 pk
18 1.4 pk Next, unpack base.tar.gz on the server in the root directory for your machine.
19 1.4 pk A few configuration files need to be edited:
20 1.4 pk
21 1.4 pk <root>/etc/hosts
22 1.4 pk <root>/etc/myname
23 1.4 pk <root>/etc/fstab
24 1.4 pk
25 1.4 pk Boot your workstation from the server by entering the appropriate `boot'
26 1.4 pk command at the monitor prompt. Depending on the PROM version in your machine,
27 1.4 pk this command takes one of the following forms:
28 1.4 pk
29 1.4 pk > b le()netbsd -s # for sun4 monitors
30 1.4 pk ok boot le()netbsd -s # for version 1 OpenBOOT ROMs
31 1.4 pk ok boot net netbsd -s # for version 2 OpenBOOT ROMs
32 1.4 pk
33 1.4 pk This will boot the NetBSD kernel in single-user mode.
34 1.4 pk
35 1.4 pk [[
36 1.4 pk NOTE: the latter two examples assume you operate the OpenBOOT ROM in
37 1.4 pk "new command mode". If your machine comes up and gives you a `>' prompt
38 1.4 pk instead of `ok', type:
39 1.4 pk
40 1.4 pk >n # enter native OpenBOOT mode
41 1.4 pk ok setenv sunmon-compat? false # make it permanent
42 1.4 pk ok
43 1.4 pk ]]
44 1.4 pk
45 1.4 pk Start the installation procedure:
46 1.4 pk
47 1.4 pk netbsd# ./install.sh
48 1.4 pk
49 1.4 pk
50 1.4 pk This script will do most of the work of transferring the system from the
51 1.4 pk tar files onto your disk. You will frequently be asked for confirmation
52 1.4 pk before the script proceeds with each phase of the installation process.
53 1.4 pk Occasionally, you'll have to provide a piece of information such as the
54 1.4 pk name of the disk you want to install on or IP addresses and domain names
55 1.4 pk you want to assign.
56 1.4 pk
57 1.4 pk The installation script goes through the following phases:
58 1.4 pk
59 1.4 pk - determination of the disk to install NetBSD on
60 1.4 pk - checking of the partition information on the disk
61 1.4 pk - creating and mounting the NetBSD filesystems
62 1.4 pk - setup of IP configuration
63 1.4 pk - extraction of the distribution tar files
64 1.4 pk - installation of boot programs
65 1.4 pk
66 1.4 pk
67 1.4 pk Now try a reboot. (If needed, swap your scsi id's first). Initially
68 1.4 pk I'd suggest you "boot sd()netbsd -bs", then try multiuser after that.
69 1.4 pk if you boot single-user the NetBSD incantation to make the root
70 1.4 pk filesystem writable is
71 1.4 pk
72 1.4 pk netbsd# mount -u /dev/sd0a /
73 1.4 pk
74 1.4 pk The Sun monitor normally tries to load a file called "vmunix". On
75 1.4 pk OpenBOOT ROM systems you can change it to load NetBSD instead using
76 1.4 pk the following commands:
77 1.4 pk
78 1.4 pk On version 1 OpenBOOT ROMs:
79 1.4 pk >n
80 1.4 pk ok setenv boot-from sd(0,0,0)netbsd
81 1.4 pk ok
82 1.4 pk
83 1.4 pk On version 2 OpenBOOT ROMs:
84 1.4 pk ok setenv boot-file netbsd
85 1.4 pk ok setenv boot-device /sbus/esp/sd@0,0
86 1.4 pk
87 1.4 pk
88 1.4 pk Congratulations, you have successfully installed NetBSD 1.0. When you
89 1.4 pk reboot into NetBSD, you should log in as "root" at the login prompt.
90 1.4 pk There is no initial password, but if you're using the machine in a
91 1.4 pk networked environment, you should create yourself an account and
92 1.4 pk protect it and the "root" account with good passwords.
93 1.4 pk
94 1.4 pk Some of the files in the NetBSD 1.0 distribution might need to be
95 1.4 pk tailored for your site. In particular, the /etc/sendmail.cf file will
96 1.4 pk almost definitely need to be adjusted, and other files in /etc will
97 1.4 pk probably need to be modified. If you are unfamiliar with UN*X-like
98 1.4 pk system administration, it's recommended that you buy a book that
99 1.4 pk discusses it.
100 1.4 pk
101 1.4 pk
102 1.4 pk
103 1.4 pk Installing from SunOS.
104 1.4 pk
105 1.1 deraadt You need a SunOS machine to install NetBSD. You also need at
106 1.1 deraadt least the following pieces:
107 1.1 deraadt
108 1.1 deraadt the *.tar.gz files you want to install (as a minimum, base.tar.gz)
109 1.1 deraadt gzip (GNU gzip) SunOS binary
110 1.1 deraadt gtar (GNU tar) SunOS binary
111 1.1 deraadt the "install.sh" script
112 1.1 deraadt a "/boot" file from a SunOS sun4c machine
113 1.4 pk a kernel, most likely "/netbsd"
114 1.1 deraadt
115 1.1 deraadt All these pieces, except "/boot", are supplied in the NetBSD/sparc
116 1.1 deraadt distribution.
117 1.1 deraadt
118 1.1 deraadt You need to format and partition the disk using SunOS (since
119 1.1 deraadt NetBSD/sparc uses SunOS disk labels.) Give yourself adequate
120 1.1 deraadt partition sizes. Here is an example layout:
121 1.1 deraadt
122 1.1 deraadt partition size offset will be..
123 1.1 deraadt sd2a 28140 0 /
124 1.1 deraadt sd2b 16170 28140 swap
125 1.1 deraadt sd2c 204540 0 `whole disk'
126 1.1 deraadt sd2g 160230 44310 /usr
127 1.1 deraadt
128 1.1 deraadt BTW, These are not recommended sizes. They simply match the first
129 1.1 deraadt (tiny) disk that NetBSD/sparc ran on.
130 1.1 deraadt
131 1.1 deraadt Use SunOS to newfs the partitions which will have filesystems on them.
132 1.1 deraadt (NetBSD's filesystem format is identical to SunOS).
133 1.1 deraadt
134 1.1 deraadt sunos# newfs /dev/rsd2a
135 1.1 deraadt [... lots of output]
136 1.1 deraadt sunos# newfs /dev/rsd2g
137 1.1 deraadt [... lots of output]
138 1.1 deraadt
139 1.1 deraadt NOTE: If you are able to, there is a performance benefit from
140 1.1 deraadt newfs'ing using NetBSD. If you newfs using the NetBSD newfs command,
141 1.1 deraadt be sure to use the -O flag for your / partition, so that newfs will
142 1.1 deraadt use the 4.3BSD filesystem format, rather than the new 4.4BSD filesystem
143 1.1 deraadt format. If you forget, you will not be able to boot -- the SunOS boot
144 1.1 deraadt blocks do not understand the extended 4.4BSD filesystem format.
145 1.1 deraadt
146 1.1 deraadt Mount those partitions in a tree formation, under /mnt; ie:
147 1.1 deraadt
148 1.1 deraadt sunos# df
149 1.1 deraadt Filesystem kbytes used avail capacity Mounted on
150 1.1 deraadt [...]
151 1.1 deraadt /dev/sd2a 11501 0 11501 0% /mnt
152 1.1 deraadt /dev/sd2g 179529 0 179529 0% /mnt/usr
153 1.1 deraadt
154 1.1 deraadt Place a standard SunOS "/boot" program in /mnt (your new root
155 1.1 deraadt partition), and use the SunOS command "installboot" to make it work.
156 1.1 deraadt The installboot man page says to do something like this:
157 1.1 deraadt
158 1.1 deraadt sunos# cp /boot /mnt/boot
159 1.1 deraadt sunos# /usr/mdec/installboot -vlt /mnt/boot /usr/mdec/bootsd /dev/rsd2a
160 1.1 deraadt
161 1.1 deraadt You can now extract the provided "*.tar.gz files onto your disk. The
162 1.1 deraadt provided script, "install.sh" will help you:
163 1.1 deraadt
164 1.1 deraadt sunos# ls -FC
165 1.1 deraadt base.tar.gz etc.tar.gz man.tar.gz secr.tar.gz
166 1.1 deraadt comp.tar.gz games.tar.gz misc.tar.gz text.tar.gz
167 1.1 deraadt install.sh netbsd.id3_scsi
168 1.1 deraadt sunos# ./install.sh
169 1.1 deraadt [...]
170 1.1 deraadt
171 1.1 deraadt This script NEEDS gzip and gtar (GNU gzip and GNU tar) on your
172 1.1 deraadt execution path! The tar files are in a "new format" that includes
173 1.1 deraadt directory information, and SunOS tar will not read them. Statically
174 1.1 deraadt linked versions of these programs for SunOS are supplied in the
175 1.1 deraadt distribution.
176 1.1 deraadt
177 1.1 deraadt After the files have been extracted, repair /mnt/etc/fstab to match
178 1.1 deraadt your actual disk layout. (Minus the "/mnt" component of each path, of
179 1.1 deraadt course :-)
180 1.1 deraadt
181 1.4 pk Now proceed to reboot the machine as described above in "Installing
182 1.4 pk using a diskless setup".
183