Virtual Guru's Blog – Home of Virtualization Workshops

January 6, 2010

OpenSolaris JeOS Prototype (Part 16: Inst from lists pkgs BE)

Filed under: jeos, opensolaris, Virtualization — natiku @ 5:54 am

This entry is part of OpenSolaris JeOS (Just Enough Operating System) Prototype workshop.

L5 osol0906inst Try JeOS Install List scenario


This steps are now udated for OpenSolaris 2009.06 fresh Live-CD installation

1. Check drivers first

We also need to add 32bit VMware network driver for AMD am79c97x PCNET , pcn driver

pkg  contents -o "pkg.name,path" | egrep "drv/e1000g$|drv/vgatext$|drv/sd$|drv/ecpp$|drv/fd$|drv/pci-ide$|drv/mpt$|egrep "drv/pcn$""
SUNWintgige                    kernel/drv/e1000g
SUNWpsdcr                      kernel/drv/ecpp
SUNWpsdcr                      kernel/drv/fd
SUNWckr                        kernel/drv/mpt
SUNWos86r                      kernel/drv/sd
SUNWos86r                    kernel/drv/pcn
SUNWckr                        kernel/drv/vgatext
SUNWpsdir                      platform/i86pc/kernel/drv/pci-ide
SUNWpsdir                      platform/i86xpv/kernel/drv/pci-ide
pkg list -s | egrep "SUNWintgige|SUNWpsdcr|SUNWckr|SUNWos86r|SUNWpsdir"
SUNWckr                        Core Solaris Kernel
SUNWintgige                    Intel(R) PRO/1000 Server Adapter Driver
SUNWos86r                      Platform Support, OS Functionality
SUNWpsdcr                      Platform Support, Bus-independent Device Drivers
SUNWpsdir                      Platform Support, ISA Bus Device Drivers
Save it as /tmp/esxdrv.lst

2. Delete original install snapshot

zfs list -r -t snapshot
NAME                             USED  AVAIL  REFER  MOUNTPOINT
rpool/ROOT/opensolaris@install   146M      -  2.82G  -
zfs destroy rpool/ROOT/opensolaris@install

3. Create a new BE

beadm list
BE          Active Mountpoint Space Policy Created
--          ------ ---------- ----- ------ -------
opensolaris NR     /          2.86G static 2009-05-18 11:42
beadm create -d "OpenSolaris 2009.06 snv_111b X86  JeOS text boot" osol0906inst
beadm list
BE           Active Mountpoint Space Policy Created
--           ------ ---------- ----- ------ -------
opensolaris  NR     /          2.86G static 2009-05-18 11:42
osol0906inst -      -          74.0K static 2009-06-09 14:1
zpool list
NAME    SIZE   USED  AVAIL    CAP  HEALTH  ALTROOT
rpool  9.88G  3.47G  6.40G    35%  ONLINE  -
zfs list
NAME                      USED  AVAIL  REFER  MOUNTPOINT
rpool                    3.87G  5.85G    78K  /rpool
rpool/ROOT               2.86G  5.85G    19K  legacy
rpool/ROOT/opensolaris   2.86G  5.85G  2.86G  /
rpool/ROOT/osol0906inst    74K  5.85G  2.86G  /
zfs list -r -t snapshot
NAME                                  USED  AVAIL  REFER  MOUNTPOINT
rpool/ROOT/opensolaris@osol0906inst    28K      -  2.86G  -

4. Mount Created BE and clean it

mkdir /tmp/jeosinst
beadm mount osol0906inst /tmp/jeosinst
beadm list
BE           Active Mountpoint    Space Policy Created
--           ------ ----------    ----- ------ -------
opensolaris  NR     /             2.86G static 2009-05-18 11:42
osol0906inst -      /tmp/jeosinst 74.0K static 2009-06-09 14:18
rm -r /tmp/jeosinst/*

5. Initialize IPS in BE (main repo and mirror)

pkg image-create -F -a opensolaris.org=http://pkg.opensolaris.org:80/release /tmp/jeosinst
pkg -R /tmp/jeosinst set-publisher -m  http://ipkg.czech.sun.com:8000 opensolaris.org
pkg -R /tmp/jeosinst set-property flush-content-cache-on-success True

6. Install entire and 2 CORE packages to force dependencies

We needs to process manually first SUNWcsd and SUNWcs , otherwise installation will be broken !!!!

pkg -R /tmp/jeosinst/ install --no-index --no-refresh entire@0.5.11-0.111
PHASE                                        ACTIONS
Install Phase                              1368/1368
pkg -R /tmp/jeosinst/ install --no-index --no-refresh SUNWcsd
pkg -R /tmp/jeosinst/ install --no-index --no-refresh SUNWcsd
DOWNLOAD                                    PKGS       FILES     XFER (MB)
Completed                                    1/1       15/15     0.01/0.01
pkg -R /tmp/jeosinst/ install --no-index --no-refresh SUNWcs
DOWNLOAD                                    PKGS       FILES     XFER (MB)
Completed                                  20/20   3556/3556   58.44/58.4
pkg -R /tmp/jeosinst/ list -s
NAME (PUBLISHER)               SUMMARY
SUNWckr                        Core Solaris Kernel
SUNWcs                          Core Solaris
SUNWcsd                        Core Solaris Devices
SUNWcsl                         Core Solaris, (Shared Libs)
SUNWinstall-libs              System install libraries
SUNWlibms                     Math & Microtasking Libraries
SUNWlibsasl                    SASL v2
SUNWlxml                      The XML library
SUNWmd                        Solaris Volume Manager
SUNWopenssl                  OpenSSL Commands
SUNWperl584core            Perl 5.8.4 (core)
SUNWpicl                       PICL Libraries, and Plugin Modules
SUNWpool                      Resource Pools
SUNWpr                         Netscape Portable Runtime
SUNWsmapi                    Storage Management APIs
SUNWtecla                      Tecla command-line editing library
SUNWtls                         Network Security Services
SUNWwbsup                   WAN boot support
SUNWzfs                        ZFS
SUNWzlib                       The Zip compression library
SUNWzone                     Solaris Zones
entire                              entire incorporation
du -s -h /tmp/jeosinst/
176M    /tmp/jeosinst/

7. Install rest of packages from prepared JeOS install list plus ads drivers list too

Links to actual JeOS pkgs lists are here

Note: xargs line is limited to 2048 bytes , you can wrap drives into separate install if you hit this limitation
cat /tmp/OSOL0906-JeOS-pkgs.lst /tmp/OSOL0906-JeOS-drvs.lst | grep -v "^#" | awk \
'{print $1}' | xargs -t pkg -R /tmp/jeosinst install --no-index --no-refresh
DOWNLOAD                                    PKGS       FILES     XFER (MB)
Completed                                135/135 37995/37995 153.66/153.66

8. Check sizes after install

du -s -h /tmp/jeosinst/
694M    /tmp/jeosinst/
zfs list
NAME                      USED  AVAIL  REFER  MOUNTPOINT
rpool                    4.55G  5.17G    78K  /rpool
rpool/ROOT               3.53G  5.17G    19K  legacy
rpool/ROOT/opensolaris   2.87G  5.17G  2.86G  /
rpool/ROOT/osol0906inst   681M  5.17G   681M  /tmp/jeosinst
zfs list -r -t snapshot
NAME                                  USED  AVAIL  REFER  MOUNTPOINT
rpool/ROOT/opensolaris@osol0906inst  7.25M      -  2.86G  -

8. Copy needed data from originlan BE so we have seme login infos and so on (We share export with homes )

Files normally in slim_install or slim_cd package, so we need to need to populate them manually
cp /etc/pam.conf /tmp/jeosinst/etc/pam.conf
cp /etc/passwd /tmp/jeosinst/etc/passwd
cp /etc/shadow /tmp/jeosinst/etc/shadow
cp /etc/user_attr /tmp/jeosinst/etc/user_attr
cp /etc/vfstab /tmp/jeosinst/etc/

9. Initialize SMF database

Use mkrepo script from distro constructor (SUNWdistro-const) to pre-intialize SMF (I comment last lines there with :true)

/tmp/mkrepo /tmp/jeosinst none /tmp/jeosinst

None: You will probasly hit this warning 6668postrun service missing stop method missing – stops post installs of opensolaris

9. Force HW reconfigure next boot and generate boot archive

touch /tmp/jeosinst/etc/.UNCONFIGURED
touch /tmp/jeosinst/reconfigure
devfsadm -R /tmp/jeosinst
bootadm update-archive -R /tmp/jeosinst
Creating boot_archive for /tmp/jeosinst
updating /tmp/jeosinst/platform/i86pc/amd64/boot_archive
updating /tmp/jeosinst/platform/i86pc/boot_archive

10. Clean GRUB from GUI related boot

Clean GUI stuff (menu and background) )in /rpool/boot/grub/menu.lst (make it same as text boot)

nano /rpool/boot/grub/menu.lst

11. Umount new BE environment

beadm list
BE           Active Mountpoint    Space   Policy Created
--           ------ ----------    -----   ------ -------
opensolaris  N      /             2.88G   static 2009-05-18 11:42
osol0906inst R      /tmp/jeosinst 765.33M static 2009-06-09 14:18
du -s -h /tmp/jeosinst/
780M    /tmp/jeosinst/
beadm umount jeosinst

12. Reboot into new BE

init 6; exit

Advertisements

3 Comments »

  1. […] See here , how I find drivers and packages for Virtual Environments […]

    Pingback by OpenSolaris JeOS Prototype (Part 22: B130 JeOS First Touch – Real HW tips) « Virtual Guru's Blog – Home of Virtualization Workshops — January 31, 2010 @ 8:47 am

  2. […] L5 osol0906inst Try JeOS Install List scenario […]

    Pingback by OpenSolaris JeOS (Main Page) « Virtual Guru's Blog – Home of Virtualization Workshops — February 7, 2010 @ 3:50 pm

  3. […] Second we will reuse a Multi BE approach to OS reductions / Packages list checking Reduction strategy /Multiple BEs, especially L5 osol0906inst Try JeOS Install List scenario […]

    Pingback by OpenSolaris JeOS Prototype (Part 18: B130 JeOS First Touch – pkgs list) « Virtual Guru's Blog – Home of Virtualization Workshops — February 7, 2010 @ 7:27 pm


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: