[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Problems probing a LVM device with GRUB2



Hi Tom, thanks for the guidance, see below:

Tom H writes:

> On Thu, Sep 16, 2010 at 6:02 AM, Alberto Luaces wrote:
>>
>> I'm trying to install GRUB2 to a disk that has an ext2/3 filesystem into
>> a LVM partition. I can even start the system from GRUB2 and a boot disk,
>> so it should work.
>>
>> The problem is that `grub-install' displays `no such disk' errors. I
>> have tracked it down to `grub-probe':
>>
>> $ ls /dev/mapper/
>> control  lvm_volume-debian_root  lvm_volume-swap
>>
>> $ sudo grub-probe -d /dev/mapper/lvm_volume-debian_root
>> grub-probe: error: no such disk.
>>
>> How can I make `grub-probe' to find the partition? I'm using Squeeze,
>> with latest GRUB2:
>>
>> $ dpkg -l grub-pc
>> [...]
>> ii  grub-pc                                        1.98+20100804-4
>
> I have sid (with the same version of grub-pc) running with lvm.
>
> Is "/dev/mapper/lvm_volume-debian_root" a symlink to "/dev/dm-X"?

Yes, /dev/dm-0

> What's the output of
> cat /boot/grub/device.map

$ cat /boot/grub/device.map 
(fd0)   /dev/fd0
(hd0)   /dev/disk/by-id/ata-ST3320613AS_5SZ00HA9

> grub-probe --target=abstraction /

$ sudo grub-probe --target=abstraction /
grub-probe: error: no such disk.

> grub-probe --target=device /

$ sudo grub-probe --target=device /                                                                                                                                                     
/dev/mapper/lvm_volume-debian_root

> grub-probe --target=drive /

$ sudo grub-probe --target=drive /                                                                                                                                                            
(lvm_volume-debian_root)

Thanks to that pointers of yours, I realized that I should update my
device.map, adding a last line like this

(lvm_volume-debian_root) /dev/mapper/lvm_volume-debian_root

Now, I try to install grub again:

$ sudo grub-install --no-floppy --modules="ext2 lvm" /dev/sdb

The command finishes succesfully, but when I try to boot from my second
hard disk (sdb), I get an error that looks like:

error: no such device: ff5ef7a3-1d16-4a30-a3d5-1751c02c7630
Entering rescue mode

ff5ef7a3-1d16-4a30-a3d5-1751c02c7630 is the uuid of my /dev/dm-0. It
seems now that the image of my grub doesn't have lvm support, even I
activated it in the `grub-install' call.

Any clue about this? Relevant snippet of my grub.cfg, note that there is
no `insmod lvm' stanza!

insmod ext2
set root='(lvm_volume-debian_root)'
search --no-floppy --fs-uuid --set ff5ef7a3-1d16-4a30-a3d5-1751c02c7630

-- 
Alberto


Reply to: