Updating To A Specific Development Build
By Brian Leonard on Jan 29, 2010
I know - I'm boring. For my primary desktop I stick with the released version of OpenSolaris 2009.06 (snv_111b) and I live vicariously through all you cowboys out there that run along the edge. The development builds of OpenSolaris provide access to some great new features, but they also commonly bring with them some great new headaches. The price of riding along the edge is that sometimes you fall over it.
Fortunately, OpenSolaris' boot environments make it easy to get back on your feet. However, that doesn't help you get any closer to that great new feature.
A common question on the various help aliases is how to upgrade to a specific development build of OpenSolaris? The pkg image-update command currently doesn't address this, but there's and enhancement request in to solve it: pkg image-update should provide the possibility to specify a build.
In that enhancement request you'll find a workaround, which I'll walk through in more detail here. In this example I'm going to upgrade from build 128 to 129, while the current development build is 131:
bleonard@opensolaris:~$ cat /etc/release OpenSolaris Development snv_128a X86 Copyright 2009 Sun Microsystems, Inc. All Rights Reserved. Use is subject to license terms. Assembled 23 November 2009
Step 1: Switch to the root role:
bleonard@opensolaris:~$ pfexec su
Step 2: Ensure IPS is current:
bleonard@opensolaris:~# pkg install SUNWipkg No updates necessary for this image.
Step 3: Create a boot environment for the build you plan to move to:
bleonard@opensolaris:~# beadm create snv_129
Step 4: Mount the new boot environment:
bleonard@opensolaris:~# beadm mount snv_129 /mnt
Step 5: Install the appropriate entire package to the new boot environment:
entire is a meta-package that has dependencies on all the other packages that make up the OpenSolaris distribution. So by installing entire you're effectively installing the 'entire' distribution:
bleonard@opensolaris:~# pkg contents -m entire | more set name=pkg.fmri value=pkg://firstname.lastname@example.org,5.11-0.128:20091125T051747Z set name=variant.arch value=sparc value=i386 set name=pkg.summary value="Build 128 entire incorporation" set name=description value="Build 128 entire incorporation" set name=pkg.description value="This package constrains package versions to those for build 128. WARNING: Proper system update and correct packag e selection depend on the presence of this incorporation. Removing this package will result in an unsupported system." depend fmri=SUNWxorgemail@example.com type=incorporate depend fmri=SUNWxprintfirstname.lastname@example.org type=incorporate depend fmri=SUNWxorgemail@example.com type=incorporate depend fmri=SUNWxorgfirstname.lastname@example.org type=incorporate depend fmri=SUNWvscankr@0.5.11-0.128 type=incorporate --More--
You can use pkg list to see the versions of entire that are available:
bleonard@opensolaris:~# pkg list -avf entire FMRI STATE UFOXI pkg://email@example.com,5.11-0.131:20100115T044400Z known ----- pkg://firstname.lastname@example.org,5.11-0.130:20091219T044839Z known u---- pkg://email@example.com,5.11-0.129:20091205T134302Z known u---- pkg://firstname.lastname@example.org,5.11-0.128:20091125T051747Z installed u---- pkg://email@example.com,5.11-0.127:20091111T131831Z known u---- ...
Therefore, to move to build 129, install the appropriate entire package to the newly mounted boot environment:
bleonard@opensolaris:~# pkg -R /mnt install firstname.lastname@example.org,5.11-0.129 DOWNLOAD PKGS FILES XFER (MB) Completed 624/624 10949/10949 292.4/292.4 PHASE ACTIONS Removal Phase 6199/6199 Install Phase 7503/7503 Update Phase 14589/14589 PHASE ITEMS Reading Existing Index 8/8 Indexing Packages 624/624 Optimizing Index... PHASE ITEMS Indexing Packages 624/624 Deleting content cache
Step 6: Update the boot archive to use the build installed to /mnt:
bleonard@opensolaris:~# bootadm update-archive -R /mnt updating /mnt//platform/i86pc/boot_archive updating /mnt//platform/i86pc/amd64/boot_archive
Step 7: Unmount the new boot environment:
bleonard@opensolaris:~# beadm unmount snv_129
Step 8: Activate the new boot environment:
bleonard@opensolaris:~# beadm activate snv_129
Step 9: Reboot:
Step 10: Enjoy.
bleonard@opensolaris:~$ cat /etc/release OpenSolaris Development snv_129 X86 Copyright 2009 Sun Microsystems, Inc. All Rights Reserved. Use is subject to license terms. Assembled 04 December 2009