On Thu, Oct 18, 2007 at 07:42:23PM +0200, Jan Niehusmann wrote:
> It seems like it would be sufficient to skip the name -> device-number
> mapping for LVM devices, this should not be difficult to implement. (But
> I didn't look at the source to verify this claim).

Well, I couldn't keep my eyes from the source code :-)

The following diff should do it. But before applying this, a person with
a better knowledge of the debian boot infrastructure should have a look.
As far as I understand it, root=/dev/mapper/.... on a kernel command
line does only work because of initrd support. So applying this patch
could break systems with root on lvm, but without initrd.

What I don't know is if the kernel is able to boot with root=<device_number>,
if device_number points to an lvm device. Is it activating lvm
automatically in this case?

If this doesn't work, either, it should be safe to assume that everybody
using root on lvm is using an appropriate initrd and the patch could
be applied.

diff --git a/bsect.c b/bsect.c
index 4a62ca6..fa1ce43 100644
--- a/bsect.c
+++ b/bsect.c
@@ -1073,6 +1073,9 @@ if (image) { /* long section specific to 'image=' */
         else if (strlen(root)>5 && !strncmp(root,"UUID=",5)) {
             sprintf(strchr(options,0),"root=%s ", root);
         }
+        else if (strlen(root)>12 && !strncmp(root,"/dev/mapper/",12)) {
+            sprintf(strchr(options,0),"root=%s ", root);
+        }
        else {
            sprintf(strchr(options,0),"root=%x ",dev_number(root));
        }

> 
> Jan
> 



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to