Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm having difficulty booting from an LVM logical volume which is stored on a raid-1 physical volume. Using Ubuntu 13.10 and Grub2 2.00.

The setup is that /boot/grub is on a physical raid-1 set. This all works fine to boot linux from another physical raid-1 disk. I've added another ubuntu installation (14.04) on an lvm volume (also on a raid-1 physical volume), intending to extend the volume if I run out of space on the root partition. This new ubuntu partition boots fine under kvm, and was recognised by update-grub and added to the grub menu

When I try and boot the new partition on my physical PC, I see the grub menu, select the new partition and try to boot, which results in the following errors:

error: no such device: <uuid> 
error: disk lvm/vg-lvname not found
error: you need to load the kernel first

I see that

root=lvm/vg-lvname

(with the names of my vg and lv), and

prefix=(dm2,0)/boot/grub

Note that the quotes above are included in the response to the set command. If I do ls, I can see all my dm0 etc and physical disks, but no lvm disks show up

ls lvm[tab] 

doesn't find anything.

lsmod 

shows that all the modules I think are needed (lvm, dmraid, mspart09) are loaded

The menu entry in grub.cfg is:

menuentry 'Ubuntu 14.04 LTS (14.04)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-b38e71af-fffb-4525-ba66-be153a34dc17' {
    insmod part_msdos
    insmod part_msdos
    insmod part_msdos
    insmod part_msdos
    insmod part_msdos
    insmod part_msdos
    insmod diskfilter
    insmod mdraid09
    insmod diskfilter
    insmod mdraid09
    insmod diskfilter
    insmod mdraid09
    insmod lvm
    insmod ext2
    set root='lvm/vg1-rootfs2'
    if [ x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root --hint='lvm/vg1-rootfs2'  b38e71af-fffb-4525-ba66-be153a34dc17
    else
      search --no-floppy --fs-uuid --set=root b38e71af-fffb-4525-ba66-be153a34dc17
    fi
    linux /boot/vmlinuz-3.13.0-24-generic root=UUID=b38e71af-fffb-4525-ba66-be153a34dc17 ro nosplash
    initrd /boot/initrd.img-3.13.0-24-generic
}

so it seems to be failing on the search command; not finding the uuid, then on the linux command, not finding the volume in the root command, then on the initrd command because it failed to load a linux module

I'd appreciate any advice please.

share|improve this question
    
<comment removed and re-entered as an answer> –  simonltwick Apr 19 at 15:42

1 Answer 1

Solution found: I discovered that I needed to re-install grub to the boot drive (sudo grub-install --modules='lvm mdraid09' /dev/sda and ditto for /dev/sdb as they are mirrored), after which it found my lvm device and loaded the kernel & initramfs.

Now the next step is to get the raid arrays to start so it can find the root volume - by installing mdadm I think but think I'm ok on this & will ask if I need help

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.