Modifying and Respinning a Bootable Solaris ISO Image
By Jim Connors-Oracle on Apr 21, 2008
As an adjunct to the previous blog post, a slightly customized boot environment capable of enabling serial console kernel debugging was required to diagnose Solaris install problems. The post itself mentioned that a nice way to accomplish this was to set up PXE network boot via Solaris jumpstart. It is indeed flexible and enables one to experiment with modifications and quickly test whether they perform as expected. The one downside to this environment is that an additional DHCP/TFTP boot server has to be configured. To eliminate that service, you could, once the customizations are well understood, simply create a new version of the Solaris install DVD with your customizations. Let's run through the process for a simple example.
1. Get a Solaris DVD. For this example, we'll use an interim build of the upcoming Solaris 10 Update 5.
2. Extract the the entire contents of the DVD.
# lofiadm -a /export/iso/s10x_u5b10_dvd.iso
# mkdir -p /iso
# mount -r -F hsfs /dev/lofi/1 /iso
# cd /iso
# mkdir /export/modified-s10x_u5b10
# find . -depth -print | cpio -pudm /export/modified-s10x_u5b10
3. Modify the content contained in /export/modified-s10x_u5b10. In this case, we'll change the boot/grub/menu.lst file found in this directory to look like:
#pragma ident "@(#)install_menu 1.1 05/09/01 SMI"
serial --unit=0 --speed=9600
title Solaris Serial Console ttya
kernel /boot/multiboot kernel/unix -B install_media=cdrom,console=ttya
4. Issue the following magic incantation to create a bootable ISO image based on the contents of the /export/modified-s10x_u5b10 directory.
# mkisofs -R -b boot/grub/stage2_eltorito -no-emul-boot -boot-load-size 4 -R -L -r -D -U \\
-joliet-long -max-iso9660-filenames -boot-info-table -o \\
Size of boot image is 4 sectors -> No emulation
1.80% done, estimate finish Fri Apr 18 15:55:13 2008
2.25% done, estimate finish Fri Apr 18 15:59:07 2008
2.70% done, estimate finish Fri Apr 18 15:58:37 2008
3.15% done, estimate finish Fri Apr 18 15:58:48 2008
98.43% done, estimate finish Fri Apr 18 15:59:37 2008
98.88% done, estimate finish Fri Apr 18 15:59:37 2008
99.33% done, estimate finish Fri Apr 18 15:59:36 2008
99.78% done, estimate finish Fri Apr 18 15:59:36 2008
Total translation table size: 2048
Total rockridge attributes bytes: 3075577
Total directory bytes: 18921472
Path table size(bytes): 148014
Max brk space used 1b24000
1112471 extents written (2172 MB)
Voila! Acknowledgements to Tom Haynes and this blog post which served as an excellent guide.