I tried to upgrade my laptop from 2008.05 to 2009.06.  Following the
instructions at
http://opensolaris.org/os/project/indiana/resources/relnotes/200906/x86/#upgrade
I ran the listed commands, up to pkg install SUNWinstall-libs.  This
resulted in a rather catastrophic failure:

$ pfexec pkg install SUNWinstall-libs
DOWNLOAD                                    PKGS       FILES     XFER (MB)
Completed                                  20/20   3556/3556   58.44/58.44 

PHASE                                        ACTIONS
Install Phase                              1332/6412 Action install failed for 
'lib/libc.so.1' (pkg:/SUNWcsl):
  OSError: [Errno 16] Device busy
The Boot Environment opensolaris failed to be updated. A snapshot was taken 
before the failed attempt and is mounted here /tmp/tmpCLFCN_. Use 'beadm 
unmount opensolaris_static:-:2009-06-02-19:51:57' and then 'beadm activate 
opensolaris_static:-:2009-06-02-19:51:57' if you wish to boot to this BE.
pkg: An unexpected error happened during installation: [Errno 16] Device busy
Traceback (most recent call last):
  File "/usr/bin/pkg", line 2598, in ?
    __ret = main_func()
  File "/usr/bin/pkg", line 2541, in main_func
    return install(mydir, pargs)
  File "/usr/bin/pkg", line 767, in install
    api_inst.execute_plan()
  File "/usr/lib/python2.4/vendor-packages/pkg/client/api.py", line 525, in 
execute_plan
    self.img.imageplan.execute()
  File "/usr/lib/python2.4/vendor-packages/pkg/client/imageplan.py", line 719, 
in execute
    p.execute_install(src, dest)
  File "/usr/lib/python2.4/vendor-packages/pkg/client/pkgplan.py", line 260, in 
execute_install
    dest.install(self, src)
  File "/usr/lib/python2.4/vendor-packages/pkg/actions/file.py", line 197, in 
install
    portable.rename(temp, final_path)
  File "/usr/lib/python2.4/vendor-packages/pkg/portable/os_unix.py", line 197, 
in rename
    os.rename(src, dst)
OSError: [Errno 16] Device busy


pkg: This is an internal error.  Please let the developers know about this
problem by filing a bug at http://defect.opensolaris.org and including the
above traceback and this message.  The version of pkg(5) is '26c3e2407c53'.
$ ping -s pkg.opensolaris.org
$ ping -s pkg.opensolaris.org
$ truss -v all ping -s pkg.opensolaris.org
Bad system call(coredump)
$ date
Bad system call(coredump)
$ echo *core*
core
[ ... ]

At this point it was not possible to exec any programs (everything dumps
core with SIGSYS), although the existing shell, X server, and ssh
sessions continued running.  I assume that a corrupt or incompatible
/lib/libc.so.1 was installed.  The BE was unbootable, so I had to create
a new BE from the snapshot (thank goodness for that).

So, Is this a previously unknown problem (should I file a bug?)  Is it
possible to upgrade my system or should I chuck it and re-install from
CD?

And for posterity, someone might find it useful to know the steps to
recover from a pkg crash like this that leaves the active BE unbootable.
And maybe something could automate these steps or provide these hints in
the beadm man page - I had to do a lot of stumbling in the dark to
figure out the following:

In grub, select the newly created snapshot BE
(opensolaris_static:-:2009-06-02-19:51:57 in my case).

Ignore the barrage of error messages and enter the root password for
maintenance mode.

# zfs mount rpool
# mount -F tmpfs tmpfs /var/tmp
# mount -F tmpfs tmpfs /var/log
# beadm create RECOVER          (name of your choice here)
# reboot

Select the new "RECOVER" item in the grub menu.  At least on my system,
the grub menu was invisible, but by pressing down-arrow the right number
of times (it will be the last item in the menu) and enter, it can be
used.

Once the system boots, log in and run:

$ pfexec beadm activate RECOVER
(This seems to fix the invisible grub menu problem.)

                                        -=] Ford [=-

Reply via email to