Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 42433 - [PATCH] GRUB x86 LVM support
Summary: [PATCH] GRUB x86 LVM support
Status: RESOLVED LATER
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL: http://mail.gnu.org/archive/html/bug-...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-02-21 18:34 UTC by Eric Shattow
Modified: 2004-06-25 08:39 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
patch against grub 0.94 ebuild after unpacking (grub-0.94-lvm.shadow-1.diff,37.70 KB, patch)
2004-02-21 18:41 UTC, Eric Shattow
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Shattow 2004-02-21 18:34:50 UTC
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.
Comment 1 Eric Shattow 2004-02-21 18:41:40 UTC
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.
Comment 2 Seemant Kulleen (RETIRED) gentoo-dev 2004-03-03 21:04:53 UTC
thanks for the patch, Eric, I'll look into getting it in for .94-r2
Comment 3 Eric Shattow 2004-03-20 02:11:56 UTC
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?  :)
Comment 4 Eric Shattow 2004-03-20 11:34:08 UTC
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.
Comment 5 Eric Shattow 2004-03-24 16:15:23 UTC
UPDATE (20040324):  making progress.   able to read the LVM label from whole-disk PV (8 bytes).  not exactly sure how to proceed.
Comment 6 Eric Shattow 2004-04-17 09:00:54 UTC
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.