blog'o thnet

To content | To menu | To search

OpenSolaris

Entries feed - Comments feed

Thursday 30 November 2006

Simply Can't Wait for Nevada Build 53, Desktop Experience

I am really excited by the upcoming Nevada build 53, particularly in the desktop user space. Just read these two posts from Alan Coopersmith and Stephen Hahn to understand why! ;)

Tuesday 14 November 2006

Initial UI Design of the Caiman Installer

Just a little news to point out some fresh mockup screen shots about the upcoming OpenSolaris and future Solaris installer. All this work came from the Installation and Packaging OpenSolaris community.

Interesting, but i will wait and try an eventual LiveCD/LiveDVD to see it in action, if possible.

Sunday 12 November 2006

Installation of the AsciiDoc Utility on Solaris

Because it must always be easy to install, and uninstall, some new tools to try, here is a very quick and little update against the last installation script ((un)install.sh), in order to work out of the box on Solaris and OpenSolaris distributions. It try to preserve the very same behavior for (the original-targeted) Linux platform, although not tested on it.

Here is the diff against the AsciiDoc 8.1.0 release:

--- install.sh.orig  Sat Oct 21 09:21:11 2006
+++ install.sh       Sat Nov 11 14:02:21 2006
@@ -1,36 +1,61 @@
-#! /bin/sh
-#
+#!/usr/bin/env sh
+
 # AsciiDoc canonical installer/uninstaller.
 # Definative packager's guide.
 # Documented in INSTALL file.
-#

-BINDIR=/usr/local/bin
-MANDIR=/usr/local/man
-CONFDIR=/etc/asciidoc
+case `uname -s` in
+  SunOS)
+    install=/usr/ucb/install
+    sfwdir=/opt/sfw
+    bindir=${sfwdir}/bin
+    mandir=${sfwdir}/man
+    cnfdir=${sfwdir}/etc/asciidoc
+  ;;
+  *)
+    install=/bin/install
+    sfwdir=/usr/local
+    bindir=${sfwdir}/bin
+    mandir=${sfwdir}/man
+    cnfdir=/etc/asciidoc
+  ;;
+esac

-if [ `basename $0` == uninstall.sh ]; then
-    rm $BINDIR/asciidoc
-    rm $BINDIR/a2x
-    rm $MANDIR/man1/asciidoc.1
-    rm $MANDIR/man1/a2x.1
-    rm -rf $CONFDIR
+if [ "`basename $0`" = "uninstall.sh" ]; then
+  rm ${bindir}/asciidoc 2> /dev/null
+  rm ${bindir}/a2x 2> /dev/null
+  rmdir ${bindir} 2> /dev/null
+  rm ${mandir}/man1/asciidoc.1 2> /dev/null
+  rm ${mandir}/man1/a2x.1 2> /dev/null
+  rmdir ${mandir}/man1 2> /dev/null
+  rmdir ${mandir} 2> /dev/null
+  rm -rf ${cnfdir}
 else
-    install asciidoc.py $BINDIR/asciidoc
-    install a2x $BINDIR/a2x
-    install -d $MANDIR/man1
-    install doc/*.1 $MANDIR/man1
-    install -d $CONFDIR/filters $CONFDIR/docbook-xsl \
-        $CONFDIR/stylesheets $CONFDIR/javascripts \
-        $CONFDIR/images/icons/callouts
-    install -m 644 *.conf $CONFDIR
-    install filters/*.py $CONFDIR/filters
-    install -m 644 filters/*.conf $CONFDIR/filters
-    install -m 644 docbook-xsl/*.xsl $CONFDIR/docbook-xsl
-    install -m 644 stylesheets/*.css $CONFDIR/stylesheets
-    install -m 644 javascripts/*.js $CONFDIR/javascripts
-    install -m 644 images/icons/callouts/* $CONFDIR/images/icons/callouts
-    install -m 644 images/icons/README images/icons/*.png $CONFDIR/images/icons
+  cp a2x a2x.$$
+  sed -e 's,#!/bin/bash,#!/usr/bin/env bash,' \
+   -e "s,/etc/asciidoc,${cnfdir}," a2x.$$ > a2x
+  cp asciidoc.py asciidoc.py.$$
+  sed -e "s,/etc/asciidoc,${cnfdir}," asciidoc.py.$$ > asciidoc.py
+  ${install} -d ${bindir}
+  ${install} asciidoc.py ${bindir}/asciidoc
+  ${install} a2x ${bindir}/a2x
+  ${install} -d ${mandir}/man1
+  ${install} doc/*.1 ${mandir}/man1
+  for dir in ${cnfdir}/filters ${cnfdir}/docbook-xsl ${cnfdir}/stylesheets \
+   ${cnfdir}/javascripts ${cnfdir}/images/icons/callouts; do
+    ${install} -d ${dir}
+  done
+  ${install} -m 644 *.conf ${cnfdir}
+  ${install} filters/*.py ${cnfdir}/filters
+  ${install} -m 644 filters/*.conf ${cnfdir}/filters
+  ${install} -m 644 docbook-xsl/*.xsl ${cnfdir}/docbook-xsl
+  ${install} -m 644 stylesheets/*.css ${cnfdir}/stylesheets
+  ${install} -m 644 javascripts/*.js ${cnfdir}/javascripts
+  ${install} -m 644 images/icons/callouts/* ${cnfdir}/images/icons/callouts
+  ${install} -m 644 images/icons/README images/icons/*.png ${cnfdir}/images/icons
+
+  mv a2x.$$ a2x
+  mv asciidoc.py.$$ asciidoc.py
 fi

-# vim: set et ts=4 sw=4 sts=4:
+exit 0

This tool is one of the utilities mentioned on the excellent OpenSolaris Documentation Tools web page.

Thursday 5 October 2006

Zones and ZFS Integration, and New Features in OpenSolaris

The aim of this little test case is to present new features of zones, and its tightly integration with the ZFS powerful file system. In order to do so, we will:

  1. Create a specific ZFS namespace for non-global zone(s).
  2. Create a new zone.
  3. Move it to a new zonepath.
  4. Configure it automatically, using a sysidcfg file.
  5. Clone it.
  6. Duplicate the first zone using the clone.

Be sure to have a valid hostname and IP address for the two non-global zones:

# getent hosts | egrep 'beastie|watchie'
192.168.1.1   beastie.thilelli.net beastie
192.168.1.2   watchie.thilelli.net watchie

Create a valid ZFS dedicated namespace:

# zfs create -o compression=on \
   -o mountpoint=/export/zone \
   -o canmount=off pool0/zone
# zfs list -r pool0/zone
NAME         USED  AVAIL  REFER  MOUNTPOINT
pool0/zone  24.5K   228G  24.5K  /export/zone
# zfs get compression,mountpoint,canmount pool0/zone
NAME        PROPERTY     VALUE         SOURCE
pool0/zone  compression  on            local
pool0/zone  mountpoint   /export/zone  local
pool0/zone  canmount     off           local
# zfs mount | grep zone
#

Note: Since build 48 of Nevada, some new ZFS features were added. Create time properties and canmount property are two of them. Please refer to this excellent blog entry from Eric Schrock's weblog for more information on these putbacks.

Configure the different zone's informations:

# zonecfg -z beastie 'create; set autoboot=true; \
   set zonepath=/export/zone/badbeastie; add net; \
   set address=192.168.1.1/24; set physical=nge0; \
   end; verify; commit; exit'
# zonecfg -z watchie 'create; set autoboot=true; \
   set zonepath=/export/zone/watchie; add net; \
   set address=192.168.1.2/24; set physical=nge0; \
   end; verify; commit; exit'
# zoneadm list -vc
  ID NAME             STATUS         PATH
   0 global           running        /
   - beastie          configured     /export/zone/badbeastie
   - watchie          configured     /export/zone/watchie

Then, fire the zoneadm command:

# zoneadm -z beastie install
A ZFS file system has been created for this zone.
Preparing to install zone <beastie>.
Creating list of files to copy from the global zone.
[...]

Instead of configure it manually at first boot, create a configuration file which will do this task automatically for you, and start the zone:

# cat << EOF > /export/zone/badbeastie/root/etc/sysidcfg
system_locale=C
timezone=Europe/Paris
terminal=vt100
security_policy=NONE
root_password=xxxxxxxxxxxxx
timeserver=localhost
name_service=NONE
nfs4_domain=dynamic
network_interface=primary {
  hostname=beastie.thilelli.net
  ip_address=192.168.1.1
  netmask=255.255.255.0
  protocol_ipv6=no
  default_route=192.168.1.254
}
EOF
#
# zoneadm -z beastie boot && zlogin -C beastie
[Connected to zone 'beastie' console]
SunOS Release 5.11 Version snv_48 64-bit
Copyright 1983-2006 Sun Microsystems, Inc.  All rights reserved.
Use is subject to license terms.
Hostname: beastie
Loading smf(5) service descriptions: 119/119
Oct  4 04:30:22 svc.startd[3003]: svc:/system/dbus:default:
 Method "/lib/svc/method/svc-dbus start" failed with exit status 95.
Oct  4 04:30:22 svc.startd[3003]: system/dbus:default failed fatally:
 transitioned to maintenance (see 'svcs -xv' for details)
Creating new rsa public/private host key pair
Creating new dsa public/private host key pair
rebooting system due to change(s) in /etc/default/init

[NOTICE: Zone rebooting]
SunOS Release 5.11 Version snv_48 64-bit
Copyright 1983-2006 Sun Microsystems, Inc.  All rights reserved.
Use is subject to license terms.
Hostname: beastie.thilelli.net
Oct  4 13:30:40 svc.startd[3757]: svc:/system/dbus:default:
 Method "/lib/svc/method/svc-dbus start" failed with exit status 95.
Oct  4 13:30:40 svc.startd[3757]: system/dbus:default failed fatally:
 transitioned to maintenance (see 'svcs -xv' for details)

beastie.thilelli.net console login: ~.
[Connection to zone 'beastie' console closed]

Well done. Now, change the zone path to something more appropriate. Eventually, adapt the ZFS name accordingly:

# zoneadm -z beastie halt
# zoneadm -z beastie move /export/zone/beastie
# zoneadm list -vc
  ID NAME             STATUS         PATH
   0 global           running        /
   - beastie          installed      /export/zone/beastie
   - watchie          configured     /export/zone/watchie
#
# zfs list -r pool0/zone
NAME                    USED  AVAIL  REFER  MOUNTPOINT
pool0/zone              248M   227G  24.5K  /export/zone
pool0/zone/badbeastie   248M   227G   248M  /export/zone/beastie
# zfs rename pool0/zone/badbeastie pool0/zone/beastie
# zfs list -r pool0/zone
NAME                 USED  AVAIL  REFER  MOUNTPOINT
pool0/zone           248M   227G  24.5K  /export/zone
pool0/zone/beastie   248M   227G   248M  /export/zone/beastie
#
# zoneadm -z beastie boot

Wow... Very interesting feature, isn't it?!

Now, lets try the cloning feature bundle with the new zoneadm command. Do some specific non-global zone tuning before; then do:

# zlogin beastie svcadm disable system/dbus
# zoneadm -z beastie halt
# zoneadm -z watchie clone beastie
Cloning snapshot pool0/zone/beastie@SUNWzone1
Instead of copying, a ZFS clone has been created for this zone.
# zoneadm list -vc
  ID NAME             STATUS         PATH
   0 global           running        /
   - beastie          installed      /export/zone/beastie
   - watchie          installed      /export/zone/watchie
#
# zfs list -r pool0/zone/beastie
NAME                           USED  AVAIL  REFER  MOUNTPOINT
pool0/zone/beastie             251M   227G   248M  /export/zone/beastie
pool0/zone/beastie@SUNWzone1  3.77M      -   248M  -
#
# sed -e 's/beastie/watchie/' \
   -e 's/ip_address=192.168.1.1/ip_address=192.168.1.2/'
   /export/zone/beastie/root/etc/sysidcfg > \
   /export/zone/watchie/root/etc/sysidcfg

You can now enjoy the first boot of the newly created zone:

# zoneadm -z watchie boot && zlogin -C watchie 
[Connected to zone 'watchie' console]
Hostname: watchie
Creating new rsa public/private host key pair
Creating new dsa public/private host key pair

watchie.thilelli.net console login: ~.
[Connection to zone 'watchie' console closed]

Awesome features and technologies i think! Really.

Last, note that Ben Rockwood already has a well written blog entry on this very same subject... he was the first to publish it though ;)

Note: It seems there is a little bug in the snv_48 SX:CR release which prevents the expected automatically ZFS file system creation or cloning from happening properly; the action fails with an error similar to this one:

cannot create ZFS dataset <zfs_name>: 'sharenfs' must be a string

This bug is already closed and fixed, and will be available in the next Solaris Express, see Bug ID: 6468554 for more information on this one.

Saturday 30 September 2006

Non-Debug OpenSolaris Binaries on the x64 Platform

Just a little news to promote the work done by Alan Hargreaves for providing non-debug encumbered binaries for the latest ON sources at this time, for x64 platform only (yet).

As a side note, you can find a very nice how to on the (updated) required steps to build a (non-debug) OpenSolaris from the Solaris Express Community Release distribution, written by well known Dennis Clarke.

Not yet tested myself, but i hope to do so in the next days, or weeks...

Sunday 21 May 2006

Upgrading from snv_38 to snv_39 Using Solaris Live Upgrade

After writing about how to patch (or upgrade) a running system playing with a mirrored OpenSolaris SVM, here is a little step-by-step how to on upgrading (or patching, etc.) a live system using the Live Upgrade feature.

Before installing or running Live Upgrade, you are required to install a limited set of patch revisions. Make sure you have the most recently updated patch list by consulting sunsolve.sun.com. Search for the info doc 72099 on the SunSolve web site (you must have a registered Sun support customer account to be able to view this document).

Note: In the following procedure, we will assume that all we want (and need) to upgrade to is provided via a one large DVD ISO image.

If all seems OK, you must begin to update the current running system with the appropriate lu packages, i.e. those provided for the targeted OS revision. You can either use the provided tools:

# /cdrom/cdrom0/Solaris_11/Tools/Installers/liveupgrade20

Or do it yourself:

# pkgrm SUNWluu SUNWlur
# pkgadd -d /cdrom/cdrom0/Solaris_11/Product SUNWlur SUNWluu

Since the current OS is totally installed on the first slice of the first disk (c1d0s0), and that the slice six (c1d0s6) is exactly the same size as the first one, we will use it for the second ABE device for our purpose and create the corresponding Boot Environment.

# lucreate -c snv_38 -n snv_39 -m /:/dev/dsk/c1d0s6:ufs
/* If the snv_38 BE already exists, just create the new one for snv_39. */
# lucreate -n snv_39 -m /:/dev/dsk/c1d0s6:ufs
Discovering physical storage devices
Discovering logical storage devices
Cross referencing storage devices with boot environment configurations
Determining types of file systems supported
Validating file system requests
Preparing logical storage devices
Preparing physical storage devices
Configuring physical storage devices
Configuring logical storage devices
Analyzing system configuration.
Comparing source boot environment <snv_38> file systems with the file
system(s) you specified for the new boot environment. Determining which
file systems should be in the new boot environment.
Updating boot environment description database on all BEs.
Searching /dev for possible boot environment filesystem devices

Updating system configuration files.
The device </dev/dsk/c1d0s6> is not a root device for any boot environment.
Creating configuration for boot environment <snv_39>.
Source boot environment is <snv_38>.
Creating boot environment <snv_39>.
Checking for GRUB menu on boot environment <snv_39>.
The boot environment <snv_39> does not contain the GRUB menu.
Creating file systems on boot environment <snv_39>.
Creating <ufs> file system for </> on </dev/dsk/c1d0s6>.
Mounting file systems for boot environment <snv_39>.
Calculating required sizes of file systems for boot environment <snv_39>.
Populating file systems on boot environment <snv_39>.
Checking selection integrity.
Integrity check OK.
Populating contents of mount point </>.
Copying.
Creating shared file system mount points.
Creating compare databases for boot environment <snv_39>.
Creating compare database for file system </>.
Updating compare databases on boot environment <snv_39>.
Making boot environment <snv_39> bootable.
Updating bootenv.rc on ABE <snv_39>.
Population of boot environment <snv_39> successful.
Creation of boot environment <snv_39> successful.

Verify the correct attribution of the different file systems, in particular between those which are cloned (required by a Solaris installation, such as /, /var, /usr, and /opt) and those which are shared (such as /export).

# lufslist -n snv_38
               boot environment name: snv_38
               This boot environment is currently active.
               This boot environment will be active on next system boot.

Filesystem           fstype    device size Mounted on     Mount Options
-------------------- -------- ------------ -------------- --------------
/dev/dsk/c1d0s1      swap       4301821440 -              -
/dev/dsk/c1d0s0      ufs        8595417600 /              -
/dev/dsk/c1d0s7      ufs       58407713280 /export        -
#
# lufslist -n snv_39
               boot environment name: snv_39

Filesystem           fstype    device size Mounted on     Mount Options
-------------------- -------- ------------ -------------- --------------
/dev/dsk/c1d0s1      swap       4301821440 -              -
/dev/dsk/c1d0s6      ufs        8595417600 /              -
/dev/dsk/c1d0s7      ufs       58407713280 /export        -

You then just need to upgrade the second BE using the installation media of the desired release or revision.

# luupgrade -u -n snv_39 -s /cdrom/cdrom0

Install media is CD/DVD. </cdrom/cdrom0>.
Waiting for CD/DVD media </cdrom/cdrom0> ...
Copying failsafe multiboot from media.
Uncompressing miniroot
Creating miniroot device
miniroot filesystem is <ufs>
Mounting miniroot at </cdrom/cdrom0/Solaris_11/Tools/Boot>
Validating the contents of the media </cdrom/cdrom0>.
The media is a standard Solaris media.
The media contains an operating system upgrade image.
The media contains <Solaris> version <11>.
Constructing upgrade profile to use.
Locating the operating system upgrade program.
Checking for existence of previously scheduled Live Upgrade requests.
Creating upgrade profile for BE <snv_39>.
Checking for GRUB menu on ABE <snv_39>.
Checking for x86 boot partition on ABE.
Determining packages to install or upgrade for BE <snv_39>.
Performing the operating system upgrade of the BE <snv_39>.
CAUTION: Interrupting this process may leave the boot environment unstable
or unbootable.
Upgrading Solaris: 100% completed
Installation of the packages from this media is complete.
Deleted empty GRUB menu on ABE <snv_39>.
Adding operating system patches to the BE <snv_39>.
The operating system patch installation is complete.
ABE boot partition backing deleted.
Configuring failsafe for system.
Failsafe configuration is complete.
INFORMATION: The file </var/sadm/system/logs/upgrade_log> on boot
environment <snv_39> contains a log of the upgrade operation.
INFORMATION: The file </var/sadm/system/data/upgrade_cleanup> on boot
environment <snv_39> contains a log of cleanup operations required.
INFORMATION: Review the files listed above. Remember that all of the files
are located on boot environment <snv_39>. Before you activate boot
environment <snv_39>, determine if any additional system maintenance is
required or if additional media of the software distribution must be
installed.
The Solaris upgrade of the boot environment <snv_39> is complete.
Installing failsafe
Failsafe install is complete.

If something went wrong during the upgrade of the new Boot Environment snv_39, you can always restart with a very fresh one using the lumake -n snv_39 command. If all went smooth, you can now check and compare the newly created BE:

# lucompare -t snv_39 -o /tmp/lucompare.snv_39
# lumount -n snv_39
/.alt.snv_39
# mount -p | grep snv_39
/dev/dsk/c1d0s6 - /.alt.snv_39 ufs - no rw,intr,largefiles,logging,xattr,onerror=panic
# luumount -n snv_39
#
# lustatus
Boot Environment           Is       Active Active    Can    Copy
Name                       Complete Now    On Reboot Delete Status
-------------------------- -------- ------ --------- ------ ----------
snv_38                     yes      yes    yes       no     -
snv_39                     yes      no     no        yes    -

Since the overall upgrade is OK, you just need to activate the fresh BE snv_39, export your data zpool and perform a clean reboot, otherwise the new environment will not be activated. Do not use the uadmin, halt, or reboot commands!

# luactivate snv_39
# lustatus
Boot Environment           Is       Active Active    Can    Copy
Name                       Complete Now    On Reboot Delete Status
-------------------------- -------- ------ --------- ------ ----------
snv_38                     yes      yes    no        no     -
snv_39                     yes      no     yes       no     -
#
# zpool export datazp
# shutdown -y -g 0 -i 6

Et voilà! After the reboot, you must see something similar to:

# uname -a
SunOS unic 5.11 snv_39 i86pc i386 i86pc
#
# cat /etc/release
                            Solaris Nevada snv_39 X86
           Copyright 2006 Sun Microsystems, Inc.  All Rights Reserved.
                        Use is subject to license terms.
                              Assembled 01 May 2006

Last, please find some invaluable documentation on the subject below:

Sunday 30 April 2006

List of Bugs Fixed per Operating System/Networking (ON) Build

Already want to be able to easily find what is new in each build of the ON consolidation from OpenSolaris; including Solaris Express and Solaris Express: Community Release?

Speaking about specifics putback logs (HTML and text based reports are available):

  1. ON consolidation: change logs and downloads
  2. X consolidation: change logs

For more general overview of what happen at the SX release level, the two best places are certainly:

  1. docs.sun.com: What's New in Solaris Express
  2. Dan Price's Weblog: Solaris entries

page 3 of 3 -