Solaris :: Create a Jumpstart server from ISO's
Thanks to reborg from the unix.com forum for this!
The Solaris 9 and later ISO images are laid out differently than previous versions of ISO images for Solaris
To set up a JumpStart server using the Solaris 9 OS and later CD-ROMs, you must have access to both slice 0 and slice 1 on the CDs. If you try to use an ISO image that is loopback mounted using the "lofi" driver it cannot recognize that slice 1 exists and, cannot access it.
To fix the problem, split the contents of slice 1 into it's own image file and then mount this image separately using lofi.
The following procedure describes how to do this.
<ls -l sol-9*>
-rw-r--r-- 1 root root 576364544 Jan 1 11:16 sol-9-u1-sparc-v1.iso -rw-r--r-- 1 root root 291962880 Jan 1 21:42 sol-9-u1-sparc-v2.iso
This only applies to CD 1, all other isos can be mounted using lofiadm in the normal way.
- Get a copy of the VTOC from the ISO image:
- < dd if=sol-9-u1-sparc-v1.iso of=vtoc bs=512 count=1>
- Find out where Slice 1 starts in the image and how long it is. The starting cylinder for slice 1 is located at offset 452 (decimal) into the VTOC; the length in blocks is at offset 456, with both being 4 bytes long.
- <od -D -j 452 -N 8 < vtoc>
- Produces output similar to:
- 0000000 0000000888 0000546560 0000010
- Slice 1 starts on cylinder 888 and is 546,560 blocks long. CDs for the Solaris OS always have 640 blocks per cylinder, so you can find the starting block of slice 1 as follows:
- <echo 888*640 | bc>
- Produces the following output:
- 568320
- So now you know s1 starts at block 568320 and is 546560 blocks long.
- Copy slice one into a separate file:
- <dd if=sol-9-u1-sparc-v1.iso of=sol-9-u1-sparc-v1-s1.iso bs=512 skip=568320 count=546560>
- Mount both slice 0 and slice 1 as follows:
- <mkdir –p /cd/s0>
- <mkdir /cd/s1>
- <lofiadm -a /path_to/sol-9-u1-sparc-v1.iso /dev/lofi/1>
- <lofiadm -a /path_to/sol-9-u1-sparc-v1-s1.iso /dev/lofi/2>
- When you mount slice 1, remember that it is a UFS partition, not HSFS as is usual on a CD-ROM:
- <mount -F hsfs -o ro /dev/lofi/1 /cd/s0>
- <mount -F ufs -o ro /dev/lofi/2 /cd/s1>
- Setup your jumpstart as normal:
- <cd /cd/s0/Solaris_9/Tools>
- <./setup_install_server /destination_dir>