The Power of pkg image-update and ZFS

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.

Update:

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 update_grub command:

  $ $ 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.

Further Update

Dan Anderson pointed me at revised instructions for updating your OpenSolaris 2008.05 system (thanks!).

[]

[]

[]

Comments:

Post a Comment:
Comments are closed for this entry.
About

user12607856

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today