I've recently updated Ubuntu from an older LTS release (12.04) to 14.04 LTS and upon reboot, ubuntu fails to load and an error in /sbin/lvm
is shown:
There appears to be one or more degraded LVM volumes, and your root device may
depend on the LVM volumes being online.
One or more of the following LVM volumes are degraded:
/sbin/lvm: symbol lookup error: /usr/local/lib/libreadline.so.5: undefined symbol: PC
Gave up waiting for root device...
ALERT! /dev/mapper/my-server-root does not exist. Dropping to a shell!
It seems like the /sbin/lvm: symbol lookup error: /usr/local/lib/libreadline.so.5: undefined symbol: PC is the culprit, and I suppose that /sbin/lvm
wasn't correctly linked with the appropriate libraries, causing the boot image to be unable to run LVM at all, so the LVM volumes does not load.
What I have tried
Running
lvm
in the initramfs shell returns the same error about symbol lookup.Removing
/usr/local/lib/libreadline.so.5
and runninglvm
will make it throw an error aboutlibreadline.so.5
not being available instead.vgchange
is not a valid command (I assume it requireslvm
and it should be ran usinglvm vgchange -ay
instead?)
I guess that I should try to re-build the boot image to include a correct copy of lvm
. However I am not sure how to do that (should I boot a 14.04 live disk, and install lvm2
, or should I do some more steps? How can I modify initramfs and fix it?) and I am afraid I mess up the existing LVM configuration. How should I do that? Thanks!