Friday, March 8, 2013

Combine Solaris Automated Install and Repository on one image

Quoted from  http://notallmicrosoft.blogspot.ca/2012/03/combine-solaris-automated-install-and.html
Combine Solaris Automated Install and Repository on one image

 

 Copy Oracle Solaris 11 11/11 Automated Installer from ISO to disk:

# mount -F hsfs sol-11-1111-ai-x86.iso /mnt
# cd /mnt
# mkdir /var/tmp/AIboot
# find . -depth -print | cpio -pdm /var/tmp/AIboot
# cd /
# umount /mnt

Copy Oracle Solaris 11 11/11 Repository Image from ISO to disk:
# mount -F hsfs sol-11-1111-repo-full.iso /mnt
# cd /mnt
# rsync -aP /mnt/repo/ /var/tmp/AIboot/repoSolaris11
# cd /
# umount /mnt

Check it and edit default manifest so that is uses local repository:
# du -hs /var/tmp/AIboot
7.0G /var/tmp/AIboot

# ls /var/tmp/AIboot

auto_install      devices           mnt               repoSolaris11     solaris.zlib
bin               export            platform          root              solarismisc.zlib
boot              home              proc              save              system
dev               jack              reconfigure       sbin              tmp

Edit /var/tmp/AIboot/auto_install/default.xml

             <publisher name="solaris">
                     <origin name="http://pkg.oracle.com/solaris/release"/>
             </publisher>

Change to:

             <publisher name="solaris">
                     <origin name="file:///.cdrom/repoSolaris11"/>
             </publisher>

Create a new ISO:
# mkisofs -o /var/tmp/output.iso -b boot/grub/stage2_eltorito \
-c .catalog -no-emul-boot -boot-load-size 4 \
-boot-info-table -N -R -U -allow-multidot -no-iso-translate \
-cache-inodes -iso-level 4 -d -D -V Solaris11 /var/tmp/AIboot

Warning: Creating ISO-9660:1999 (version 2) filesystem.
Warning: ISO-9660 filenames longer than 31 may cause buffer overflows in the OS.
Size of boot image is 4 sectors -> No emulation
Size of boot image is 4 sectors -> No emulation
0.99% done, estimate finish Fri Mar 9 13:23:05 2012
1.13% done, estimate finish Fri Mar 9 13:22:53 2012
...
99.83% done, estimate finish Fri Mar 9 13:37:07 2012
99.97% done, estimate finish Fri Mar 9 13:37:06 2012
Total translation table size: 2048
Total rockridge attributes bytes: 36023282
Total directory bytes: 68673536
Path table size(bytes): 136082
Max brk space used 10144000
3530910 extents written (6896 MB)

The above iso then was used to install Solaris 11 on VirtaulBox.

No comments:

Post a Comment