Virtual Guru's Blog – Home of Virtualization Workshops

December 21, 2009

OpenSolaris JeOS Prototype (Part 12: Simple BE setup)

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

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

Create Primary OpenSolaris 2000906 Boot Environment (BE)
Create JeOS configs for various OpenSolaris 200906 Boot Environment (BE)
   L0 osol0060gui Backup of Original Installation with GUI Boot mode
   L1 osol0906cli Original Installation with CLI Boot mode


Create Primary OpenSolaris 2000906 Boot Environment (BE)

Installing OpenSolaris 200906

Get latest CD image from OpenSolaris.org osol-0906-x86.iso (No more 2 CD variants for 0906)

Install in into VirtualBox 2.2.4 , 1GB RAM, LSI-SCSI, 20GB Growable Virtual Drive

Root Password: osol0906
User: osol Password: justone1

Create a Application Data storage under /export/apps

zfs create rpool/export/apps
zfs list | grep export
rpool/export             658K  11.6G    19K  /export
rpool/export/apps         18K  11.6G    18K  /export/apps
rpool/export/home        621K  11.6G    19K  /export/home
rpool/export/home/osol   602K  11.6G   602K  /export/home/osol

Create JeOS configs for various OpenSolaris 200906 Boot Environment (BE)

L0 osol0060gui Backup of Original Installation with GUI Boot mode

beadm create osol0906gui
beadm list
BE          Active Mountpoint    Space   Policy Created
--          ------ ----------    -----   ------ -------
opensolaris NR     /             2.78G   static 2009-05-19 13:26
osol9060gui -      -             0B      static 2009-05-20 13:38

Check /rpool/boot/grub/menu.lst

cat /rpool/boot/grub/menu.lst
splashimage /boot/grub/splash.xpm.gz
background 215ECA
timeout 30
default 0
#---------- ADDED BY BOOTADM - DO NOT EDIT ----------
title OpenSolaris 2009.06
findroot (pool_rpool,0,a)
bootfs rpool/ROOT/opensolaris
splashimage /boot/solaris.xpm
foreground d25f00
background 115d93
kernel$ /platform/i86pc/kernel/$ISADIR/unix -B $ZFS-BOOTFS,console=graphics
module$ /platform/i86pc/$ISADIR/boot_archive
#---------------------END BOOTADM--------------------
title osol0906gui
bootfs rpool/ROOT/osol0906gui
kernel$ /platform/i86pc/kernel/$ISADIR/unix -B $ZFS-BOOTFS
module$ /platform/i86pc/$ISADIR/boot_archive
#============ End of LIBBE entry =============

Rebooting and trying GUI mode

reboot 'init 6'
Select GUI,  Looks OK
reboot 'init 6'
Select back original installation

Check how ZFS grow

beadm list
BE          Active Mountpoint Space   Policy Created
--          ------ ---------- -----   ------ -------
opensolaris NR     /          2.87G   static 2009-05-19 13:26
osol0906gui -      -          86.29M  static 2009-05-20 13:38

L1 osol0906cli Original Installation with CLI Boot mode

1. Create a new BE environment as ‘osol0906cli’

beadm create osol0906cli
beadm list
BE          Active Mountpoint    Space   Policy Created
--          ------ ----------    -----   ------ -------
opensolaris NR     /             2.78G   static 2009-06-19 13:26
osol0906cli -      -             0B      static 2009-06-20 13:41

2. Check “/rpool/boot/grub/menu.lst” and remove or comment ## all GUI related stuff

cat /rpool/boot/grub/menu.lst
## splashimage /boot/grub/splash.xpm.gz
## background 215ECA
timeout 30
default 0
#---------- ADDED BY BOOTADM - DO NOT EDIT ----------
title OpenSolaris 2009.06
findroot (pool_rpool,0,a)
bootfs rpool/ROOT/opensolaris
splashimage /boot/solaris.xpm
foreground d25f00
background 115d93
kernel$ /platform/i86pc/kernel/$ISADIR/unix -B $ZFS-BOOTFS,console=graphics
module$ /platform/i86pc/$ISADIR/boot_archive
#---------------------END BOOTADM--------------------
title osol0906cli
bootfs rpool/ROOT/osol0906cli
kernel$ /platform/i86pc/kernel/$ISADIR/unix -B $ZFS-BOOTFS,console=text
module$ /platform/i86pc/$ISADIR/boot_archive
#============ End of LIBBE entry =============

3. Rebooting and trying CLI mode

reboot 'init 6'
Select CLI
Execute and reboot with init 6

4. Disable all GUI related service for smaller execution footprint

svcadm disable application/graphical-login/gdm

We can also disable some other services if they don’t needed on start to speed up CLI booting.

svcs -l /application/graphical-login/gdm
fmri         svc:/application/graphical-login/gdm:default
name         GNOME Display Manager
....
dependency   require_all/none svc:/system/filesystem/local (online)
dependency   require_all/error svc:/milestone/multi-user:default (online)
dependency   require_all/none svc:/milestone/sysconfig (online)
dependency   optional_all/none svc:/system/xvm/vnc-config (online)
dependency   require_all/none svc:/application/font/fc-cache (online)
dependency   require_all/none svc:/system/utmp (online)
dependency   require_all/none svc:/system/hal (online)
dependency   optional_all/none svc:/application/opengl/ogl-select (online)
dependency   optional_all/none svc:/application/desktop-cache/input-method-cache (online)
dependency   optional_all/none svc:/application/desktop-cache/pixbuf-loaders-installer (online)
dependency   optional_all/none svc:/application/desktop-cache/gconf-cache (online)
dependency   optional_all/none svc:/application/desktop-cache/desktop-mime-cache (online)
dependency   optional_all/none svc:/application/desktop-cache/mime-types-cache (online)
dependency   optional_all/none svc:/application/desktop-cache/icon-cache (online)

Disable not needed services

svcadm disable system/xvm/vnc-config
svcadm disable application/font/fc-cache
svcadm disable application/opengl/ogl-select
svcadm disable application/desktop-cache/input-method-cache
svcadm disable application/desktop-cache/pixbuf-loaders-installer
svcadm disable application/desktop-cache/gconf-cache
svcadm disable application/desktop-cache/desktop-mime-cache
svcadm disable application/desktop-cache/mime-types-cache
svcadm disable application/desktop-cache/icon-cache

Looks OK, reboot into it

reboot 'init 6'

Select back original installation

5. Finally, check how ZFS grow

beadm list
BE          Active Mountpoint Space   Policy Created
--          ------ ---------- -----   ------ -------
opensolaris NR     /          2.87G   static 2009-05-19 13:26
osol0906cli -      -          92.50M  static 2009-05-20 13:41
Advertisements

1 Comment »

  1. […] Create Primary OpenSolaris 2000906 Boot Environment (BE) […]

    Pingback by OpenSolaris JeOS (Main Page) « Virtual Guru's Blog – Home of Virtualization Workshops — February 7, 2010 @ 3:50 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: