Monday, May 21, 2012

Boot linux in lvm2 with grub2

Yesterday I created logical volumes, and installed precise over it. After the installer rebooted the computer I found my self at the grub rescue prompt. this is what I had to type in to boot my new install:
ls
set prefix=(vgLabel-lvLabel)/boot/grub
insmod (vgLabel-lvLabel)/boot/grub/linux.mod
insmod part_msdos
insmod ext2
insmod gzio
set root=(vgLabel-lvLabel)
linux /vmlinuz
initrd /initrd.img
boot

After booted, I ran this (as root) to fix grub, where /dev/sda is a bootable drive:

grub-setup /dev/sda


No comments:

Post a Comment