Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My system is Gentoo Linux based booting off an LVM based root partition.

The system successfully boots through the initrd. It starts the init of the main kernel, but then fails when trying to check the root drive (/etc/init.d/checkroot).

The error reported is that the root drive (/dev/vg/lv) is unavailable for fsck.whichever.

[Note: I have figured out one solution to this problem, and am posting this to help others. If you know a better approach I'd love to hear about it!]

share|improve this question
up vote 1 down vote accepted

The issue could be that the LVM locking scheme is not allowing the volume group to be activated.

If lvm.conf has:


locking_type = 1
locking_dir = "/var/lock/lvm"

Then the locking directory must be writeable for the volume group to be activated. This is a problem at the checkroot stage as the root file system is only read only at this point.

It is possible to set the locking_type to 0, but that carries data loss risks.

Several of the lvm commands accept the --ignorelockingfailure option, which allows the lock to be temporarily sidestepped. This is used in the initrd start scripts.

To get checkroot to work, I added two lines before it actually got started.

&& ! is_net_fs / && ! is_union_fs / ; then

+  lvm vgchange -ayl --ignorelockingfailure
+  lvm vgmknodes --ignorelockingfailure

   if touch -c / >& /dev/null ; then
share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .