Sunday, February 8, 2009

Using WAN Boot From a Hard Disk on a System Running Solaris 9 and Above

Introduction

WAN boot is a "new" method for installing a machine running the Solaris Operating System from a Solaris JumpStart server over the network. WAN boot has a lot of enhancements compared to the "old" installation method via bootp and should be used for network installations if possible. (Note: WAN boot is only supported on machines with SPARC CPUs. You cannot use WAN boot on machines running the Solaris OS for x86 platforms.)

This article describes how to use WAN boot on machines that do not have WAN boot support in the OBP and cannot use a CD-ROM for WAN boot.

This method requires:

  • Access to the console of the machine
  • The Solaris OS running on the machine

Details

The only file that is necessary for WAN boot is /platform/`uname -i`/wanboot. Therefore, to get WAN boot from the disk to work, it is sufficient to copy the current version of the WAN boot binary from (for example) the Solaris Installation CD-ROM to the directory /platform/`uname -i` on one of the slices of any local hard disk of the machine.

The Steps

1. Configure the machine to install as a WAN boot client on your installation server.

2. Select one of the existing slices on one of the internal hard disks of the machine to install for the WAN boot binary. For example, this can be the existing boot slice or any other slice on the disk. You can also put the WAN boot binary on the disk on which you want to install the Solaris OS, because the disk is only used to read the WAN boot binary. After the WAN boot binary is read and executed, the disk is not used anymore for the boot process.

3. Make the selected slice bootable using installboot if the slice is not already bootable; that is:

installboot /usr/platform/`uname -i`/lib/fs/ufs/bootblk  /dev/rdsk/c2t1d0s0

If in doubt, issue the installboot command. (It won't hurt if the slice is already bootable.)

4. Halt the machine and issue the following boot command at the ok prompt:

ok> boot mydisk  -o prompt -F wanboot - install

Here mydisk is the disk device (either a device alias or the real device name). If you use a slice other than the default slice for the WAN boot binary, the command should look like this:

ok> boot disk1:b  -o prompt -F wanboot - install

Here disk1 is the device alias and the letter after the colon specifies the slice to boot from: a is slice 0, b is slice 1, c is slice 2, and so on.

5. After a short time, the normal WAN boot prompt should be printed and you can enter the necessary information for the WAN boot process and continue the WAN boot installation the normal way.

Example 1

Example 1 shows the machine output from step 4 in the preceding description. Note: Some output has been replaced with "x" characters.

{0} ok boot disk1  -o prompt -F wanboot - install
Resetting ...
RSC Alert: Host System has Reset
Probing system devices
Probing system devices


Sun Fire 280R (2 X UltraSPARC-III) , No Keyboard
Copyright 1998-2004 Sun Microsystems, Inc. All rights reserved.
OpenBoot 4.16.4, 4096 MB memory installed, Serial #xxxxxxxx.
Ethernet address x:x:x:x:x:x, Host ID: xxxxxxxx.



Rebooting with command: boot disk1 -o prompt -F wanboot - install
Boot device: /pci@8,600000/SUNW,qlc@4/fp@0,0/disk@1,0 File and args: -o
prompt -F wanboot - install

Example 2

Here is sample output from a session installing a machine via WAN boot from a disk. In this example, we use the swap slice as the temporary boot slice for the WAN boot process. Note: Some output has been replaced with "x" characters and edited for security reasons.

bash-3.00# uname -a
SunOS mysun 5.10 Generic_118833-17 sun4u sparc SUNW,Sun-Fire-280R

### first remove the swap slice

bash-3.00# swap -l
swapfile dev swaplo blocks free
/dev/dsk/c2t0d0s1 118,1 16 16779296 16739648

bash-3.00# swap -d /dev/dsk/c2t0d0s1
/dev/dsk/c2t0d0s1 was dump device --
invoking dumpadm(1M) -d swap to select new dump device
dumpadm: no swap devices are available

bash-3.00# swap -l
No swap devices configured

### remove the swap entry from the /etc/vfstab because otherwise newfs will fail

bash-3.00# cp /etc/vfstab /etc/vfstab.org

bash-3.00# grep -v swap /etc/vfstab.org > /etc/vfstab

bash-3.00# grep -v "^#" /etc/vfstab | grep -v "^$"
fd - /dev/fd fd - no -
/proc - /proc proc - no -
/dev/dsk/c2t0d0s0 /dev/rdsk/c2t0d0s0 / ufs 1 no -
/dev/dsk/c2t0d0s3 /dev/rdsk/c2t0d0s3 /usr ufs 1 no -
/dev/dsk/c2t0d0s4 /dev/rdsk/c2t0d0s4 /var ufs 1 no -
/devices - /devices devfs - no -
ctfs - /system/contract ctfs - no -
objfs - /system/object objfs - no -

### create a filesystem on the slice

bash-3.00# newfs /dev/rdsk/c2t0d0s1
newfs: construct a new file system /dev/rdsk/c2t0d0s1: (y/n)? y
Warning: 6096 sector(s) in last cylinder unallocated
/dev/rdsk/c2t0d0s1: 16779312 sectors in 2732 cylinders of 48 tracks, 128 sectors
8193.0MB in 171 cyl groups (16 c/g, 48.00MB/g, 5824 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
32, 98464, 196896, 295328, 393760, 492192, 590624, 689056, 787488, 885920,
15831200, 15929632, 16028064, 16126496, 16224928, 16323360, 16421792,
16520224, 16618656, 16717088
bash-3.00#

### mount the slice

bash-3.00# mount /dev/dsk/c2t0d0s1 /tmp/mnt2

### mount the directory with the Solaris 10 boot image from the installation server

bash-3.00# mount installserver:/export/install /tmp/mnt1

### copy the necessary files for WAN boot to the slice on the local disk

bash-3.00# cd /tmp/mnt1/Solaris10_U2/Solaris_10/Tools/Boot/

bash-3.00# find . -name "wanboot" | cpio -pdumv /tmp/mnt2
/tmp/mnt2/usr/lib/inet/wanboot
/tmp/mnt2/platform/sun4u/wanboot
/tmp/mnt2/platform/sun4v/wanboot
/tmp/mnt2/platform/sun4us/wanboot
6384 blocks

bash-3.00# find /tmp/mnt2
/tmp/mnt2
/tmp/mnt2/lost+found
/tmp/mnt2/usr
/tmp/mnt2/usr/lib
/tmp/mnt2/usr/lib/inet
/tmp/mnt2/usr/lib/inet/wanboot
/tmp/mnt2/platform
/tmp/mnt2/platform/sun4u
/tmp/mnt2/platform/sun4u/wanboot
/tmp/mnt2/platform/sun4v
/tmp/mnt2/platform/sun4v/wanboot
/tmp/mnt2/platform/sun4us
/tmp/mnt2/platform/sun4us/wanboot

### make the slice bootable

bash-3.00# installboot /usr/platform/`uname -i`/lib/fs/ufs/bootblk /dev/rdsk/c2t0d0s1

### now start the WANBOOT

bash-3.00# reboot -- "disk:b -o prompt -F wanboot - install "
Jul 28 07:09:42 mysun reboot: rebooted by root
Jul 28 07:09:43 mysun syslogd: going down on signal 15
syncing file systems... done
rebooting...
Resetting ...
RSC Alert: Host System has Reset
Probing system devices
Probing system devices


Sun Fire 280R (2 X UltraSPARC-III) , No Keyboard
Copyright 1998-2004 Sun Microsystems, Inc. All rights reserved.
OpenBoot 4.16.4, 4096 MB memory installed, Serial #xxxxxxxx.
Ethernet address x:x:xx:x:xx:xx, Host ID: xxxxxxxx.



Rebooting with command: boot disk:b -o prompt -F wanboot - install
Boot device: /pci@8,600000/SUNW,qlc@4/fp@0,0/disk@0,0:b
File and args: -o prompt -F wanboot - install

If you have questions on this How-To, please contact Bernd Schemmer.


Article Source: http://www.sun.com/bigadmin/content/submitted/wanboot_from_disk.html

0 comments:

 
Design and Bloggerized by JMD Computer