Bug#567637: grub-probe fails to detect ext3 on raid1 (software raid on md0)

Torsten Landschoff t.landschoff at gmx.net
Sun Jan 31 18:04:38 UTC 2010


Hi again,

I tried to fix this problem which turned out to eat quite a bit of my time.

Anyway, to record what I found out so far:

+ debcheckout fails, I used bzr checkout sftp://bzr.debian.org/bzr/pkg-grub/trunk/grub
bzr checkout on the Vcs-Bzr: line from debian/control fails like this:
bzr: ERROR: Connection error: curl connection error (server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none)
on https://alioth.debian.org/anonscm/bzr/pkg-grub/trunk/grub/ 

+ Building takes forever and has no debugging information. For my build, 
I ended up running

 ./autogen.sh
 ./configure
 make -j5 grub-probe grub_probe_CFLAGS="-g -Wall -O0" grub_probe_LDFLAGS="-g"

There is probably a better way, but this way I got a grub-probe executable.

 sudo ./grub-probe --target=fs --device-map=/boot/grub/device.map --device /dev/md0

reproduces the error. Turned out that the test in fs/ext2.c, line 548, fails:

  if (grub_le_to_cpu16 (data->sblock.magic) != EXT2_MAGIC)
    {
      grub_error (GRUB_ERR_BAD_FS, "not an ext2 filesystem");
 
Looking at data->sblock in gdb shows it is all zero. Reading the ChangeLog
I noticed there were some changes to kern/disk.c. So I tried my luck with

 bzr revert -rtag:1.98~20100115-1 kern/disk.c
 make grub-probe grub_probe_CFLAGS="-g -Wall -O0" grub_probe_LDFLAGS="-g"
 
and it is working again now. I am now looking at the changes to disk.c but
if I fail to find the problem in the next hour, somebody else will have to
pick up here.

Good luck!

  Torsten





More information about the Pkg-grub-devel mailing list