help-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Root on LVM without initrd?


From: Jordan Uggla
Subject: Re: Root on LVM without initrd?
Date: Thu, 10 Nov 2011 16:37:28 -0800

On Thu, Nov 10, 2011 at 3:24 PM, James Le Cuirot
<address@hidden> wrote:
> Hello,
>
> There seems to be a lot of conflicting information out there about
> having your root partition on LVM. My boot partition is not on LVM so I
> have no trouble there. I am under the impression that GRUB2's LVM
> support means that it is no longer necessary to use an initrd when your
> root is on LVM. It creates entries like this...
>
> menuentry 'GNU/Linux, with Linux 3.1.0-gentoo-r1' --class gnu-linux --class 
> gnu --class os {
>        load_video
>        insmod gzio
>        insmod part_msdos
>        insmod ext2

These insmods are inserting *grub* modules so that grub can access the
files it needs to access. It has nothing to do with linux or its
ability to do the same.

>        set root='(hd1,msdos5)'
>        search --no-floppy --fs-uuid --set=root 
> ee946103-1b8b-4a1c-8e6a-e272dc823e51
>        echo    'Loading Linux 3.1.0-gentoo-r1 ...'
>        linux   /vmlinuz-3.1.0-gentoo-r1 root=/dev/mapper/symphony-root ro
> }
>
> It loads "insmod lvm" further up and if I type "ls" at the console, I
> see that it has recognised my LVM partitions. But when the kernel
> actually fires up, I get the "Unable to mount root fs" error. The
> kernel does have device mapper support built in. If an initrd really is
> needed then why does GRUB generate entries like the above?

See the explanation above. Once grub loads the kernel, the kernel and
initrd scripts need to setup everything from the ground up. For LVM,
this requires an initrd.

-- 
Jordan Uggla (Jordan_U on irc.freenode.net)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]