xref: /netbsd-src/distrib/notes/sparc64/install (revision 20cf991593593cc37951796fb50f3f54da769cc7)
$NetBSD: install,v 1.21 2004/06/10 07:23:49 mbw Exp $

Copyright (c) 1999-2002 The NetBSD Foundation, Inc.
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. All advertising materials mentioning features or use of this software
must display the following acknowledgement:
This product includes software developed by the NetBSD
Foundation, Inc. and its contributors.
4. Neither the name of The NetBSD Foundation nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.

. Installing .Nx is a relatively complex process, but if you have this document in hand it shouldn't be too much trouble.

p There are several ways to install .Nx onto a disk. The easiest way in terms of preliminary setup is to install from CDROM. If you don't have access to a CDROM or CDROM burner, you can use a miniroot image that can be booted off your local disk's swap partition. Alternatively, if your UltraSPARC is hooked up in a network you can find a server and arrange for a diskless setup which is a convenient way to install on a machine whose disk does not currently hold a usable operating system (see the section .Sx Installing NetBSD by using a diskless setup below).

p If you have problems with these or you are installing .Nx onto the same disk as .Tn Solaris , see the section below on .Sx "Manual Installation of NetBSD using Solaris" . .Ss2 Installing NetBSD from CDROM . Installing from CDROM, whether it has the full distribution or just a kernel and c sysinst is the least painful way to install .Nx . Simply insert the CD-ROM in the drive, power up the computer, and type: .(disp .No ok Ic "boot cdrom" .disp)

p This Open Firmware boot command will cause the .Nx kernel contained in the CD-ROM to be booted. After the initial probe messages you'll be asked to start the install or upgrade procedure. Proceed to the section .Sx Running sysinst below. . .Ss2 Installing NetBSD by using the NetBSD miniroot . The miniroot is a self-contained .Nx file system holding all utilities necessary to install .Nx 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 OpenBoot 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.

p Loading the miniroot onto your raw partition is simple using the .Xr dd 1 command. Just remember to first uncompress the miniroot image and boot your OS with the .Li -s flag so that it runs .Dq "single-user" and does not attempt to start swapping. .(disp .No ok Ic "boot -s" .disp)

p On .Tn Solaris you use a command like: .(disp .No # Ic "gunzip miniroot.fs.gz" .No # Ic "dd if=miniroot.fs of=/dev/rdsk/c0t0d0s1 bs=4k conv=sync" .disp) On .Nx the command is: .(disp .No # Ic "gunzip miniroot.fs.gz" .No # Ic "dd if=miniroot.fs of=/dev/rsd0b bs=4k conv=sync" .disp) Replace .Li /dev/rdsk/c0t0d0s1 or .Li /dev/rsd0b with your swap partition.

p After transferring the miniroot to disk, bring the system down by: .(disp .No # Ic halt .disp) Then boot the miniroot by typing the appropriate command at the OpenBoot PROM: .(disp .No ok Ic "boot disk:b netbsd" .disp) If you've loaded the miniroot onto some other disk than .Li sd0 use the correct

a devalias , such as .(disp .No ok Ic "boot disk1:b netbsd" .disp) This Open Firmware boot command will cause the .Nx kernel contained in the miniroot image to be booted. After the initial probe messages you'll be asked to start the install or upgrade procedure. Proceed to the section .Sx Running sysinst below. . .Ss2 Installing NetBSD by using a NetBSD kernel on a Solaris partition . This procedure is very straightforward. You will be putting the .Nx installation kernel (kernel with a RAM disk installer) on your .Tn Solaris partition and telling Open Firmware to boot the .Nx kernel.

p First, copy the

a netbsd-INSTALL.gz kernel and bootloader to the root level of your hard drive and halt your system .(disp .No # Ic "cp binary/kernel/netbsd-INSTALL.gz /" .No # Ic "cp installation/misc/ofwboot /" .No # Ic "halt" .disp) At the Open Firmware prompt, boot .Nx . .(disp .No ok Ic "boot disk:a /ofwboot -a" .disp) The .Li -a flag is needed so that the bootloader will ask you to find your installation kernel. .(disp Rebooting with command: boot disk:a /ofwboot -a Boot device: /pci@1f,4000/scsi@3/disk@0,0:a File and args: /ofwboot -a .No Enter filename [/ofwboot]: Ic "\*<return\*> \*>\*> NetBSD/sparc64 OpenFirmware Boot, Revision 1.7 \*>\*> (autobuild@tgm.netbsd.org, Thu May 20 16:29:20 UTC 2004) .No Boot: Ic netbsd-INSTALL.gz .disp) After the initial probe messages you'll be asked to start the install or upgrade procedure. Proceed to the section .Sx Running sysinst below. . .Ss2 Installing NetBSD by using a netboot setup . .so ../common/netboot

p Now, netboot your system from the server by entering the appropriate c boot command at the Open Firmware prompt. .(disp .No ok Ic "boot net netbsd" .disp) After the initial probe messages you'll be asked to start the install or upgrade procedure. Proceed to the section .Sx Running sysinst below. . .Ss2 Sample disklabel screen .(disp netbsd# disklabel sd2 # /dev/rsd2c: type: SCSI disk: SCSI disk label: Hold Your Breath flags: bytes/sector: 512 sectors/track: 64 tracks/cylinder: 7 sectors/cylinder: 448 cylinders: 1429 rpm: 3600 interleave: 1 trackskew: 0 cylinderskew: 0 headswitch: 0 # milliseconds track-to-track seek: 0 # milliseconds drivedata: 0 8 partitions: # size offset fstype [fsz bsz cpg] a: 50176 0 4.2BSD 0 0 0 # (Cyl. 0 - 111) b: 64512 50176 swap # (Cyl. 112 - 255) c: 640192 0 unknown # (Cyl. 0 - 1428) d: 525504 114688 4.2BSD 0 0 0 # (Cyl. 256 - 1428) .disp)

p To begin installation or the upgrade procedure, run c sysinst :

p .Dl netbsd# Ic sysinst . .Ss2 Running sysinst . Once you have a miniroot booted, the first thing .Nx will ask you for is a terminal. If you are running on the keyboard and mouse you want to select c sun while if you are using a serial console from an X terminal you need to select c xterm Selecting the wrong terminal settings may cause display corruption or c sysinst may fail to run.

p . The c sysinst program 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 c sysinst proceeds with each phase of the installation process.

p Occasionally, you will 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 you want to assign. If your system has more than one disk, you may want to look at the output of the .Xr dmesg 8 command to see how your disks have been identified by the kernel.

p The sysinst goes through the following phases: .(bullet determination of the disk to install .Nx on t checking of the partition information on the disk t setting of the local timezone t creating and mounting the .Nx file systems t setup of IP configuration t extraction of the distribution tar files t installation of boot programs .bullet) . .Ss2 Manual Installation of NetBSD using Solaris . (Adapted from Murray Stokely's \*<murray@osd.bsdi.com\*> instructions)

p You can use .Tn Solaris to prepare the .Nx user-friendly installer or to perform a full manual installation of .Nx . If you want to use the user-friendly miniroot installer or RAM disk installation kernel, follow the sections .Sx "Installing NetBSD by using the NetBSD miniroot" or .Sx "Installing NetBSD by using a NetBSD kernel on a Solaris partition" .

p .(bullet .To 2 "Preparing the disk in Solaris" .Em "Preparing the disk in Solaris"

p The first step is to format and label the disk that you would like to use with .Nx . This can be accomplished with the .Xr format 1M command in Solaris, which allows you to partition a disk and write a disklabel. It also is used to perform a low-level format on SCSI drives. You will want to create a root partition and a swap partition. Depending on your preferences, you may also wish to create separate

a /usr No or Pa /var partitions.

p .(disp .No # Ic "/usr/sbin/format" Searching for disks... Mode sense page(3) reports nsect value as 280, adjusting it to 218 done c0t1d0: configured with capacity of 16.95GB AVAILABLE DISK SELECTIONS: 0. c0t0d0 \*<SUN4.2G cyl 3880 alt 2 hd 16 sec 135\*> /pci@1f,4000/scsi@3/sd@0,0 1. c0t1d0 \*<IBM-DXHS18Y-0430 cyl 8152 alt 2 hd 20 sec 218\*> /pci@1f,4000/scsi@3/sd@1,0 .No "Specify disk (enter its number):" Ic 1 selecting c0t1d0 [disk formatted] .No "Disk not labeled. Label it now?" Ic y .No "format\*>" Ic format Ready to format. Formatting cannot be interrupted and takes 114 minutes (estimated). Continue? y Beginning format. The current time is Sat May 29 22:15:13 2004 Formatting... done Verifying media... pass 0 - pattern = 0xc6dec6de 8151/19/208 pass 1 - pattern = 0x6db6db6d 8151/19/208 Total of 0 defective blocks repaired. .No "format\*>" Ic partition .No "partition\*>" Ic print Current partition table (original): Total disk cylinders available: 8152 + 2 (reserved cylinders) Part Tag Flag Cylinders Size Blocks 0 root wm 0 - 60 129.86MB (61/0/0) 265960 1 swap wu 61 - 121 129.86MB (61/0/0) 265960 2 backup wu 0 - 8151 16.95GB (8152/0/0) 35542720 3 unassigned wm 0 0 (0/0/0) 0 4 unassigned wm 0 0 (0/0/0) 0 5 unassigned wm 0 0 (0/0/0) 0 6 usr wm 122 - 8151 16.69GB (8030/0/0) 35010800 7 unassigned wm 0 0 (0/0/0) 0 .No "partition\*>" Ic label .No "Ready to label disk, continue?" Ic y .No "partition\*>" Ic quit .No "format\*>" Ic quit .disp)

p After your disk has been labeled you need to create file systems on your slices. The Solaris .Xr newfs 1M command will create ffs file systems that can be used by .Nx . .(disp .No # Ic "/usr/sbin/newfs /dev/dsk/c0t1d0s0" .No # Ic "/usr/sbin/newfs /dev/dsk/c0t1d0s6" .disp) . t .To 2 "Installing NetBSD Software from Solaris" .Em "Installing NetBSD Software from Solaris"

p You should now mount your .Nx root and

a /usr partitions under Solaris so that you can populate the file systems with .Nx binaries. .(disp .No # Ic "/usr/sbin/mount /dev/dsk/c0t1d0s0 /mnt" .No # Ic "mkdir /mnt/usr" .No # Ic "/usr/sbin/mount /dev/dsk/c0t1d0s6 /mnt/usr" .disp)

p Now extract the distribution file sets .(disp .No # Ic "cd ~/netbsd/binary/sets" .No # Ic "gunzip *.tar.gz" .No # Ic "echo ~/netbsd/binary/sets/*.tar | (cd /mnt; xargs -n1 pax -rpe -f )" .disp)

p Now you should copy the .Nx second stage bootloader into your new root partition and install the bootblocks using Solaris's .Xr installboot 1M command. .(disp .No # Ic "cp ~/netbsd/installation/misc/ofwboot /mnt" .No # Ic "/usr/sbin/installboot ~/netbsd/installation/misc/bootblk /dev/rdsk/c0t1d0s0" .disp) . t .To 2 "Creating NetBSD Device Nodes under Solaris" .Em "Creating NetBSD Device Nodes under Solaris"

p This is not a necessary step. If your

a /dev directory is empty, the kernel will create a RAM disk with all of the essential device nodes each time the system boots. If you want to create the device nodes on disk, you will need to use the Solaris .Xr mknod 1M command. Look in

a /dev/MAKEDEV for the correct names, major and minor numbers, ownership, and permissions. . t .To 2 "Configuring the NetBSD system from Solaris" .Em "Configuring the NetBSD system from Solaris"

p To save effort, you may want to use your favorite Solaris editor to configure some of the files in

a /etc before booting into .Nx the first time. In particular, you should look at

a /etc/fstab ,

a /etc/rc.conf ,

a /etc/resolv.conf , and

a /etc/hosts . See the section below on .Sx "Post installation steps" before .Sx "Booting NetBSD for the first time" . .bullet) . .Ss Booting NetBSD for the first time .

p Now it is time to boot .Nx for the first time. Initially we'd suggest you c "boot netbsd -bs" , then try multiuser after that. If you boot single-user the .Nx incantation to make the root file system

q Pa / writable is

p .Dl netbsd# Ic "mount -u /dev/sd0a /"

p .Em Congratulations , you have successfully installed .Nx \*V.