view counter

Solaris 11 Automated Install without a network boot

Thanks to Andrew Watkins for this story

After my last blog about Solaris 11 Automated Installer quick setup guide in a zone I did some more reading and I realised that you don't require to boot the client with DHCP, but boot it from a local device (CD or USB).

view counter

If you check out the download page for solaris down you will see Automated Installer can be downloaded as an ISO or USB version. If you download this and put it on to a CD or USB you can boot your client with it. When you boot it you see

Oracle Solaris 11 11/11 Automated Install custom
Oracle Solaris 11 11/11 Automated Install
Oracle Solaris 11 11/11 Automated Install custom ttya
Oracle Solaris 11 11/11 Automated Install custom ttyb
Oracle Solaris 11 11/11 Automated Install ttya
Oracle Solaris 11 11/11 Automated Install ttyb

  • Picking Oracle Solaris 11 11/11 Automated Install custom means you will be prompted for a URL where your manifest is located on the network
  • Picking Oracle Solaris 11 11/11 Automated Install will install Solaris using a default manifest

Modifying the default settings:
If you have placed the AI image onto a USB then you can edit it and change the default manifest.

  • Mount the USB image (USB)
# ls /media/DataTraveler 2.0
. .volsetid   jack  sbin
.. auto_install lost+found solaris.zlib
.catalog bin mnt solarismisc.zlib
.cdrom boot platform system
.image_info dev proc tmp
.liveusb devices reconfigure
.SELF-ASSEMBLY-REQUIRED export root
.transfer-manifest.xml home
save

Edit the default.xml file:

# vi /media/DataTraveler 2.0/auto_install/manifest/default.xml

You would think you could edit the default profile as well, but you can't since it uses the default one located at /usr/share/auto_install/sc_profiles/enable_sci.xml which is not accessible, since /usr is a lofi mount. I think this should be classed as a bug, since you would expect it to use /auto_install/sc_profiles.

I have just filed a BUG report with Oracle for this

This is the way it should be done, if this BUG did not exist!!!

Edit default system configuration file:

# cd /media/DataTraveler 2.0/auto_install/sc_profiles/
# vi enable_sci.xml


Or use the sample one:

# cd /media/DataTraveler 2.0/auto_install/sc_profiles/
# cp sc_sample.xml enable_sci.xml

This is the way you have to do it now. Long way!!! We have to replace the solaris.zlib on the image

As before we mount the USB image

# cd /media/DataTraveler 2.0

Mount the image

# lofiadm -a solaris.zlib
# mount -F hsfs /dev/lofi/1 /mnt

Now copy the whole image

# mkdir /export/newsolaris
# cd /mnt
# find . -depth -print | cpio -pdm /export/newsolaris
# cd /export/newsolaris

Now we finally get to making are changes

# cd ./share/auto_install/sc_profiles/
# ls -l
total 27
-r--r--r-- 1 root sys 3104 Feb 23 17:39 enable_sci.xml
-r--r--r-- 1 root sys 3104 Oct 21 00:04 sc_sample.xml
-r--r--r-- 1 root sys 4656 Oct 21 00:04 static_network.xml
# cp -ip sc_sample.xml enable_sci.xml
#

Now re-create the solaris.zlib image

# mkisofs -o /tmp/solaris.zlib -quiet -N -l -R -U -allow-multidot -no-iso-translate -cache-inodes -d -D -V "compress" /export/newsolaris
Warning: creating filesystem that does not conform to ISO-9660.

It needs to be compressed

# lofiadm -C lzma /tmp/solaris.zlib

Copy it back to the USB image
# cp /tmp/solaris.zlib /media/DataTraveler 2.0
If you want to create an ISO so that you can test it on VirtualBox. Try:
# /usr/bin/mkisofs -d -D -J -l -r -U -relaxed-filenames -b boot/grub/stage2_eltorito -no-emul-boot -boot-load-size 4 -boot-info-table -c .catalog -V "my_volume_name" -o /var/tmp/output.iso "/media/DataTraveler 2.0"
Warning: creating filesystem that does not conform to ISO-9660.
Setting input-charset to 'UTF-8' from locale.
Size of boot image is 4 sectors -> No emulation
Size of boot image is 4 sectors -> No emulation
3.59% done, estimate finish Mon Feb 27 13:03:22 2012
7.17% done, estimate finish Mon Feb 27 13:03:22 2012
.....
96.77% done, estimate finish Mon Feb 27 13:03:33 2012
Total translation table size: 2048
Total rockridge attributes bytes: 45685
Total directory bytes: 290816
Path table size(bytes): 1864
Max brk space used 7e000
139507 extents written (272 MB)

Save it and try it out!
You still require a network since the install still uses a network IPS repository

I have tested it with VirtualBox booting of an iso file I created from the USB image.

Read the entire article at its source

view counter