Last weekend, my OpenSolaris failed to boot. I'm not sure what the reason is till now, though I suspect it because of the power failure. The OpenSolaris is installed on a laptop. I forget to turn it off (it was unplugged from the AC power) before I went to sleep. Then the next morning, I found it couldn't boot and the battery was out of power. Anyway, here's how I fixed it.

I booted the machine from an OpenSolaris CD, entered the text console, logged in as Jack/Jack and became root(BTW, you cannot log in as 'root' on OpenSolaris, root became a role rather than a user. I personally think this is a good think in terms of system security). I remembered I installed a few device drivers and upgraded some packages from OpenSolaris repo. A power failure may cause the inconsistence of the boot archive. So I decided to update the boot archive manually.

Force to import the installed OpenSolaris.
# zpool import -f rpool

mount the root file system
# mkdir /foo
# mount -F zfs rpool/ROOT/opensolaris /foo

Backup the current boot archive and then update it with the one on the cdrom
# bootadm update-archive -R /foo

After the reboot, my system was back to work again. The first thing after I logged into the system was creating a snapshot…



Comments:

Post a Comment:
Comments are closed for this entry.

This blog copyright 2009 by sjie