[Mageia-dev] Issues with dracut

Colin Guthrie mageia at colin.guthr.ie
Sun Dec 18 04:00:51 CET 2011


'Twas brillig, and David W. Hodgins at 18/12/11 00:04 did gyre and gimble:
> On Sat, 17 Dec 2011 15:21:14 -0500, Colin Guthrie
> <mageia at colin.guthr.ie> wrote:
> 
>> Dracut should install all dynamic libs needed by apps. Which app needs
>> this library specifically?
> 
> When I tried to boot after running dracut with the default config, I
> was dropped to a shell, with the non-lvm root mounted.
> 
> I then tried running "/sbin/lvm vgchange -a y --ignorelockingfailure",
> and it failed due to the missing libncursesw.so.5 module.
> 
> Now that I think about it, a bit more, I think I had already been
> chrooted into the root, so since /usr hadn't been mounted, of course
> the module could not be accessed.  Something else must have gone wrong
> before the chroot, that I didn't see.

Ahhh interesting. Could have been a filesystem check error. What
filesystem do you have on your /usr ? (obviously on top of the lvm layer).

Did typing "mount /usr" just work? After that (and typing exit) does
everything work as expected?

> Do you have /usr on a logical volume?

In my test VM yes, I had / on ext4 and /usr on LVM also with ext4.

> I've figured out now, that /lib/dracut/hooks/pre-pivot/50mount-usr.sh is
> failing, as lvm has not yet been activated.

That's strange, as lvm should be activated by then. Was the lvm module
included in your ramfs? The latest version should detect LVM on the /usr
partition, but it's perhaps not full proof (I only tested it in my test
vm when I wrote it).

> Later, I'm dropped to a shell, after the switch to the new root, and
> since /usr hasn't been mounted, any commands that try to load
> /usr/lib/libncursesw.so.5 such as lvm, grep, or less, will fail.
> 
> When I've copied /usr/lib/libncursesw.so.5* to /lib and run ldconfig,
> it still fails in 50mount-usr, but succeeds later, after the root
> switch.
> 
> The dm-mod module loading, and the "lvm vgchange -ay --sysinit" command
> should be run before looking for the root file system, as it too could be
> on a logical volume.

They all should be (and are for me). I suspect the missing link is that
the lvm module is not being included in your ramfs... If we can work out
why it would be great.

The shell script you'll need to tweak is
/usr/lib/dracut/modules.d/90lvm/module-setup.sh.

The code is fairly easy to follow and you can probably hack out the bits
to make it a simple runable script to see if you can work out why lvm is
not being included.

Col

-- 

Colin Guthrie
colin(at)mageia.org
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited http://www.tribalogic.net/
Open Source:
  Mageia Contributor http://www.mageia.org/
  PulseAudio Hacker http://www.pulseaudio.org/
  Trac Hacker http://trac.edgewall.org/


More information about the Mageia-dev mailing list