Bug#465033: grub-pc: grub-setup fails to open the root-device if it is on a LVM

Robert Millan rmh at aybabtu.com
Sun Feb 10 16:45:51 UTC 2008


On Sun, Feb 10, 2008 at 11:37:50AM +0100, Michael Guntsche wrote:
> 
> With  build 20080209 grub-setup is no longer able to install on a
> lvm root-device.
> 
> With the previous version (20080203) it worked.
> 
> grub-setup -vvvv -r '(fatoftheland-main)' '(hd0)'grub-setup: info:
> prefix = /boot/grub
> grub-setup: info: getting the size of /boot/grub/boot.img
> grub-setup: info: reading /boot/grub/boot.img
> grub-setup: info: getting the size of /boot/grub/boot.img
> grub-setup: info: getting the size of /boot/grub/core.img
> grub-setup: info: reading /boot/grub/core.img
> grub-setup: info: getting the size of /boot/grub/core.img
> grub-setup: info: the size of hd0 is 781422768
> grub-setup: info: setting the root device to `fatoftheland-main'
> grub-setup: info: opening the device `/dev/sda'
> grub-setup: info: will embed the core image into after the MBR
> grub-setup: info: dos partition is -2, bsd partition is -2, prefix is
> (fatoftheland-main)/boot/grub
> grub-setup: info: opening the device `/dev/sda'
> grub-setup: info: opening the device `/dev/sda'
> grub-setup: info: opening the device `/dev/sda'
> grub-setup: info: opening the device `/dev/sda'
> 
> With the current version I get:
> 
> grub-setup -vvvv -r '(fatoftheland-main)' '(hd0)'
> grub-setup: info: prefix = /boot/grub
> grub-setup: info: getting the size of /boot/grub/boot.img
> grub-setup: info: reading /boot/grub/boot.img
> grub-setup: info: getting the size of /boot/grub/boot.img
> grub-setup: info: getting the size of /boot/grub/core.img
> grub-setup: info: reading /boot/grub/core.img
> grub-setup: info: getting the size of /boot/grub/core.img
> /build/buildd/grub2-1.96+20080209/kern/disk.c:220: Opening
> `fatoftheland-main'...
> /build/buildd/grub2-1.96+20080209/kern/disk.c:299: Opening
> `fatoftheland-main' failed.
> /build/buildd/grub2-1.96+20080209/kern/disk.c:312: Closing
> `fatoftheland-main'.
> 
> The core.img file is the same.

GRUB isn't supposed to have a stable ABI.  Never use an old core.img with
a new grub-setup, or for that matter, any combination of core.img, *.lst,
*.mod and grub-setup where all of them aren't the same version.

It is better to just use grub-install to avoid mistakes.  Please, retry with
grub-install "(hd0)" and report if your problem is still present.

-- 
Robert Millan

<GPLv2> I know my rights; I want my phone call!
<DRM> What use is a phone call… if you are unable to speak?
(as seen on /.)





More information about the Pkg-grub-devel mailing list