Skip to contentSkip to conversation

Why the lvm module didn't work for me...

DISCUSSION Thomas Schwinge 2 participants 2 messages Oct 25, 2006 – Oct 26, 2006

lore
Share & tools
lore
#0 lore raw

Hello!

On the first encounter this is just too funny: Jeroen's lvm module didn't work for me... Because I didn't have a floppy in my floppy drive. Ha! :-)

Trace:

`insmod (hd0,1)/grub2/lvm.mod'.

disk/lvm.c
#v+
GRUB_MOD_INIT(lvm)
{
grub_device_iterate (&grub_lvm_scan_device);
grub_disk_dev_register (&grub_lvm_dev);
}
#v-

First relevant action of grub_device_iterate: call grub_lvm_scan_device with ``fd0''. The floppy driver clatters, but there's no disk in, so the grub_disk_read in grub_lvm_scan_device will fail, fall through to `fail' and return.

As it got a bit late now and I don't find the (perhaps) obvious, I'll have to stop here for now. The short story is that things then somehow go wrong so that further devices (``hd0'', etc.) will not be probed for lvm signatures and thusly no lvm devices are ever detected. More tomorrow.

Regards,
Thomas

#1 lore raw
Quoted 18 lines · Thomas Schwinge

Hello!

On the first encounter this is just too funny: Jeroen's lvm module didn't work for me... Because I didn't have a floppy in my floppy drive. Ha! :-)

Trace:

`insmod (hd0,1)/grub2/lvm.mod'.

disk/lvm.c
GRUB_MOD_INIT(lvm)
{
grub_device_iterate (&grub_lvm_scan_device);
grub_disk_dev_register (&grub_lvm_dev);
}

Quoted 4 lines

First relevant action of grub_device_iterate: call grub_lvm_scan_device with ``fd0''. The floppy driver clatters, but there's no disk in, so the grub_disk_read in grub_lvm_scan_device will fail, fall through to `fail' and return.

Can you add `grub_errno = GRUB_ERR_NONE;' to grub_lvm_scan_device? Perhaps this fixes the problem when properly used. Most likely this has to be done after a grub_device_open.

--
Marco