RAID6 mdraid -> LVM -> EXT4 root with GRUB2?

Posted by Rotonen on Server Fault See other posts from Server Fault or by Rotonen
Published on 2012-03-31T19:55:52Z Indexed on 2012/04/01 17:33 UTC
Read the original article Hit count: 278

Filed under:
|

2012-03-31 Debian Wheezy daily build in VirtualBox 4.1.2, 6 disk devices.

My steps to reproduce so far:

  1. Setup one partition, using the entire disk, as a physical volume for RAID, per disk
  2. Setup a single RAID6 mdraid array out of all of those
  3. Use the resulting md0 as the only physical volume for the volume group
  4. Setup your logical volumes, filesystems and mount points as you wish
  5. Install your system

Both / and /boot will be in this stack. I've chosen EXT4 as my filesystem for this setup.

I can get as far as GRUB2 rescue console, which can see the mdraid, the volume group and the LVM logical volumes (all named appropriately on all levels) on it, but I cannot ls the filesystem contents of any of those and I cannot boot from them.

As far as I can see from the documentation the version of GRUB2 shipped there should handle all of this gracefully.

http://packages.debian.org/wheezy/grub-pc (1.99-17 at the time of writing.)

It is loading the ext2, raid, raid6rec, dosmbr (this one is in the list of modules once per disk) and lvm modules according to the generated grub.cfg file. Also it is defining the list of modules to be loaded twice in the generated grub.cfg file and according to quick Googling around this seems to be the norm and OK for GRUB2.

How to get further by getting GRUB2 to actually be able to read the content of the filesystems and boot the system?

What am I wrong about in my assumptions of functionality here?

EDIT (2012-04-01) My generated grub.cfg:

http://pastie.org/3708436

It seems it first makes my /usr logical volume the root and that might be source of the failure? A grub-mkconfig bug? Or is it supposed to get access to stuff from /usr before / and /boot? /boot is on / for me - no separate boot logical volume.

© Server Fault or respective owner

Related posts about debian

Related posts about ext4