haven't seen this in the bugtracker yet and it's about time someone merged this in. needs testing on platforms with endianess different than x86. straight hand-patch from the grub-lvm.diff patch on savannah. compiles cleanly. Reproducible: Always Steps to Reproduce: boot filesystem is a logical volume on a Linux-LVM volume group Actual Results: grub can't read the boot filesystem Expected Results: grub should be able to read boot filesystem from Linux-LVM logical volume on a volume group new syntax is... root <vgname:lvname> full documentation, ebuilds probably need tweaking. happy hacking.
Created attachment 26074 [details, diff] patch against grub 0.94 ebuild after unpacking uh, whoops. forgot to attach. this is against the grub 0.94 ebuild after unpacking. i should note that the unpacking applied a bootsplash patch. okay.
thanks for the patch, Eric, I'll look into getting it in for .94-r2
this might be obvious, though it is necessary to regenerate the configure script and Makefiles using autoconf/aclocal/automake after applying the patch. i know it is ugly to have evms/raid/lvm2-type support in grub. lilo is technically optimal, but i like grub's interface and flexibility. sadly, the last grub development activity i could find - with regard to the original mantainers - is from early 2003. there is no support for lvm2 data structures in the initial patch i have submitted. i didn't find anyone else working on grub+lvm2, and could sure use some help (so i don't make grub's code into spaghetti). would like to see those whom are interested step up and do work on grub+raid and grub+evms. i think it is important these features be applied conditionally on a "lvmboot" or similar USE flag. adding features to grub increases the size of the stage 1.5/2 loader. besides potential stability issues, a user who does not need lvm will not want the additional cruft in their bootloader. as per my intentions on adding lvm2 support to grub, point me in the right direction please? :)
Correction. this patch indeed has code written for lvm2 support. my mistake. my troubles seem to stem from my use of /dev/hda as a PV, instead of using a msdos-style partition, or from incorrect implementation of lvm2 support. line 258 or so of "stage2/linuxlvm.c" there is a check for the LVM_ID and pv.id a bit of debug output with pv.id reveals it to be apparently random data, in my case.
UPDATE (20040324): making progress. able to read the LVM label from whole-disk PV (8 bytes). not exactly sure how to proceed.
a word about installing grub onto the MBR of a LVM2 whole-disk PV, don't do it. further testing is needed to determine valid configurations of grub and lvm. please hold off on integrating this patch until i have completed my tests.