# Grub2 + LVM2 config

## binro

I am converting to Grub2 and see it supports LVM. Does this mean that ramdisk files are no longer needed? I generate my ramdisk with genkernel and the Grub legacy config is:

```

kernel /boot/vmlinuz-3.4.5-gentoo root=/dev/ram0 real_root=/dev/vg00/rootfs init=/linuxrc dolvm vga=0x0361 quiet CONSOLE=/dev/tty1

initrd /boot/initrd-3.4.5-gentoo

```

My grub2 config is:

```

linux   /vmlinuz-3.4.5-gentoo root=/dev/mapper/vg00-rootfs ro  vga=0x0361 quiet CONSOLE=/dev/tty1

```

but I get a kernel panic because it cannot find the root file system.The lvm module is loaded so what is still necessary in the config?

Edit: I should have said that /boot is on its own partition.

TIA

----------

## eccerr0r

There's still many things at play here.  With grub understanding LVM it means it can span and detect boot images across two disks.

However once it loads the image, the kernel still needs to figure out what to do with the disks.  I thought that LVM (and later MDRAID too) can not be autodetected at boot and will thus still require an initrd to set up the real root filesystem...  Do you see lvm detecting your volumes during boot?

----------

## binro

I am beginning to think that the LVM support is just for finding the boot partition. I see nothing when it boots, only an immediate kernel panic message because it cannot find the root file system. Looks like I will have to restore the ramdisk definitions.

----------

## BillWho

binro,

Perhaps a dumb question on my part, but did you insmod  lvm.mod   :Question: 

----------

## binro

 *BillWho wrote:*   

> 
> 
> Perhaps a dumb question on my part, but did you insmod  lvm.mod  

 

Yes.   :Very Happy: 

I reset the kernel/initrd to the same as I had for Grub1 and now it all works. I was just hoping to get rid of the ramdisk file.

----------

