Home / Automated Installer / How to Use Distribution Constructor on Solaris 11 ?

How to Use Distribution Constructor on Solaris 11 ?

Distribution Constructor is a new term which is introduced in Solaris 11 to customize the Solaris 11 bootable ISO images. These bootable Solaris 11 images can be edited according to the environment.For an example, if you do not want to install some of the default packages from ISO which you have downloaded from oracle website,you can remove it and additional software or third party software can be added on top of the image.So the image is custom, re-distributable ISO or bootable USB image. 


Limitation:
The limitation of distribution constructor is that SPARC images can be created on SPARC systems and X86 images on X86 systems.You can’t create a X86 image from SPARC.

Installation of Distribution Constructor:(DC)
Install the DC from the IPS repository.

root@UAAIS:~# pkg publisher
PUBLISHER TYPE STATUS P LOCATION
solaris origin online F http://192.168.2.31/
root@UAAIS:~#
root@UAAIS:~# pkg install distribution-constructor
No updates necessary for this image.
root@UAAIS:~#
root@UAAIS:~# pkg list |grep distribution-constructor
install/distribution-constructor 0.5.11-0.175.1.0.0.24.1736 i--

As per the above command output,you can see DC is already installed.

Available Templates from DC:
These templates will be useful create a customized image.Just copy one of the file and edit it according to your need.

root@UAAIS:~# cd /usr/share/distro_const
root@UAAIS:/usr/share/distro_const# ls -lrt
total 169
-r--r--r-- 1 root sys 12104 Dec 23 17:11 boot_archive_contents_sparc.xml
-r--r--r-- 1 root sys 8756 Dec 23 17:11 dc_text_sparc.xml
-r--r--r-- 1 root sys 12117 Dec 23 17:11 dc_livecd.xml
-r--r--r-- 1 root sys 9895 Dec 23 17:11 dc_ai_sparc.xml
-r--r--r-- 1 root sys 8967 Dec 23 17:11 boot_archive_contents_x86.xml
drwxr-xr-x 2 root bin 6 Dec 23 17:11 profile
drwxr-xr-x 2 root bin 4 Dec 23 17:11 sort
-r--r--r-- 1 root sys 12788 Dec 23 17:11 dc_ai_x86.xml
-r--r--r-- 1 root sys 11713 Dec 23 17:11 dc_text_x86.xml
-r--r--r-- 1 root sys 1230 Dec 23 17:11 lang_facets.xml
root@UAAIS:/usr/share/distro_const#


1.Copy of the desired template to /var/tmp and edit it according to your need. 

root@UAAIS:/usr/share/distro_const# cp dc_text_x86.xml /var/tmp/template_dc_text_x86.xml
root@UAAIS:/usr/share/distro_const# cd /var/tmp
root@UAAIS:/var/tmp# cp template_dc_text_x86.xml arena_x86.xml


2.Edit the arena_x86.xml  according to your need. Here i have edited the few things from the template and you can see the difference on the below screen shot. 


3.List the check points of arena_x86.xml.

root@UAAIS:/var/tmp# distro_const build -l arena_x86.xml
Checkpoint Resumable Description
---------- --------- -----------
transfer-ips-install Transfer pkg contents from IPS
set-ips-attributes Set post-install IPS attributes
pre-pkg-img-mod Pre package image modification
ba-init Boot Archive Initialization
ba-config Boot Archive Configuration
ba-arch Boot Archive Archival
boot-setup Setup boot menu
pkg-img-mod Pkg image area modification
create-iso ISO media creation
create-usb USB media creation
root@UAAIS:/var/tmp#

According to what template you have chosen, the check points could defers. For an example ,if you going to use “dc_ai_x86.xml” , you can see the check points that defers.

root@UAAIS:/usr/share/distro_const# distro_const build -l dc_ai_x86.xml
Checkpoint Resumable Description
---------- --------- -----------
transfer-ips-install Transfer pkg contents from IPS
set-ips-attributes Set post-install IPS attributes
pre-pkg-img-mod Pre package image modification
ba-init Boot Archive Initialization
ba-config Boot Archive Configuration
ba-arch Boot Archive Archival
boot-setup Setup boot menu
pkg-img-mod Pkg image area modification
create-iso ISO media creation
create-usb USB media creation
ai-publish-package Publish pkg(5) repository
root@UAAIS:/usr/share/distro_const#

You can see that there is an additional check point has been added for AI template. 


4. Let us start creating the customized ISO image.

root@UAAIS:/var/tmp# distro_const build arena_x86.xml
03:06:04 Build datasets successfully setup
03:06:04 Simple log: /rpool/dc/UA-AI/logs/simple-log.2013-12-24.03:05
03:06:04 Detail Log: /rpool/dc/UA-AI/logs/detail-log.2013-12-24.03:05
03:06:05 Creating IPS image
03:06:12 Installing packages from:
03:06:12 solaris
03:06:12 origin: http://192.168.2.31/
Creating Plan (Evaluating mediators): |
03:10:22 Please review the licenses for the following packages post-install:
03:10:22 runtime/java/jre-7 (automatically accepted)
03:10:22 consolidation/osnet/osnet-incorporation (automatically accepted,
03:10:22 not displayed)
03:10:22 Package licenses may be viewed using the command:
03:10:22 pkg info --license
DOWNLOAD PKGS FILES XFER (MB) SPEED
Completed 505/505 64788/64788 569.5/569.5 145k/s

PHASE ITEMS
Installing new actions 89045/89045
Updating package state database Done
Updating image state Done
Creating fast lookup database Done
08:03:33 Setting post-install publishers to:
08:03:33 solaris
08:03:33 origin: http://192.168.2.31/
08:03:40 === Executing Pre-Package Image Modification Checkpoint ===
08:03:43 Preloading SMF repository
08:04:50 Applying SMF profile: /etc/svc/profile/generic_limited_net.xml
08:04:53 Applying SMF profile: /usr/share/distro_const/profile/generic.xml
08:04:55 Applying SMF profile: /usr/share/distro_const/profile/text.xml
08:04:57 Applying SMF profile: /etc/svc/profile/ns_files.xml
08:11:38 === Executing ba-init Checkpoint ===
08:12:19 Transferring files to /rpool/dc/UA-AI/build_data/boot_archive
08:14:14 === Executing Boot Archive Configuration Checkpoint ===
08:30:47 preparing boot archive
08:49:46 === Executing Boot Archive Archive Checkpoint ===
09:01:38 ramdisk will be 252 MB in size with an nbpi of 4096
09:01:38 Populating ramdisks
09:03:07 === Executing Archive Population Checkpoint ===
09:03:34 Transferring files to /rpool/dc/UA-AI/build_data/tmp/x86_lofimnt
09:27:22 === Executing Boot Loader Setup Checkpoint ===
09:27:22 Creating ISO boot configuration for firmware targets: bios, uefi64
09:27:22 Boot loader unique ident file name: .UAAIS-2013-12-24T08:31:33.201248
09:27:34 BIOS El Torito boot image name: boot/bios.img
09:27:34 UEFI El Torito boot image name: boot/uefi.img
09:27:34 Updating /rpool/dc/UA-AI/build_data/pkg_image/.image_info
09:27:34 Preparing MBR embedded GRUB2 boot image for USB
09:27:37 MBR embedded GRUB2 boot image complete
09:27:38 === Executing Pkg Image Modification Checkpoint ===
09:27:38 Removing sbin, kernel and lib from pkg_image area
09:27:44 Generating /usr file system archive
09:47:00 Compressing /usr file system archive using: lzma
09:59:45 Generating /mnt/misc file system archive
10:01:10 Compressing /mnt/misc file system archive using: lzma
10:03:25 === Executing Create ISO Checkpoint ==
10:03:25 Making final ISO image: /rpool/dc/UA-AI/media/Solaris_Text_X86.iso
10:04:30 === Executing Create USB Checkpoint ===
10:04:30 Making final USB image: /rpool/dc/UA-AI/media/Solaris_Text_X86.usb
root@UAAIS:/var/tmp#

We have successfully created customized Oracle Solaris Text Based X86 ISO image.
In the same way you can also create Oracle Solaris LiveCD X86 ISO image for graphical installation by copying the appropriate template from /usr/share/distro_const.

Creating customized image for Automated Installer:
If you want to create Custom image for AI installation,then you need to copy the dc_ai_x86.xml file from /usr/share/distro_const/ and customize it according to your need(Step 2)

1.Run the below command to create a image for AI .
# distro_const build dc_ai_x86.xml 
The above command will create a new ISO image under /rpool/dc/UA-AI/media/Solaris_AI_X86.iso (This location is depends on dc_ai_x86.xml).

2.Create the AI service for newly customized image which you have created using distro.

root@UAAIS:~# installadm create-service -n CUS_86SOS -s /rpool/dc/UA-AI/media/Solaris_AI_X86.iso
Creating service from: /rpool/dc/UA-AI/media/Solaris_AI_X86.iso
OK to use default image path: /export/auto_install/CUS_86SOS? [y/N]: y
Setting up the image ...


Note:You can’t use the Solaris_Text_X86.ISO or Solaris_LiveCD_X86.ISO for Automated Installer. You need to use Solaris_AI_X86.ISO file to create a installation service successfully. 

Hope this article is informative to you.Please leave a comment if you have any doubt.

Thank you for visiting UnixArena.

VMTURBO-CLOUD-CAPACITY

One comment

  1. hi can any one plz tell me after creating the services properly… how can i install the AI through netowrk (AI)

Leave a Reply

Your email address will not be published. Required fields are marked *