Child pages
  • Distribution Constructor
Skip to end of metadata
Go to start of metadata

Deprecation warning

The page has been migrated to https://docs.openindiana.org/dev/distribution-constructor/ . Avoid touching this wiki page.

Creating a Distro is straight forward (tested on snv_134 and oi_148):

# pfexec pkg install install/distribution-constructor
# cd /usr/share/distro_const/slim_cd

You will want to edit the xml configuration files, but for now lets just change the IPS repository location.

Lets use what is currently on your machine:

pkg publisher
PUBLISHER                             TYPE     STATUS   URI
opensolaris.org          (preferred)  origin   online   http://pkg-eu-2.opensolaris.org/dev/

Make a copy of slim_cd_x86.xml

 # pfexec cp slim_cd_x86.xml  new_slim_cd_x86.xml

then edit, replacing "http://pkg.opensolaris.org/release" with what you have in the above

 <pkg_repo_default_authority>
     <main
          url="http://pkg-eu-2.opensolaris.org/dev"
          authname="opensolaris.org"/>
     <!--
         If you want to use one or more  mirrors that are
         setup for the authority, specify the urls here.
      -->
      <!--  <mirror url="" /> -->
    
</pkg_repo_default_authority>

and

<post_install_repo_default_authority>
     <main
          url="http://pkg-eu-2.opensolaris.org/dev"
             authname="opensolaris.org"/>
     <!--
         If you want to use one or more  mirrors that are
         setup for the authority, specify the urls here.
      -->
      <!--  <mirror url="" /> -->
</post_install_repo_default_authority>

then run it:

# pfexec distro_const build ./new_slim_cd_x86.xml

then wait and you should get:

# ls -l /rpool/dc/media/
total 3227126
-rw-r--r--   1 root     root     867366912  Jul 31 22:01 OpenSolaris.iso
-r--r--r--   1 root     root     1040840192 Jul 31 22:21 OpenSolaris.usb

Attached is modified manifest and diff against original manifest used to create experimental OpenIndiana ISO image.

  • http://pkg.openindiana.org/exp repository contains onnv + pkg + caiman bits at version 145
  • slim_install package was replaced with a list of packages it depends on

Command used to obtain a list of slim_install dependencies:

for i in `pkg contents -rm slim_install|grep ^depend| \
grep -v "variant.arch=sparc"|sed s/.*fmri=//|sed s/@.*//|sed s%\ type=require%%`; \
do echo " <pkg name=\"pkg:/$i\"/>";
done

Logs of above procedure on  oi_148.

oi@openindiana:~/oi$ pfexec pkg install install/distribution-constructor
oi@openindiana:~/oi$  cd /usr/share/distro_const/slim_cd
oi@openindiana:/usr/share/distro_const/slim_cd$ pfexec cp slim_cd_x86.xml  new_slim_cd_x86.xml
oi@openindiana:/usr/share/distro_const/slim_cd$ pfexec distro_const build ./new_slim_cd_x86.xml
/usr/share/distro_const/DC-manifest.defval.xml validates
/tmp/new_slim_cd_x86_temp_6802.xml validates
Simple Log: /rpool/dc/logs/simple-log-2011-04-05-08-39-43
Detail Log: /rpool/dc/logs/detail-log-2011-04-05-08-39-43
Build started Tue Apr  5 08:39:43 2011
Distribution name: OpenIndiana_Live_X86
Build Area dataset: rpool/dc
Build Area mount point: /rpool/dc
==== im-pop: Image area creation
Initializing the IPS package image area: /rpool/dc/build_data/pkg_image
Setting preferred publisher: openindiana.org
        Origin repository: http://pkg.openindiana.org/dev
Verifying the contents of the IPS repository
Installing the designated packages
Uninstalling the designated packages
Setting post-install preferred publisher: openindiana.org
   à´àµà´;system-config-printer.desktop] ' for schema (/schemas/apps/control-center/cc_actions_list)
àgtk-update-icon-cache: Cache file created successfully.rg
gtk-update-icon-cache: Cache file created successfully.egacy
gtk-update-icon-cache: Cache file created successfully.
gtk-update-icon-cache: Cache file created successfully.
==== ba-init: Boot archive initialization _image/usr/share/gnome/autostart/vp-sysmon.desktop
309392 blocks/build_data/pkg_image/usr/share/gnome/autostà´àµà´;gnome-default-applications.desktop,à´ªàµy
2816 blocks                                  à´à´®à´¾à´àµ
36176 blocksrse file "/usr/share/appl à´¸à´àµ/services.desktop": File is empty
0 blockst parse file "/usr/share/appâications/shares.desktop": File is empty
88096 blocksile "/usr/share/aà´à´³àµions/nautilus-folder-handler.desktop":
 usage of MIME type "x-directory/gnome-default-handler" is d4624 blocks
("x-à´°à´¯àµà´à´àµan old media type that should be replaced with a modern equivalent)
à´0 blocks¾ പൠ"/usr/share/applications/nautilus-folder-handler.desktop":
usage of MIME type "x-directory/normal" is discouraged
(âx-0 blocksy" is an old media type that should be replaced with a modern equivalà´±àµà´;
gnome-appearance-properties.desktop,à´®àµà´¨àµ
528 blocksailed to parse default value `[à´°à´à´à´µà´¿à´¤à´¾à´¨à´ മാറàµ
32 blocks
176 blocks
352 blocks
0 blocks
48 blocks
20240 blocks
0 blocks
0 blocks
==== slim-ba-config: Slim CD boot archive configuration
==== ba-config: Boot archive configuration
==== ba-arch: Boot archive archiving (64-bit)
492384 blocks
343600 blocks
==== ba-arch-32: Boot archive archiving (32-bit)
492384 blocks
258672 blocks
==== slim-post-mod: Slim CD post boot archive image area modification
==== grub-setup: Grub menu setup
==== post-mod: Post boot archive image area modification
Warning: creating filesystem that does not conform to ISO-9660.
Warning: creating filesystem that does not conform to ISO-9660.
==== gen-cd-cont: Generate CD image content list
==== iso: ISO image creation
Warning: creating filesystem that does not conform to ISO-9660.
Setting input-charset to 'UTF-8' from locale.
Size of boot image is 4 sectors -> No emulation
  1.12% done, estimate finish Tue Apr  5 10:04:40 2011
 <snipped>
 98.05% done, estimate finish Tue Apr  5 10:05:10 2011
 99.17% done, estimate finish Tue Apr  5 10:05:10 2011
Total translation table size: 2048
Total rockridge attributes bytes: 31102
Total directory bytes: 196608
Path table size(bytes): 1256
Max brk space used 80000
448735 extents written (876 MB)
==== usb: USB image creation
/dev/rlofi/2:   2153400 sectors in 3589 cylinders of 1 tracks, 600 sectors
        1051.5MB in 113 cyl groups (32 c/g, 9.38MB/g, 2368 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
 32, 19232, 38432, 57632, 76832, 96032, 115232, 134432, 153632, 172832,
 1977632, 1996832, 2016032, 2035232, 2054432, 2073632, 2092832, 2112032,
 2131232, 2150432
1794464 blocks
Build completed Tue Apr  5 10:06:51 2011
Build is successful.
Unhandled exception in thread started by
Error in sys.excepthook:

Original exception was:
oi@openindiana:/usr/share/distro_const/slim_cd$ uname -a
SunOS openindiana 5.11 oi_148 i86pc i386 i86pc Solaris
oi@openindiana:/usr/share/distro_const/slim_cd$

The generated usb and iso images are in /rpool/dc/media.

oi@openindiana:~/oi$ ls -l /rpool/dc/media/OpenIndiana_Live_X86.*
-rw-r--r-- 1 root root  919009280 2011-04-05 10:05 /rpool/dc/media/OpenIndiana_Live_X86.iso
-r--r--r-- 1 root root 1102811648 2011-04-05 10:05 /rpool/dc/media/OpenIndiana_Live_X86.usb
oi@openindiana:~/oi$
  • Verification
  1. tjyang use /rpool/dc/media/OpenIndiana_Live_X86.iso to build a VMWare session.
  2. Use /rpool/dc/media/OpenIndiana_Live_X86.usb to build on a laptop machine.
  • No labels

2 Comments

  1. Anonymous

    I am playing with "distro_const" on oi_151a and I can indeed make the "default" ISO and USB images, it works fine following the above instructions.

    But I want to include a custom local illumos-gate nightly build (e.g. https://www.illumos.org/projects/illumos-gate/wiki/How_To_Build_illumos) built on my oi_151a system to make a new live CD/ISO but "equivalent" to the new nightly BE that I just built from illumos-gate.

    To this end can anyone post a custom "slim_cd_x86.xml" that might guide me a bit on how to accomplish my task such that I can inspect the syntax inside the XML. I imagine if I can look at the difference between the default "slim_cd_x86.xml" and a custom one I can figure out how add consolidations to the XML file.  

    I also think (could be wrong) I could run a command like 'pkg info | grep FMRI' from inside my new 'active' nightly BE to get a list of packages I need to put into the XML file "slim_cd_x86.xml

    Any help or a new section on this would be appreciated.

  2. Anonymous

    Perhaps you confusion arises from the fact in the above instructions

    is a 'dead' link - maybe it would have shed some light for you ?