NetBSD/distrib/notes/sparc64/install

489 lines
14 KiB
Plaintext
Raw Normal View History

.\" $NetBSD: install,v 1.21 2004/06/10 07:23:49 mbw Exp $
.\"
2002-06-30 16:48:46 +04:00
.\" 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.
.Pp
There are several ways to install
.Nx
2002-06-30 16:48:46 +04:00
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
2002-06-18 05:42:10 +04:00
can use a miniroot image that can be booted off your local disk's swap
2002-06-30 16:48:46 +04:00
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).
.Pp
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"
.
2002-06-18 05:42:10 +04:00
.Ss2 Installing NetBSD from CDROM
.
Installing from CDROM, whether it has the full distribution or just
2002-06-30 16:48:46 +04:00
a kernel and
.Ic 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)
2002-06-18 05:42:10 +04:00
.Pp
This Open Firmware boot command will cause the
2002-06-18 05:42:10 +04:00
.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.
2002-06-18 05:42:10 +04:00
.
.Ss2 Installing NetBSD by using the NetBSD miniroot
.
The miniroot is a self-contained
.Nx
file system holding all utilities
necessary to install
.Nx
2002-06-30 16:48:46 +04:00
on a local disk.
It is distributed as a plain
file designed to be transferred to a raw disk partition from which it can
2002-06-30 16:48:46 +04:00
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.
.Pp
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)
.Pp
2002-06-30 16:48:46 +04:00
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)
2003-05-14 18:06:06 +04:00
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
2003-05-14 18:06:06 +04:00
or
.Li /dev/rsd0b
with your swap partition.
.Pp
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
.Pa 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
2002-06-30 16:48:46 +04:00
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.
.Pp
First, copy the
.Pa 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
.Pp
Now, netboot your system from the server by entering the appropriate
.Ic 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)
.Pp
2002-06-30 16:48:46 +04:00
To begin installation or the upgrade procedure, run
.Ic sysinst :
.Pp
.Dl netbsd# Ic sysinst
.
.Ss2 Running sysinst
.
2002-06-18 05:42:10 +04:00
Once you have a miniroot booted, the first thing
.Nx
2002-06-30 16:48:46 +04:00
will ask you for is a terminal.
If you are running on the keyboard and mouse you want to select
2002-06-18 05:42:10 +04:00
.Ic sun
while if you are using a serial console from an X terminal you need to select
.Ic xterm
Selecting the wrong terminal settings may cause display corruption or
2002-06-30 16:48:46 +04:00
.Ic sysinst
may fail to run.
2002-06-18 05:42:10 +04:00
.Pp
.
2002-06-30 16:48:46 +04:00
The
.Ic 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
.Ic sysinst
proceeds with each phase of the
installation process.
.Pp
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
2002-06-30 16:48:46 +04:00
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.
.Pp
The sysinst goes through the following phases:
.(bullet
determination of the disk to install
.Nx
on
.It
checking of the partition information on the disk
.It
setting of the local timezone
.It
creating and mounting the
.Nx
file systems
.It
setup of IP configuration
.It
extraction of the distribution tar files
.It
installation of boot programs
.bullet)
.
.Ss2 Manual Installation of NetBSD using Solaris
.
(Adapted from Murray Stokely's \*<murray@osd.bsdi.com\*> instructions)
.Pp
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" .
.Pp
.(bullet
.To 2 "Preparing the disk in Solaris"
.Em "Preparing the disk in Solaris"
.Pp
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
.Pa /usr No or Pa /var
partitions.
.Pp
.(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)
.Pp
After your disk has been labeled you need to create file systems on
2002-06-30 16:48:46 +04:00
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)
.
.It
.To 2 "Installing NetBSD Software from Solaris"
.Em "Installing NetBSD Software from Solaris"
.Pp
You should now mount your
.Nx
root and
.Pa /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)
.Pp
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)
.Pp
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)
.
.It
.To 2 "Creating NetBSD Device Nodes under Solaris"
.Em "Creating NetBSD Device Nodes under Solaris"
.Pp
This is not a necessary step. If your
.Pa /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
.Pa /dev/MAKEDEV
for the correct names, major and minor numbers, ownership, and
permissions.
.
.It
.To 2 "Configuring the NetBSD system from Solaris"
.Em "Configuring the NetBSD system from Solaris"
.Pp
To save effort, you may want to use your favorite Solaris editor
to configure some of the files in
.Pa /etc
before booting into
.Nx
the first time. In particular, you should look at
.Pa /etc/fstab ,
.Pa /etc/rc.conf ,
.Pa /etc/resolv.conf ,
and
.Pa /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
.
.Pp
Now it is time to boot
.Nx
2002-06-30 16:48:46 +04:00
for the first time.
Initially we'd suggest you
.Ic "boot netbsd -bs" ,
2002-06-30 16:48:46 +04:00
then try multiuser after that.
If you boot single-user the
.Nx
incantation to make the root file system
.Pq Pa /
writable is
.Pp
.Dl netbsd# Ic "mount -u /dev/sd0a /"
.Pp
.Em Congratulations ,
you have successfully installed
.Nx
\*V.