The Power of pkg image-update and ZFS
By user12607856 on Jul 31, 2008
One of the things that used to drive me crazy with working on the bleeding edge of Ubuntu (rather than the stable releases), was when a
$ sudo apt-get dist-upgrade
of the latest packages and a reboot would leave me in a horked state. (Admittedly this was very rarely, but still: it did happen).
I then had to work out exactly which package blew me away (usually with the help of other people that were more experienced in this area then I was), and typically revert to an earlier more stable version.
Things are different under OpenSolaris with pkg. Yesterday afternoon, I ran:
$ pfexec pkg image-update DOWNLOAD PKGS FILES XFER (MB) Completed 567/567 27150/27150 1648.05/1648.05 PHASE ACTIONS Removal Phase 7140/7140 Update Phase 21974/21974 Install Phase 12389/12389 A clone of opensolaris exists and has been updated and activated. On next boot the Boot Environment opensolaris-1 will be mounted on '/'. Reboot when ready to switch to this updated BE. $
No need to reboot right away. No updating of live images. And really fast. Nice!
So this morning, I rebooted the machine. There was the new GRUB entry "opensolaris-1" (set as the default), and I went ahead and pressed Return to boot from that.
And it failed and eventually threw me back to the GRUB menu. Being a typical engineer, and failing to initially believe there was a problem here, I tried it again and it failed again.
But here's the nice part. I then simply selected the previous entry in the GRUB menu and booted from that. Now I'm back up and running nicely with the previous image.
I guess the next step in my education (or the next yak to shave depending how you look at it), is trying to work out exactly why the new boot image failed. Time to talk to some of the OpenSolaris engineers in adjacent offices.
Danek Duvall pointed me at the
release notes (thanks!)
and provided the magic mount command for this new OS image that is needed
before you can do the
$ $ su Password: # beadm mount opensolaris-1 /mnt # pfexec /mnt/boot/solaris/bin/update_grub -R /mnt Creating GRUB menu in /mnt Installing grub on /dev/rdsk/c5t0d0s0 stage1 written to partition 0 sector 0 (abs 16065) stage2 written to partition 0, 265 sectors starting at 50 (abs 16115)
Now when you reboot, you'll see another new entry in the GRUB menu. Booting with that nicely works, and it's now a GNOME 2.22.X based system as opposed to a GNOME 2.20.X one.
Dan Anderson pointed me at revised instructions for updating your OpenSolaris 2008.05 system (thanks!).