Thursday, August 2, 2012

Use GRUB2 to boot a linux system from a /boot directory in an LVM volume.

Project - Use GRUB2 to boot a linux system from a /boot directory in a Logical Volume Manager (LVM2) volume.

The grub.cfg file must load the dynamic GRUB lvm module :
insmod lvm
GRUB expects /boot to be in a partition named:
(lvmGroupName-lvmBootVolumeName)
The linux kernel expects a /dev tree name for the root directory:
/dev/mapper/lvmGroupName-lvmBootVolumeName

Example:
menuentry "Linux - 2.6.35-32-generic" {
insmod lvm
set root=(vgSys-lvBoot)
linux /vmlinuz-2.6.35-32-generic root=/dev/mapper/vgSys-lvRoot ro
initrd /initrd.img-2.6.35-32-generic }

No comments:

Post a Comment