I’ve been a long time user of/tinkerer with OpenSolaris on my desktop (for the obvious reasons: Time Slider, ZFS, DTrace, etc). I am going to start posting tips & tricks. To start off, here is one way I have found to “fix” a “pkg image-update” failure. All it does is create a new boot environment and install to it, which can solve a lot of the problems that might occur when running on the pkg.opensolaris.org/dev repository when you update:
beadm create osol-snv_1XX
mkdir /mnt/osol-snv_1XX
beadm mount osol-snv_1XX /mnt/osol-snv_1XX
pkg -R osol-snv_1XX install SUNWipkg
pkg -R osol-snv_1XX image-update
bootadm update-archive -R /mnt/osol-snv_1XX
beadm activate osol-snv_1XX
Notes:
- osol-snv_1XX is simply the name you give the new boot environment. XX being the snv version (currently 133).
- beadm is the command for working with boot environments in zfs. Create makes a snapshot, mount mounts it to a particular directory, and activate makes it the default on the next reboot.
- pkg -R does the update on the alternate boot env.
- bootadm adds the boot environment to grub (update the archive using that directory as the root is what we are telling it to do here, just like the pkg -R cmd).
If someone visiting this blog has alternate methods, I’d be interested in knowing about it.
Tags: OpenSolaris