You are not logged in.

#1 2010-10-04 15:26:47

heptapod
Member
Registered: 2010-06-24
Posts: 35

Grub cant read lvm after upgrade

I have grub2 installed on /dev/sda5. On /dev/sda4 partition I have lvm and logical volumes for arch-home, arch-root, arch-swap and arch-boot. I then manually point grub.cfg (on /dev/sda5) to load kernel and initrd from the lvm volume arch-boot. This way arch can update the boot partition without messing with my other operating systems. This has worked fine so far. This morning I updated arch. I first removed the community-testing repo, and then did pacman -Syy, pacman -Suu. I then tried to reboot which failed.

When I try to boot I get the error message:

no such disk
no such disk
error you need to load the kernel first

When I go into the console of grub2 and type ls I see my partitions: (hd0,4) (hd0,5) etc.
I run

 
insmod lvm
insmod ext2

without errors. I use lsmod to see that lvm is actually loaded. But I can still only see the partitions. Before I used to be able to see logical volumes when doing ls in grub2.

When I run ls (hd0,4) I get the error: partition hd0,4: unknown filesystem.

So for some reason grub2 cant read lvm anymore. I tried using a grub rescue disk (super grub2 rescue), but I get the exact same error, therefore I dont think that reinstalling grub is going to change anything.

I should point out that I have also successfully mounted my lvm partitions from a rescue disk so I dont think that anything is broken there.

Offline

#2 2010-10-05 19:14:15

heptapod
Member
Registered: 2010-06-24
Posts: 35

Re: Grub cant read lvm after upgrade

I tried reinstalling grub anyway.

Mounted my archroot lvm partition and mounted it under /mnt. Mounted /dev, /proc, and /sys with --bind option. I then chrooted into /mnt.

I mounted my grub2 partition as /mnt/bootpartition from inside the chroot.
Also mounted archs boot partition /dev/vg/archboot as /mnt/boot from inside chroot.

Then
grub-install --root-directory=/mnt/bootpartition/boot/grub
which worked without problems.

Then
grub-mkconfig -o /mnt/bootpartition/boot/grub/grub.cfg.
This return the error: /sbin/grub-probe: error: no mapping exists for vg-archboot
But it still creates a grub.cfg.

But when I reboot I have the same problem. The lvm partition does not get recognized.

Offline

#3 2010-10-06 19:36:25

heptapod
Member
Registered: 2010-06-24
Posts: 35

Re: Grub cant read lvm after upgrade

I found out about this bug in grub:
https://bugs.launchpad.net/ubuntu/+sour … bug/563895

So I used the ubuntu 10.10 beta cd to install grub version 1.98+20100804-5ubuntu2, in which this bug have been fixed. But my lvm still dosent show up.

What I would like to know now is if lvm partitions are supposed to show up when I do the following, or if I have forgotten something:
Install grub with grub-install.
Dont create any grub.cfg.
Boot into grub command line.
Write ls.

Offline

Board footer

Powered by FluxBB