Tuesday, March 12, 2013

Solaris 11: Custom Oracle Solaris 11 Installation Image


Create local Solaris 11 repository
The easiest way is to download the ISO image, burn to a DVD and insert into your DVD drive.  Then as root:

  • pkg set-publisher -G '*' -g file:///cdrom/sol11repo_full/repo solaris
 mount -F hsfs sol-11-11-repo-full.iso /mnt

  • zfs create -o atime=off -o compression=on rpool/export/repoSolaris11
  • rsync -aP /mnt/repo /export/repoSolaris11
  • pkgrepo -s /export/repoSolaris11/repo refresh
  • pkg set-publisher -G '*' -g /export/repoSolaris11/repo solaris
In my case, I put the repository on Linux NFS Server

pkg set-publisher -G '*' -g file:///mnt solaris

Custom Oracle Solaris 11 Installation Image

http://docs.oracle.com/cd/E23824_01/html/E21800/distroconst.html#scrolltocCreate ZFS: http://docs.oracle.com/cd/E19082-01/817-2271/gamnq/index.html
On Solaris 11 server, install distribution-constructor

# pkg install  distribution-constructor
# zfs create rpool/ai
# cd /root
# cp /usr/share/distro_const/dc_ai_sparc.xml .

     <target name="desired">
        <zpool name="rpool" action="use_existing">
          <filesystem name="rpool/ai" action="preserve"/>

        <publisher name="solaris">
          <origin name="file:///mnt"/>
          <origin name=""/>
          If mirrors for this publisher need to be set, specify them here.
          <!-- Uncomment before using
          <mirror name="mirror.example.com"></mirror>

Modify dc_ai_sparc.xml

Below are the commands to create bootable image and iso

# distro_const build /root/dc_ai_sparc.xml/usr/bin/dd if=/rpool/rpool/ai/build_data/boot_archive/platform/sun4u/lib/fs/hsfss/bootblk of=/rpool/rpool/ai/build_data/pkg_image/boot/hsfs.bootblock bs=1b oseekk=1 count=15 conv=sync

/usr/bin/mkisofs -quiet -o /rpool/rpool/ai/media/Oracle_Solaris_AI_SPARC.iso -G //rpool/rpool/ai/build_data/pkg_image/boot/hsfs.bootblock -B ... -N -l -ldots -R -D -volset myhost-2013-03-12T15:55:49.827736 -V Oracle_Solaris_AI_SPARC /rpool//rpool/ai/build_data/pkg_image

No comments:

Post a Comment