Home » Questions » Computers [ Ask a new question ]

How to deal with Gentoo failing to boot due to "Locking type initialisation failed" on checkroot?

How to deal with Gentoo failing to boot due to "Locking type initialisation failed" on checkroot?

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

Asked by: Guest | Views: 314
Total answers/comments: 1
bert [Entry]

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

If lvm.conf has:

/etc/lvm/lvm.conf

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"