1 .\" $NetBSD: install,v 1.30 2008/09/07 05:09:47 tsutsui Exp $
3 .\" Copyright (c) 1999-2002 The NetBSD Foundation, Inc.
4 .\" All rights reserved.
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\" notice, this list of conditions and the following disclaimer.
11 .\" 2. Redistributions in binary form must reproduce the above copyright
12 .\" notice, this list of conditions and the following disclaimer in the
13 .\" documentation and/or other materials provided with the distribution.
15 .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
16 .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
17 .\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
18 .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
19 .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
20 .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
21 .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
22 .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
23 .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
24 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
25 .\" POSSIBILITY OF SUCH DAMAGE.
30 is a relatively complex process, but if you have
31 this document in hand it shouldn't be too much trouble.
33 There are several ways to install
36 The easiest way in terms of preliminary setup is to install from CD-ROM.
37 If you don't have access to a CD-ROM or CD-ROM burner, you
38 can use a miniroot image that can be booted off your local disk's swap
40 Alternatively, if your UltraSPARC is hooked up in a network
41 you can find a server and arrange for a diskless setup which is a convenient
42 way to install on a machine whose disk does not currently hold a usable
43 operating system (see the section
44 .Sx Installing NetBSD by using a diskless setup
47 If you have problems with these or you are installing
51 see the section below on
52 .Sx "Manual Installation of NetBSD using Solaris"
54 .Ss2 Installing NetBSD from CD-ROM
56 Installing from CD-ROM is the least painful way to install
58 Simply insert the CD-ROM in the drive, power up the computer, and type:
60 .No ok Ic "boot cdrom"
63 This Open Firmware boot command will cause the
65 kernel contained in the CD-ROM to be booted.
66 After the initial probe messages you'll be
67 asked to start the install or upgrade procedure.
68 Proceed to the section
69 .Sx "Running the sysinst installation program"
72 .Ss2 Installing NetBSD by using the NetBSD miniroot
74 The miniroot is a self-contained
76 file system holding all utilities
80 It is distributed as a plain
81 file designed to be transferred to a raw disk partition from which it can
82 be booted using the appropriate OpenFirmware command.
83 Usually, the miniroot will be loaded into the swap partition of a disk.
84 If needed, you can use any other unused partition,
85 but remember that the partition will then not
86 available during the installation process.
88 Loading the miniroot onto your raw partition is simple using the
90 command. Just remember to first uncompress the miniroot image and boot
95 and does not attempt to start swapping.
102 you use a command like:
104 .No # Ic "gunzip miniroot.fs.gz"
105 .No # Ic "dd if=miniroot.fs of=/dev/rdsk/c0t0d0s1 bs=4k"
111 .No # Ic "gunzip miniroot.fs.gz"
112 .No # Ic "dd if=miniroot.fs of=/dev/rsd0b bs=4k"
115 .Li /dev/rdsk/c0t0d0s1
118 with your swap partition.
120 After transferring the miniroot to disk, bring the system down by:
124 Then boot the miniroot by typing the appropriate command at the
127 .No ok Ic "boot disk:b netbsd"
129 If you've loaded the miniroot onto some other disk than
135 .No ok Ic "boot disk1:b netbsd"
137 This Open Firmware boot command will cause the
139 kernel contained in the
140 miniroot image to be booted.
141 After the initial probe messages you'll be
142 asked to start the install or upgrade procedure.
143 Proceed to the section
144 .Sx "Running the sysinst installation program"
147 .Ss2 Installing NetBSD by using a NetBSD kernel on a Solaris partition
149 This procedure is very straightforward. You will be putting the
151 installation kernel (kernel with a RAM disk installer) on your
153 partition and telling Open Firmware to boot the
157 CAVEAT: this method is a bit fragile. Depending on physical partition layout,
158 partition size, and parameters used to create the filesystem of your
160 root partition, bugs in the bootloader might be triggered and cause this
164 .Pa netbsd-INSTALL.gz
165 kernel and bootloader to the root level of your hard drive and halt your
168 .No # Ic "cp binary/kernel/netbsd-INSTALL.gz /"
169 .No # Ic "cp installation/misc/ofwboot /"
172 At the Open Firmware prompt, boot
175 .No ok Ic "boot disk:a /ofwboot -a"
179 flag is needed so that the bootloader will ask you to find your
182 Rebooting with command: boot disk:a /ofwboot -a
183 Boot device: /pci@1f,4000/scsi@3/disk@0,0:a File and args: /ofwboot -a
184 .No Enter filename [/ofwboot]: Ic "\*[Lt]return\*[Gt]
185 \*[Gt]\*[Gt] NetBSD/sparc64 OpenFirmware Boot, Revision 1.7
186 \*[Gt]\*[Gt] (autobuild@tgm.netbsd.org, Thu May 20 16:29:20 UTC 2004)
187 .No Boot: Ic netbsd-INSTALL.gz
189 After the initial probe messages you'll be
190 asked to start the install or upgrade procedure.
191 Proceed to the section
192 .Sx "Running the sysinst installation program"
195 .Ss2 Installing NetBSD by using a netboot setup
197 .so ../common/netboot
199 Now, netboot your system from the server by entering the appropriate
201 command at the Open Firmware prompt.
203 .No ok Ic "boot net netbsd"
205 After the initial probe messages you'll be
206 asked to start the install or upgrade procedure.
207 Proceed to the section
208 .Sx "Running the sysinst installation program"
211 .so ../common/sysinst
213 Skip down to the section on
214 .Sx "Booting NetBSD for the first time"
216 .Ss2 Manual Installation of NetBSD using Solaris
218 (Adapted from Murray Stokely's \*[Lt]murray@osd.bsdi.com\*[Gt] instructions)
224 user-friendly installer or to perform a full manual installation of
226 If you want to use the user-friendly miniroot installer or RAM disk
227 installation kernel, follow the sections
228 .Sx "Installing NetBSD by using the NetBSD miniroot"
230 .Sx "Installing NetBSD by using a NetBSD kernel on a Solaris partition" .
232 Manual installation from Solaris 10 is not possible because NetBSD
233 cannot use the resulting UFS file system. It is possible to install
234 Solaris 10 and NetBSD on the same disk. To do so, partition the disk
235 with the Solaris format command, then boot NetBSD and perform a manual
236 installation. Be careful not to write a NetBSD disklabel. Use the
237 disklabel command to read the partition size, as constructed from the
238 Solaris disklabel. By default the NetBSD newfs command writes a NetBSD
239 disklabel. Avoid this by using the -F and -s arguments to newfs.
242 .To 2 "Preparing the disk in Solaris"
243 .Em "Preparing the disk in Solaris"
245 The first step is to format and label the disk that you would like to
248 This can be accomplished with the
250 command in Solaris, which allows you to partition a disk and write a
251 disklabel. It also is used to perform a low-level format on SCSI drives.
252 You will want to create a root partition and a swap partition.
253 Depending on your preferences, you may also wish to create separate
254 .Pa /usr No or Pa /var
258 .No # Ic "/usr/sbin/format"
259 Searching for disks...
260 Mode sense page(3) reports nsect value as 280, adjusting it to 218
263 c0t1d0: configured with capacity of 16.95GB
265 AVAILABLE DISK SELECTIONS:
266 0. c0t0d0 \*[Lt]SUN4.2G cyl 3880 alt 2 hd 16 sec 135\*[Gt]
267 /pci@1f,4000/scsi@3/sd@0,0
268 1. c0t1d0 \*[Lt]IBM-DXHS18Y-0430 cyl 8152 alt 2 hd 20 sec 218\*[Gt]
269 /pci@1f,4000/scsi@3/sd@1,0
270 .No "Specify disk (enter its number):" Ic 1
273 .No "Disk not labeled. Label it now?" Ic y
275 .No "format\*[Gt]" Ic format
276 Ready to format. Formatting cannot be interrupted
277 and takes 114 minutes (estimated). Continue? y
278 Beginning format. The current time is Sat May 29 22:15:13 2004
283 pass 0 - pattern = 0xc6dec6de
285 pass 1 - pattern = 0x6db6db6d
288 Total of 0 defective blocks repaired.
289 .No "format\*[Gt]" Ic partition
290 .No "partition\*[Gt]" Ic print
291 Current partition table (original):
292 Total disk cylinders available: 8152 + 2 (reserved cylinders)
294 Part Tag Flag Cylinders Size Blocks
295 0 root wm 0 - 60 129.86MB (61/0/0) 265960
296 1 swap wu 61 - 121 129.86MB (61/0/0) 265960
297 2 backup wu 0 - 8151 16.95GB (8152/0/0) 35542720
298 3 unassigned wm 0 0 (0/0/0) 0
299 4 unassigned wm 0 0 (0/0/0) 0
300 5 unassigned wm 0 0 (0/0/0) 0
301 6 usr wm 122 - 8151 16.69GB (8030/0/0) 35010800
302 7 unassigned wm 0 0 (0/0/0) 0
304 .No "partition\*[Gt]" Ic label
305 .No "Ready to label disk, continue?" Ic y
306 .No "partition\*[Gt]" Ic quit
307 .No "format\*[Gt]" Ic quit
310 After your disk has been labeled you need to create file systems on
314 command will create ffs file systems that can be used by
317 .No # Ic "/usr/sbin/newfs /dev/dsk/c0t1d0s0"
318 .No # Ic "/usr/sbin/newfs /dev/dsk/c0t1d0s6"
322 .To 2 "Installing NetBSD Software from Solaris"
323 .Em "Installing NetBSD Software from Solaris"
325 You should now mount your
329 partitions under Solaris so that you can populate the file systems with
333 .No # Ic "/usr/sbin/mount /dev/dsk/c0t1d0s0 /mnt"
334 .No # Ic "mkdir /mnt/usr"
335 .No # Ic "/usr/sbin/mount /dev/dsk/c0t1d0s6 /mnt/usr"
338 Now extract the distribution file sets
340 .No # Ic "cd ~/netbsd/binary/sets"
341 .No # Ic "gunzip *.tar.gz"
342 .No # Ic "echo ~/netbsd/binary/sets/*.tar | (cd /mnt; xargs -n1 pax -rpe -f )"
345 Now you should copy the
347 second stage bootloader into your new root partition and install the
348 bootblocks using Solaris's
352 .No # Ic "cp ~/netbsd/installation/misc/ofwboot /mnt"
353 .No # Ic "/usr/sbin/installboot ~/netbsd/installation/misc/bootblk /dev/rdsk/c0t1d0s0"
357 .To 2 "Creating NetBSD Device Nodes under Solaris"
358 .Em "Creating NetBSD Device Nodes under Solaris"
360 This is not a necessary step. If your
364 will create a RAM disk with all of the
365 essential device nodes each time the system boots. If you want to create
366 the device nodes on disk, you will need to use the Solaris
370 for the correct names, major and minor numbers, ownership, and
374 .To 2 "Configuring the NetBSD system from Solaris"
375 .Em "Configuring the NetBSD system from Solaris"
377 To save effort, you may want to use your favorite Solaris editor
378 to configure some of the files in
382 the first time. In particular, you should look at
385 .Pa /etc/resolv.conf ,
388 See the section below on
389 .Sx "Post installation steps"
391 .Sx "Booting NetBSD for the first time" .
394 .Ss Booting NetBSD for the first time
397 Now it is time to boot
400 You will boot from your disk using similar syntax as described above in
401 .Sx "Setting up Open Firmware"
403 .Sx "Determining how to boot from an SBUS or PCI card" .
404 To boot from your first disk, type:
406 .No ok Ic "boot disk"