Recovering an OpenSolaris system
By user12610379 on Feb 03, 2010
Before I decided to blog this, I figured I would first search to check out if there are other blogs that discuss the techniques required to recover a system. Turns out sriram blog talks about using beadm technique but here a bit more elaborate version.
Our local admin was trying to upgrade the AI server to a newer build. The system was installed with OpenSolaris 2009.06 and he had published a number of install services. However a simple pkg image-update failed miserably and so did pkg install SUNWipkg. A quick investigation revealed that someone had added an older version 2008.11 version of the SUNWipkg(pkg verify is your friend). This normally would be possible, but the user had added the SVR4 version of SUNWipkg. So the system was not upgradable. A reinstall was not the answer he wanted to hear.
So here's what we did:
1. Created a new beadm from the snapshot and activated it.
2. Rebooted to the new BE and mounted the old one.
3. pkg image updated the old BE.
4. Upon successful completion, activated the old BE and rebooted it.
These are the steps. All these commands were run as root. The name of the BE was opensolaris.
1. beadm create -e opensolaris@install opensolaris-1
2. beadm activate opensolaris-1; reboot
3. (after logging in), beadm mount opensolaris /mnt
4. pkg -R /mnt SUNWipkg
5. pkg -R /mnt image-update