Bug#494589: grub-pc: grub-install fails on GPT volume

Felix Zielcke fzielcke at z-51.de
Sun Aug 10 21:20:05 UTC 2008

Am Sonntag, den 10.08.2008, 16:22 -0400 schrieb Edward Allcutt:
> I looked at the changelog for 1.96+20080724-6 from sid but it doesn't
> seem to contain anything relevant.

You could try current upstream SVN[0], which is a bit more recent (i.e.
last change today) then the 0724-X which we currently stick for lenny.
The 0730-1 in experimental isn't that much newer as you can see and it
has not a few bugfixes backported from upstream for the recent 0724-X
Hopefully we can make soon another trunk upload to experimental.

> The most recent previous version I could find was 1.96+20080429-1 from
> snapshot.debian.net. This version does not exhibit the problem and that's
> what I'm reverting to each time to keep my system bootable. (It would
> probably be fine after a simple upgrade but I'm not sure if overwriting
> core.img during grub-install would mess things up.)

Only grub-install/grub-setup recreates and embed core.img
and they are never called by the postinst, except `grub-install
--grub-setup=/bin/true' if you choose to chainload grub2 from
grub-legacy, because for this to work there needs to be a core.img :)

By the way: You can set packages on hold with aptitude with `='
Then that package will never be updated.
If you want to have it updated again you have to remove the hold with

> Now for the errors. The basic grub-install invocation:
> root at emallcut-x:~# grub-install --no-floppy '(hd0)'
> grub-setup: error: Cannot read `/boot/grub/core.img' correctly

grub-setup tries to read the core.img with the functions real GRUB would
use and compares it with the result it gets by reading with OS functions
i.e. what everyother linux binary on your system uses to read files.

>Of the recent changes, patches/00_strengthen_apple_partmap_check.diff
>introduced in 1.96+20080724-3 seems most relevant.

I doubt, because grub-setup is able to detect your extN partition, you
see that in the log, there's no `ext2 detection failed' but many
`Reading `hd0,1'' after `detecting ext2'

So it looks like fs/ext2.c isn't that correct for the extN you have
on /boot

The best would be probable if you could reproduce with a small
filesystem image and would send that to grub-devel at gnu.org, you need to
be subscribed though.
With recompiling from source you can specify ./configure
--enable-grub-fstest, then you get grub-fstest which might help in
finding out what's wrong.

(I say extN because ext2.mod supports now even ext4dev extents)

[0] http://svn.savannah.gnu.org/viewvc/trunk/grub2/?root=grub
    svn co svn://svn.sv.gnu.org/grub/trunk/grub2

More information about the Pkg-grub-devel mailing list