Thursday, December 9, 2010

ludelete unable to remove boot environment

At least a couple of times I ran into issues with ludelete and Solaris Live Upgrade.

This is one of these cases:

# ludelete bootenv2
System has findroot enabled GRUB
Checking if last BE on any disk...
ERROR: Read-only file system: cannot create mount point
ERROR: failed to create mount point for file system
ERROR: unmounting partially mounted boot environment file systems
ERROR: umount: warning: /dev/dsk/c1t0d0s3 not in mnttab
umount: /dev/dsk/c1t0d0s3 not mounted
ERROR: cannot unmount
ERROR: cannot mount boot environment by name
ERROR: Failed to mount BE .
ERROR: Failed to mount BE .
cat: cannot open /tmp/.lulib.luclb.dsk.5186.bootenv2
ERROR: This boot environment is the last BE on the above disk.
ERROR: Deleting this BE may make it impossible to boot from this disk.
ERROR: However you may still boot solaris if you have BE(s) on other disks.
ERROR: You *may* have to change boot-device order in the BIOS to accomplish this.
ERROR: If you still want to delete this BE , please use the force option (-f).
Unable to delete boot environment.

The solution to this problem was actually quite simple but why did it happen? Well, partitioning has changed after the boot environment was created and the mount point /storage1/db was referenced in this old boot environment and doesn't exist anymore.

Somehow ludelete require partitions to be as they were so it will not delete if you made changes to partitioning.

The solution was to find the reference in this case in /etc/lu/ICF.2 and remove the line:


Problem was solved:

# ludelete bootenv2
System has findroot enabled GRUB
Checking if last BE on any disk...
BE is not the last BE on any disk.
No entry for BE in GRUB menu
Determining the devices to be marked free.
Updating boot environment configuration database.
Updating boot environment description database on all BEs.
Updating all boot environment configuration databases.
Boot environment deleted.

No comments:

Post a Comment