Daily Archives: 20130902

Booting from LVM over mdraid

Recently while setting up a GNU/Linux host which had /boot over LVM over md RAID, I used following command-line to install GRUB2:

# grub-install --modules="biosdisk part_gpt raid chain part_msdos ext2 linux search help mdraid1x configfile ata normal" --boot-directory=/boot /dev/sda

Following is an excerpt from grub.cfg(5) menuentry block:

set root='(VG-Boot)'
linux /vmlinuz root=/dev/mapper/VG-Root ro  quiet
initrd  /initrd.gz

where VG is the name of volume group, and Boot, and Root are the names of logical volumes containing /boot, and / respectively.