Using WANBOOT from disk - a HowTo
Date: 29.07.2006
Author: Bernd Schemmer (Bernd.Schemmer@gmx.de)
Introduction
WANBOOT is a "new" installation method for installing a Solaris machine
from an jumpstart Server over the network. WANBOOT has a lot of
enhancements compared to the "old" installation method via bootp and
should be used for network installations if possible.
This Howto describes how to use WANBOOT on machines that do not have
WANBOOT support in the OBP and which can not use a CDROM for WANBOOT.
Prerequisites for this method are
- You must have access to the console of the machine
- There must be a running Solaris on the machine
Details
The only file that is necessary for WANBOOT is /platform/`uname -i`/wanboot.
Because of this it's sufficient to copy the current version of the
wanboot binary from (for example) the Solaris Installation CDROM to
this directory on one of the slices of any local harddisk of the
machine to get wanboot from disk to work.
The steps in detail:
1. Configure the machine to install as client on your installation
server for using WANBOOT to install
2. Select one of the existing slices on one of the internal harddisks
of the machine to install for the wanboot binary
This can be for example the existing boot slice or any other slice on
the disk. You can also put the wanboot binary on the disk on
which you want to install Solaris because the disk is only used to read
the wanboot binary. After the wanboot 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, e.g.
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
where mydisk is the disk device (either an device alias or the real
device name). If you use another slice than the default slice for the
wanboot binary the command should look like
ok> boot disk1:b -o prompt -F wanboot - install
where disk1 is the device alias and the letter after the colon specifys
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 WANBOOT prompt should be printed and
you can enter the neccessary information for the WANBOOT process and
continue the WANBOOT installation the normal way.
Example (Note: Some output is
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
<time unavailable> wanboot info: WAN boot messages->console
<time unavailable> wanboot info: Default net-config-strategy:
manual
boot>
Sample output from a session
installing a machine via WANBOOT from a disk
In this example we use the swap slice as temporary boot slice for the
WANBOOT process.
Example (Note: Some is output
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 WANBOOT 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
<time unavailable> wanboot info: WAN boot messages->console
<time unavailable> wanboot info: Default net-config-strategy:
manual
boot> host-ip=192.168.5.14
boot> router-ip=192.168.5.62
boot> subnet-mask=255.255.255.0
boot> hostname=mysun.test.dom
boot> client-id=0A03EF0E
boot>
bootserver=http://192.168.20.48/cgi-bin/wanboot-cgi
boot>
boot> list
host-ip: 192.168.5.14
subnet-mask: 255.255.255.192
router-ip: 192.168.5.62
hostname: mysun.test.dom
http-proxy: UNSET
client-id: 0A03EF0E
aes: *HIDDEN*
3des: *HIDDEN*
sha1: *HIDDEN*
bootserver: http://192.168.20.48/cgi-bin/wanboot-cgi
boot> go
<time unavailable> wanboot progress: wanbootfs: Read 128 of 128
kB (100%)
<time unavailable> wanboot info: wanbootfs: Download complete
Fri Jul 28 06:12:38 wanboot progress: miniroot: Read 248881 of 248881
kB (100%)
Fri Jul 28 06:12:38 wanboot info: miniroot: Download complete
SunOS Release 5.10 Version Generic_118833-17 64-bit
Copyright 1983-2005 Sun Microsystems, Inc. All rights reserved.
Use is subject to license terms.
Configuring devices.
Network interface was configured manually.
192.168.5.14
SUNW,qfe0: 100 Mbps half duplex link up - internal transceiver
SUNW,qfe1: 100 Mbps half duplex link up - internal transceiver
SUNW,qfe2: 100 Mbps half duplex link up - internal transceiver
SUNW,qfe3: 100 Mbps half duplex link up - internal transceiver
Beginning system identification...
syslogd: line 24: WARNING: loghost could not be resolved
Searching for configuration file(s)...
Jul 27 22:46:41 mysun.test.dom eri: SUNW,eri0 : 100 Mbps half duplex
link up
Using sysid configuration file
http://192.168.20.48/profiles/mysun.test.dom/sysidcfg
Search complete.
Discovering additional network configuration...
Completing system identification...
Starting remote procedure call (RPC) services: done.
System identification complete.
Starting Solaris installation program...
Searching for JumpStart directory...
Using rules.ok from http://192.168.20.48/profiles/mysun.test.dom.
Checking rules.ok file...
Using begin script: begin_script.sh
Using profile: profile
Using finish script: finish_script.sh
Executing JumpStart preinstall phase...
Executing begin script "begin_script.sh"...
Copying the missing files from the profile ...
Begin script begin_script.sh execution completed.
Searching for SolStart directory...
Checking rules.ok file...
Using begin script: install_begin
Using finish script: patch_finish
Executing SolStart preinstall phase...
Executing begin script "install_begin"...
Begin script install_begin execution completed.
Processing profile
- Opening Flash archive
- Validating Flash archive
- Selecting all disks
- Configuring boot device
- Configuring / (c2t0d0s0)
- Configuring swap (c2t0d0s1)
- Configuring /usr (c2t0d0s3)
- Configuring /var (c2t0d0s4)
- Deselecting unmodified
disk (c2t1d0)
Verifying disk configuration
- WARNING: Unused disk space
(c2t0d0)
Verifying space allocation
Preparing system for Flash install
Configuring disk (c2t0d0)
- Creating Solaris disk
label (VTOC)
Creating and checking UFS file systems
- Creating / (c2t0d0s0)
- Creating /usr (c2t0d0s3)
- Creating /var (c2t0d0s4)
Beginning Flash archive processing
Predeployment processing
16 blocks
16 blocks
16 blocks
No local customization defined
Extracting archive: Solaris 10
Extracted
0.00 MB ( 0% of 396.66 MB archive)
Extracted
1.00 MB ( 0% of 396.66 MB archive)
Extracted
2.00 MB ( 0% of 396.66 MB archive)
Extracted
3.00 MB ( 0% of 396.66 MB archive)
....
Extracted 394.00 MB (
99% of 396.66 MB archive)
Extracted 395.00 MB (
99% of 396.66 MB archive)
Extracted 396.00 MB (
99% of 396.66 MB archive)
Extracted 396.66 MB
(100% of 396.66 MB archive)
Extraction complete
Postdeployment processing
No local customization defined
Customizing system files
- Mount points table
(/etc/vfstab)
- Unselected disk mount
points (/var/sadm/system/data/vfstab.unselected)
- Network host addresses
(/etc/hosts)
- Network host addresses
(/etc/hosts)
- Environment variables
(/etc/default/init)
Cleaning devices
Customizing system devices
- Physical devices (/devices)
- Logical devices (/dev)
Installing boot information
- Installing boot blocks
(c2t0d0s0)
Installation log location
-
/a/var/sadm/system/logs/install_log (before reboot)
-
/var/sadm/system/logs/install_log (after reboot)
Flash installation complete
Executing JumpStart postinstall phase...
Executing finish script "finish_script.sh"...
...
Finish script finish_script.sh execution completed.
The begin script log 'begin.log'
is located in /var/sadm/system/logs after reboot.
The finish script log 'finish.log'
is located in /var/sadm/system/logs after reboot.
...
Jul 28 07:52:45 mysun.test.dom reboot: rebooted by root
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
Boot device:
/pci@8,600000/SUNW,qlc@4/fp@0,0/disk@w2100000c50ac4839,0:a File
and args:
SunOS Release 5.10 Version Generic_118833-17 64-bit
Copyright 1983-2005 Sun Microsystems, Inc. All rights reserved.
Use is subject to license terms.
Hostname: mysun
Configuring devices.
Loading smf(5) service descriptions: 93/93
mysun console login: