Debian Bug report logs - #567637
grub-probe: error: unknown filesystem -- fails to boot from ext3

version graph

Package: grub-pc; Maintainer for grub-pc is GRUB Maintainers <pkg-grub-devel@lists.alioth.debian.org>; Source for grub-pc is src:grub2 (PTS, buildd, popcon).

Reported by: nightolo <antonio@dyne.org>

Date: Sat, 30 Jan 2010 11:30:02 UTC

Severity: grave

Merged with 567618, 568777

Found in version grub2/1.98~20100128-1

Fixed in version grub2/1.98~20100128-1.1

Done: Torsten Landschoff <torsten@debian.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, GRUB Maintainers <pkg-grub-devel@lists.alioth.debian.org>:
Bug#567637; Package grub-pc. (Sat, 30 Jan 2010 11:30:05 GMT) (full text, mbox, link).


Acknowledgement sent to nightolo <antonio@dyne.org>:
New Bug report received and forwarded. Copy sent to GRUB Maintainers <pkg-grub-devel@lists.alioth.debian.org>. (Sat, 30 Jan 2010 11:30:05 GMT) (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: nightolo <antonio@dyne.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: grub-probe: error: unknown filesystem -- fails to boot from ext3
Date: Sat, 30 Jan 2010 11:15:46 +0000
[Message part 1 (text/plain, inline)]
Package: grub-pc
Version: 1.98~20100128-1
Severity: grave
Justification: renders package unusable

After an update from grub-pc_1.98~20100115-1_i386.deb (current testing version) to
grub-pc_1.98~20100128-1_i386.deb, the system does not boot anymore; grub says
"unknown filesystem" and drop me to the rescue> shell, where I cannot do
anything (no "setup" or "boot")

The following is my fdisk -l:
----
   Device Boot      Start         End      Blocks   Id  System
/dev/hda1               1         784     6297448+  8e  Linux LVM
/dev/hda2             785        3844    24579450   8e  Linux LVM
/dev/hda3   *        5884        7230    10819777+  83  Linux
/dev/hda4            3845        5883    16378267+   5  Extended
/dev/hda5            3845        3907      506016   82  Linux swap / Solaris
/dev/hda6            3908        5732    14659281   8e  Linux LVM
----

/ is on /dev/hda3

Unfortunately after the upgrade grub-probe is unable to find the filesystem, so
the update fails with this message (full message in the attachment):

----
/usr/sbin/grub-probe: error: unknown filesystem.
Auto-detection of a filesystem module failed.
Please specify the module with the option `--modules' explicitly.
----

And if I do grub-probe -t fs / manually it returns the same error (unknown
filesystem), downgrading fixes the issue.

The attachment contains all the various combnations of grub-probe outputs under
20100115 (working) and 20100128 (non-working), I've also included both grub.cfg
and menu.lst, a mount(1) output and the full error message returned as output of
"apt-get install grub-pc" on unstable.

Please let me know if you need any other info.

The severity of this "bug" is grave because the package is completely unusable
and there is no way to boot the system unless I downgrade the package.`

Cheers
Antonio

-- Package-specific info:

*********************** BEGIN /proc/mounts
/dev/disk/by-uuid/9d011af3-a825-4c0b-89d0-a34dc9f34780 / ext3 rw,relatime,errors=remount-ro,data=ordered 0 0
/dev/mapper/vg0-homes /home ext3 rw,relatime,errors=remount-ro,data=ordered 0 0
*********************** END /proc/mounts

*********************** BEGIN /boot/grub/device.map
(hd0)	/dev/hda
*********************** END /boot/grub/device.map

*********************** BEGIN /boot/grub/grub.cfg
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by /usr/sbin/grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
  load_env
fi
set default="0"
if [ ${prev_saved_entry} ]; then
  set saved_entry=${prev_saved_entry}
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z ${boot_once} ]; then
    saved_entry=${chosen}
    save_env saved_entry
  fi
}
insmod ext2
set root=(hd0,3)
search --no-floppy --fs-uuid --set 9d011af3-a825-4c0b-89d0-a34dc9f34780
if loadfont /usr/share/grub/unicode.pf2 ; then
  set gfxmode=640x480
  insmod gfxterm
  insmod vbe
  if terminal_output gfxterm ; then true ; else
    # For backward compatibility with versions of terminal.mod that don't
    # understand terminal_output
    terminal gfxterm
  fi
fi
set locale_dir=/boot/grub/locale
set lang=en
insmod gettext
set timeout=5
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
insmod ext2
set root=(hd0,3)
search --no-floppy --fs-uuid --set 9d011af3-a825-4c0b-89d0-a34dc9f34780
insmod png
if background_image /boot/grub/moreblue-orbit-grub.png ; then
  set color_normal=black/black
  set color_highlight=magenta/black
else
  set menu_color_normal=cyan/blue
  set menu_color_highlight=white/blue
fi
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
menuentry "Debian GNU/Linux, with Linux 2.6.30-2-686" {
	insmod ext2
	set root=(hd0,3)
	search --no-floppy --fs-uuid --set 9d011af3-a825-4c0b-89d0-a34dc9f34780
	echo	Loading Linux 2.6.30-2-686 ...
	linux	/boot/vmlinuz-2.6.30-2-686 root=UUID=9d011af3-a825-4c0b-89d0-a34dc9f34780 ro  quiet
	echo	Loading initial ramdisk ...
	initrd	/boot/initrd.img-2.6.30-2-686
}
menuentry "Debian GNU/Linux, with Linux 2.6.30-2-686 (recovery mode)" {
	insmod ext2
	set root=(hd0,3)
	search --no-floppy --fs-uuid --set 9d011af3-a825-4c0b-89d0-a34dc9f34780
	echo	Loading Linux 2.6.30-2-686 ...
	linux	/boot/vmlinuz-2.6.30-2-686 root=UUID=9d011af3-a825-4c0b-89d0-a34dc9f34780 ro single 
	echo	Loading initial ramdisk ...
	initrd	/boot/initrd.img-2.6.30-2-686
}
menuentry "Debian GNU/Linux, with Linux 2.6.26-2-686" {
	insmod ext2
	set root=(hd0,3)
	search --no-floppy --fs-uuid --set 9d011af3-a825-4c0b-89d0-a34dc9f34780
	echo	Loading Linux 2.6.26-2-686 ...
	linux	/boot/vmlinuz-2.6.26-2-686 root=UUID=9d011af3-a825-4c0b-89d0-a34dc9f34780 ro  quiet
	echo	Loading initial ramdisk ...
	initrd	/boot/initrd.img-2.6.26-2-686
}
menuentry "Debian GNU/Linux, with Linux 2.6.26-2-686 (recovery mode)" {
	insmod ext2
	set root=(hd0,3)
	search --no-floppy --fs-uuid --set 9d011af3-a825-4c0b-89d0-a34dc9f34780
	echo	Loading Linux 2.6.26-2-686 ...
	linux	/boot/vmlinuz-2.6.26-2-686 root=UUID=9d011af3-a825-4c0b-89d0-a34dc9f34780 ro single 
	echo	Loading initial ramdisk ...
	initrd	/boot/initrd.img-2.6.26-2-686
}
menuentry "Debian GNU/Linux, with Linux 2.6.26-1-686" {
	insmod ext2
	set root=(hd0,3)
	search --no-floppy --fs-uuid --set 9d011af3-a825-4c0b-89d0-a34dc9f34780
	echo	Loading Linux 2.6.26-1-686 ...
	linux	/boot/vmlinuz-2.6.26-1-686 root=UUID=9d011af3-a825-4c0b-89d0-a34dc9f34780 ro  quiet
	echo	Loading initial ramdisk ...
	initrd	/boot/initrd.img-2.6.26-1-686
}
menuentry "Debian GNU/Linux, with Linux 2.6.26-1-686 (recovery mode)" {
	insmod ext2
	set root=(hd0,3)
	search --no-floppy --fs-uuid --set 9d011af3-a825-4c0b-89d0-a34dc9f34780
	echo	Loading Linux 2.6.26-1-686 ...
	linux	/boot/vmlinuz-2.6.26-1-686 root=UUID=9d011af3-a825-4c0b-89d0-a34dc9f34780 ro single 
	echo	Loading initial ramdisk ...
	initrd	/boot/initrd.img-2.6.26-1-686
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###
*********************** END /boot/grub/grub.cfg

-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.30-2-686 (SMP w/1 CPU core)
Locale: LANG=en_IE.UTF-8, LC_CTYPE=en_IE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages grub-pc depends on:
ii  debconf [debconf-2.0]    1.5.28          Debian configuration management sy
ii  grub-common              1.98~20100115-1 GRand Unified Bootloader, version 
ii  libc6                    2.10.2-5        Embedded GNU C Library: Shared lib
ii  ucf                      3.0025          Update Configuration File: preserv

grub-pc recommends no packages.

Versions of packages grub-pc suggests:
ii  desktop-base                  5.0.5      common files for the Debian Deskto

-- debconf-show failed
[grub-upgrade.tar (application/x-tar, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org, GRUB Maintainers <pkg-grub-devel@lists.alioth.debian.org>:
Bug#567637; Package grub-pc. (Sat, 30 Jan 2010 15:06:05 GMT) (full text, mbox, link).


Acknowledgement sent to heroxbd@gmail.com:
Extra info received and forwarded to list. Copy sent to GRUB Maintainers <pkg-grub-devel@lists.alioth.debian.org>. (Sat, 30 Jan 2010 15:06:05 GMT) (full text, mbox, link).


Message #10 received at 567637@bugs.debian.org (full text, mbox, reply):

From: heroxbd@gmail.com
To: 567637@bugs.debian.org
Subject: I can confirm this bug
Date: Sun, 31 Jan 2010 00:04:33 +0900
Hi,

I can confirm this bug.

After upgrading, my NTFS partition can not be recognized:

# update-grub2 
head: cannot open `/boot/grub/video.lst' for reading: No such file or
directory
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-2.6.32-trunk-686
Found initrd image: /boot/initrd.img-2.6.32-trunk-686
Found Microsoft Windows XP Professional on /dev/sda4
/usr/sbin/grub-probe: error: unknown filesystem.
done

Cheers,
-- 
XU Benda
Research Center for Neutrino Science
Department of Physics
Tohoku University
JAPAN

http://www.awa.tohoku.ac.jp/~benda




Information forwarded to debian-bugs-dist@lists.debian.org, GRUB Maintainers <pkg-grub-devel@lists.alioth.debian.org>:
Bug#567637; Package grub-pc. (Sat, 30 Jan 2010 22:24:05 GMT) (full text, mbox, link).


Acknowledgement sent to Don Pellegrino <don@drexel.edu>:
Extra info received and forwarded to list. Copy sent to GRUB Maintainers <pkg-grub-devel@lists.alioth.debian.org>. (Sat, 30 Jan 2010 22:24:05 GMT) (full text, mbox, link).


Message #15 received at 567637@bugs.debian.org (full text, mbox, reply):

From: Don Pellegrino <don@drexel.edu>
To: 567637@bugs.debian.org
Subject: Confirmation
Date: Sat, 30 Jan 2010 17:02:33 -0500
I can confirm this bug.

# dpkg --configure grub-pc
Setting up grub-pc (1.98~20100128-1) ...
/usr/sbin/grub-probe: error: unknown filesystem.
Auto-detection of a filesystem module failed.
Please specify the module with the option `--modules' explicitly.
Generating grub.cfg ...
/usr/sbin/grub-probe: error: unknown filesystem.
dpkg: error processing grub-pc (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 grub-pc

# cat /etc/fstab
# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    defaults        0       0
/dev/sda3       /               ext3    defaults,errors=remount-ro 0       1
/dev/sda5       none            swap    sw              0       0
/dev/hda        /media/cdrom0   udf,iso9660 user,noauto     0       0
/dev/sda2	/mnt/sda2	ntfs-3g	defaults	0	0
tmpfs		/dev/shm	tmpfs	defaults	0	0

# fdisk -l

Disk /dev/sda: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xd42257f9

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1        1367    10980396    7  HPFS/NTFS
/dev/sda2   *        1368       13525    97659135    7  HPFS/NTFS
/dev/sda3           13526       30070   132897712+  83  Linux
/dev/sda4           30071       30401     2658757+   5  Extended
/dev/sda5           30071       30401     2658726   82  Linux swap / Solaris




Information forwarded to debian-bugs-dist@lists.debian.org, GRUB Maintainers <pkg-grub-devel@lists.alioth.debian.org>:
Bug#567637; Package grub-pc. (Sun, 31 Jan 2010 11:09:05 GMT) (full text, mbox, link).


Acknowledgement sent to Torsten Landschoff <t.landschoff@gmx.net>:
Extra info received and forwarded to list. Copy sent to GRUB Maintainers <pkg-grub-devel@lists.alioth.debian.org>. (Sun, 31 Jan 2010 11:09:05 GMT) (full text, mbox, link).


Message #20 received at 567637@bugs.debian.org (full text, mbox, reply):

From: Torsten Landschoff <t.landschoff@gmx.net>
To: 567637@bugs.debian.org
Subject: grub-probe fails to detect ext3 on raid1 (software raid on md0)
Date: Sun, 31 Jan 2010 11:59:10 +0100
Hi grub team.

After upgrading my system, configuration of grub failed. I noticed but thought that the old installation in /boot should still work fine.

That turned out to be wrong. When booting the system the next day, I ended up in grub rescue mode. My interaction went like this:

grub rescue> insmod linux
error: the symbol `grub_env_find´ not found.
grub rescue> linux
Unknown command `linux´

So my system was unbootable. I think on upgrade, the old grub installation should be still available if the new grub does not install. This is probably more of an upstream problem...

Anyway, it turned out that downgrading to 1.98~20100115-1 fixed the problem. The step that is failing is grub-probe trying to determine the filesystem on /dev/md0.

Greetings, Torsten


-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-trunk-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages grub-common depends on:
ii  base-files              5.0.0            Debian base system miscellaneous f
ii  dpkg                    1.15.5.6         Debian package management system
ii  gettext-base            0.17-8           GNU Internationalization utilities
ii  install-info            4.13a.dfsg.1-5   Manage installed documentation in 
ii  libc6                   2.10.2-5         Embedded GNU C Library: Shared lib
ii  libfreetype6            2.3.11-1         FreeType 2 font engine, shared lib
ii  zlib1g                  1:1.2.3.4.dfsg-3 compression library - runtime

Versions of packages grub-common recommends:
ii  os-prober                     1.35       utility to detect other OSes on a 

Versions of packages grub-common suggests:
pn  grub-emu                      <none>     (no description available)
pn  multiboot-doc                 <none>     (no description available)

-- no debconf information




Information forwarded to debian-bugs-dist@lists.debian.org, GRUB Maintainers <pkg-grub-devel@lists.alioth.debian.org>:
Bug#567637; Package grub-pc. (Sun, 31 Jan 2010 18:06:02 GMT) (full text, mbox, link).


Acknowledgement sent to Torsten Landschoff <t.landschoff@gmx.net>:
Extra info received and forwarded to list. Copy sent to GRUB Maintainers <pkg-grub-devel@lists.alioth.debian.org>. (Sun, 31 Jan 2010 18:06:03 GMT) (full text, mbox, link).


Message #25 received at 567637@bugs.debian.org (full text, mbox, reply):

From: Torsten Landschoff <t.landschoff@gmx.net>
To: 567637@bugs.debian.org
Subject: Re: grub-probe fails to detect ext3 on raid1 (software raid on md0)
Date: Sun, 31 Jan 2010 19:04:38 +0100
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




Information forwarded to debian-bugs-dist@lists.debian.org, GRUB Maintainers <pkg-grub-devel@lists.alioth.debian.org>:
Bug#567637; Package grub-pc. (Sun, 31 Jan 2010 18:27:08 GMT) (full text, mbox, link).


Acknowledgement sent to Luk Claes <luk@debian.org>:
Extra info received and forwarded to list. Copy sent to GRUB Maintainers <pkg-grub-devel@lists.alioth.debian.org>. (Sun, 31 Jan 2010 18:27:08 GMT) (full text, mbox, link).


Message #30 received at 567637@bugs.debian.org (full text, mbox, reply):

From: Luk Claes <luk@debian.org>
To: Torsten Landschoff <t.landschoff@gmx.net>, 567637@bugs.debian.org, pkg-devscripts <pkg-devscripts@teams.debian.net>, ca-certificates@packages.debian.org
Subject: Re: Bug#567637: grub-probe fails to detect ext3 on raid1 (software raid on md0)
Date: Sun, 31 Jan 2010 19:26:01 +0100
Torsten Landschoff wrote:

> + 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/ 

devscripts and ca-certificates maintainers Cc-ed.

curl could be told to ignore certificate verification (in debcheckout,
I'm not sure that should be done though). The other option is I guess to
make sure that the certificate of the CA of alioth (ca.debian.org aka
Debian) is in ca-certificates. Could be tried by installing the cert in
/etc/ssl/certs and running dpkg-reconfigure ca-certificates AFAIR.

Cheers

Luk




Information forwarded to debian-bugs-dist@lists.debian.org, GRUB Maintainers <pkg-grub-devel@lists.alioth.debian.org>:
Bug#567637; Package grub-pc. (Sun, 31 Jan 2010 19:21:06 GMT) (full text, mbox, link).


Acknowledgement sent to Torsten Landschoff <torsten@debian.org>:
Extra info received and forwarded to list. Copy sent to GRUB Maintainers <pkg-grub-devel@lists.alioth.debian.org>. (Sun, 31 Jan 2010 19:21:06 GMT) (full text, mbox, link).


Message #35 received at 567637@bugs.debian.org (full text, mbox, reply):

From: Torsten Landschoff <torsten@debian.org>
To: grub-devel@gnu.org, 567637@bugs.debian.org
Subject: [MERGE] Fix the fix of disk read offset computation
Date: Sun, 31 Jan 2010 20:17:49 +0100
[Message part 1 (text/plain, inline)]
Hi Grub developers.

During the last upgrade of the grub-pc package I made my system unbootable
due to the bug reported here: http://bugs.debian.org/567637

I tried to fix that problem, see attached patch.

Greetings, Torsten
[upstream-2151.patch (text/x-diff, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org, GRUB Maintainers <pkg-grub-devel@lists.alioth.debian.org>:
Bug#567637; Package grub-pc. (Sun, 31 Jan 2010 20:06:08 GMT) (full text, mbox, link).


Acknowledgement sent to Vladimir 'φ-coder/phcoder' Serbinenko <phcoder@gmail.com>:
Extra info received and forwarded to list. Copy sent to GRUB Maintainers <pkg-grub-devel@lists.alioth.debian.org>. (Sun, 31 Jan 2010 20:06:08 GMT) (full text, mbox, link).


Message #40 received at 567637@bugs.debian.org (full text, mbox, reply):

From: Vladimir 'φ-coder/phcoder' Serbinenko <phcoder@gmail.com>
To: 567637@bugs.debian.org
Subject: (no subject)
Date: Sun, 31 Jan 2010 21:04:18 +0100
[Message part 1 (text/plain, inline)]
Torsten Landschoff: the passage you changed contained previously a bug which I fixed. Then it uncovered another bug. Reintroducing original bug isn't a solution.


I stumbled accross this problem on my imac g3. Please test the attached fix

-- 
Regards
Vladimir 'φ-coder/phcoder' Serbinenko

[hostpart.diff (text/x-diff, inline)]
=== modified file 'util/hostdisk.c'
--- util/hostdisk.c	2010-01-25 17:04:22 +0000
+++ util/hostdisk.c	2010-01-31 11:52:27 +0000
@@ -336,7 +336,8 @@
     char dev[PATH_MAX];
 
     strcpy (dev, map[disk->id].device);
-    if (disk->partition && strncmp (map[disk->id].device, "/dev/", 5) == 0)
+    if (disk->partition && sector >= disk->partition->start
+	&& strncmp (map[disk->id].device, "/dev/", 5) == 0)
       is_partition = linux_find_partition (dev, disk->partition->start);
 
     /* Open the partition.  */
@@ -490,6 +491,23 @@
 {
   int fd;
 
+  /* Split pre-partition and partition reads.  */
+  if (disk->partition && sector < disk->partition->start
+      && sector + size > disk->partition->start)
+    {
+      grub_err_t err;
+      err = grub_util_biosdisk_read (disk, sector,
+				     disk->partition->start - sector,
+				     buf);
+      if (err)
+	return err;
+
+      return grub_util_biosdisk_read (disk, disk->partition->start,
+				      size - (disk->partition->start - sector),
+				      buf + ((disk->partition->start - sector)
+					     << GRUB_DISK_SECTOR_BITS));
+    }
+
   fd = open_device (disk, sector, O_RDONLY);
   if (fd < 0)
     return grub_errno;
@@ -527,6 +545,23 @@
 {
   int fd;
 
+  /* Split pre-partition and partition writes.  */
+  if (disk->partition && sector < disk->partition->start
+      && sector + size > disk->partition->start)
+    {
+      grub_err_t err;
+      err = grub_util_biosdisk_write (disk, sector,
+				      disk->partition->start - sector,
+				      buf);
+      if (err)
+	return err;
+
+      return grub_util_biosdisk_write (disk, disk->partition->start,
+				       size - (disk->partition->start - sector),
+				       buf + ((disk->partition->start - sector)
+					      << GRUB_DISK_SECTOR_BITS));
+    }
+
   fd = open_device (disk, sector, O_WRONLY);
   if (fd < 0)
     return grub_errno;

[signature.asc (application/pgp-signature, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org, GRUB Maintainers <pkg-grub-devel@lists.alioth.debian.org>:
Bug#567637; Package grub-pc. (Sun, 31 Jan 2010 21:15:06 GMT) (full text, mbox, link).


Message #43 received at 567637@bugs.debian.org (full text, mbox, reply):

From: Philipp Kern <pkern@debian.org>
To: Luk Claes <luk@debian.org>
Cc: Torsten Landschoff <t.landschoff@gmx.net>, 567637@bugs.debian.org, pkg-devscripts <pkg-devscripts@teams.debian.net>, ca-certificates@packages.debian.org
Subject: Re: Bug#567637: grub-probe fails to detect ext3 on raid1 (software raid on md0)
Date: Sun, 31 Jan 2010 22:13:00 +0100
[Message part 1 (text/plain, inline)]
On Sun, Jan 31, 2010 at 07:26:01PM +0100, Luk Claes wrote:
> Torsten Landschoff wrote:
> > + 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/ 
> devscripts and ca-certificates maintainers Cc-ed.
> curl could be told to ignore certificate verification (in debcheckout,
> I'm not sure that should be done though). The other option is I guess to
> make sure that the certificate of the CA of alioth (ca.debian.org aka
> Debian) is in ca-certificates. Could be tried by installing the cert in
> /etc/ssl/certs and running dpkg-reconfigure ca-certificates AFAIR.

We have SPI in there, see `/usr/share/ca-certificates/spi-inc.org'.  Why
isn't that sufficient?

Kind regards,
Philipp Kern
-- 
 .''`.  Philipp Kern                        Debian Developer
: :' :  http://philkern.de                         Stable Release Manager
`. `'   xmpp:phil@0x539.de                         Wanna-Build Admin
  `-    finger pkern/key@db.debian.org
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, GRUB Maintainers <pkg-grub-devel@lists.alioth.debian.org>:
Bug#567637; Package grub-pc. (Sun, 31 Jan 2010 21:42:06 GMT) (full text, mbox, link).


Acknowledgement sent to Torsten Landschoff <t.landschoff@gmx.net>:
Extra info received and forwarded to list. Copy sent to GRUB Maintainers <pkg-grub-devel@lists.alioth.debian.org>. (Sun, 31 Jan 2010 21:42:06 GMT) (full text, mbox, link).


Message #48 received at 567637@bugs.debian.org (full text, mbox, reply):

From: Torsten Landschoff <t.landschoff@gmx.net>
To: Philipp Kern <pkern@debian.org>
Cc: Luk Claes <luk@debian.org>, Torsten Landschoff <t.landschoff@gmx.net>, 567637@bugs.debian.org, pkg-devscripts <pkg-devscripts@teams.debian.net>, ca-certificates@packages.debian.org
Subject: Re: Bug#567637: grub-probe fails to detect ext3 on raid1 (software raid on md0)
Date: Sun, 31 Jan 2010 22:39:06 +0100
On Sun, Jan 31, 2010 at 10:13:00PM +0100, Philipp Kern wrote:
> > I'm not sure that should be done though). The other option is I guess to
> > make sure that the certificate of the CA of alioth (ca.debian.org aka
> > Debian) is in ca-certificates. Could be tried by installing the cert in
> > /etc/ssl/certs and running dpkg-reconfigure ca-certificates AFAIR.
> 
> We have SPI in there, see `/usr/share/ca-certificates/spi-inc.org'.  Why
> isn't that sufficient?

Seems like this is python-pycurl related. I tried building it with openssl.
With that pycurl variant, I can at least use the example retriever script
to get the index of the bzr directory. However, bzr branch still gives
an error:

bzr: ERROR: Connection closed: Unexpected end of message. Please check connectivity and permissions, and report a bug if problems persist. 

This might in fact be because of an invalid path. It works when using

bzr branch nosmart+https://alioth.debian.org/anonscm/bzr/pkg-grub/trunk/grub/ grub-pc

Greetings, Torsten




Merged 567618 567637. Request was from t.landschoff@gmx.net (Torsten Landschoff) to control@bugs.debian.org. (Mon, 01 Feb 2010 07:03:04 GMT) (full text, mbox, link).


Information forwarded to debian-bugs-dist@lists.debian.org, GRUB Maintainers <pkg-grub-devel@lists.alioth.debian.org>:
Bug#567637; Package grub-pc. (Mon, 01 Feb 2010 22:57:03 GMT) (full text, mbox, link).


Acknowledgement sent to Paul Menzel <pm.debian@googlemail.com>:
Extra info received and forwarded to list. Copy sent to GRUB Maintainers <pkg-grub-devel@lists.alioth.debian.org>. (Mon, 01 Feb 2010 22:57:03 GMT) (full text, mbox, link).


Message #55 received at 567637@bugs.debian.org (full text, mbox, reply):

From: Paul Menzel <pm.debian@googlemail.com>
To: Vladimir 'φ-coder/phcoder' Serbinenko <phcoder@gmail.com>, 567637@bugs.debian.org
Cc: nightolo <antonio@dyne.org>, heroxbd@gmail.com, don@drexel.edu, t.landschoff@gmx.net, luk@debian.org
Subject: Re: Bug#567637: Patch for unknown file system on raid1 system
Date: Mon, 01 Feb 2010 23:55:28 +0100
[Message part 1 (text/plain, inline)]
Dear Vladimir


Am Sonntag, den 31.01.2010, 21:04 +0100 schrieb Vladimir 'φ-coder/phcoder' Serbinenko:

[…]

> I stumbled accross this problem on my imac g3. Please test the attached fix

I safed your patch under `debian/patches/08_hostpart.diff` and build a
Debian package with the patch applied.

        $ debcheckout grub-pc # I do not know if that is equivalent to the grub-pkg-source as used by Torsten.
        $ cd grub-pc
        $ bzr cat http://bzr.debian.org/bzr/pkg-grub/trunk/grub-legacy/debian/update-grub > debian/legacy/update-grub
        $ svn export svn://svn.sv.nongnu.org/grub-extras/ debian/grub-extras # `…/trunk` as suggested in the error message did not.
        $ dch "Fix for bug 567618/567637." # dch is in DebPkg:devscripts.
        $ dpkg-buildpackage -us -uc
        $ sudo dpkg -i ../grub-common*.deb ../grub-pc*.deb

It seems to work for me.

        $ sudo grub-probe -d /dev/md0
        ext2


Thanks for your work,

Paul
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, GRUB Maintainers <pkg-grub-devel@lists.alioth.debian.org>:
Bug#567637; Package grub-pc. (Mon, 08 Feb 2010 21:48:19 GMT) (full text, mbox, link).


Acknowledgement sent to Torsten Landschoff <t.landschoff@gmx.net>:
Extra info received and forwarded to list. Copy sent to GRUB Maintainers <pkg-grub-devel@lists.alioth.debian.org>. (Mon, 08 Feb 2010 21:48:19 GMT) (full text, mbox, link).


Message #60 received at 567637@bugs.debian.org (full text, mbox, reply):

From: Torsten Landschoff <t.landschoff@gmx.net>
To: 567637@bugs.debian.org
Subject: NMU uploaded to delayed/3
Date: Mon, 8 Feb 2010 22:45:22 +0100
Hi *,

With the bug standing a while I figured an upload could spare some users or
developers an unbootable system.

Therefore I just uploaded a package with my trivial patch (filed with this
report) to delayed/3 days. Hope that's okay with you.

It should be a save thing since this change was merged upstream. I built on
my developer box running sid, installed it and checked that I can boot again.

Best of luck,

Torsten




Information forwarded to debian-bugs-dist@lists.debian.org, GRUB Maintainers <pkg-grub-devel@lists.alioth.debian.org>:
Bug#567637; Package grub-pc. (Mon, 08 Feb 2010 22:06:06 GMT) (full text, mbox, link).


Acknowledgement sent to Torsten Landschoff <t.landschoff@gmx.net>:
Extra info received and forwarded to list. Copy sent to GRUB Maintainers <pkg-grub-devel@lists.alioth.debian.org>. (Mon, 08 Feb 2010 22:06:06 GMT) (full text, mbox, link).


Message #65 received at 567637@bugs.debian.org (full text, mbox, reply):

From: Torsten Landschoff <t.landschoff@gmx.net>
To: 567637@bugs.debian.org
Subject: Rescheduled...
Date: Mon, 8 Feb 2010 23:05:20 +0100
Hi again,

Just a notice that I rescheduled the upload for 0-day as requested on IRC.

Greetings, Torsten




Reply sent to Torsten Landschoff <torsten@debian.org>:
You have taken responsibility. (Mon, 08 Feb 2010 22:21:16 GMT) (full text, mbox, link).


Notification sent to nightolo <antonio@dyne.org>:
Bug acknowledged by developer. (Mon, 08 Feb 2010 22:21:17 GMT) (full text, mbox, link).


Message #70 received at 567637-close@bugs.debian.org (full text, mbox, reply):

From: Torsten Landschoff <torsten@debian.org>
To: 567637-close@bugs.debian.org
Subject: Bug#567637: fixed in grub2 1.98~20100128-1.1
Date: Mon, 08 Feb 2010 22:18:43 +0000
Source: grub2
Source-Version: 1.98~20100128-1.1

We believe that the bug you reported is fixed in the latest version of
grub2, which is due to be installed in the Debian FTP archive:

grub-common_1.98~20100128-1.1_amd64.deb
  to main/g/grub2/grub-common_1.98~20100128-1.1_amd64.deb
grub-coreboot_1.98~20100128-1.1_amd64.deb
  to main/g/grub2/grub-coreboot_1.98~20100128-1.1_amd64.deb
grub-efi-amd64_1.98~20100128-1.1_amd64.deb
  to main/g/grub2/grub-efi-amd64_1.98~20100128-1.1_amd64.deb
grub-efi-ia32_1.98~20100128-1.1_amd64.deb
  to main/g/grub2/grub-efi-ia32_1.98~20100128-1.1_amd64.deb
grub-efi_1.98~20100128-1.1_amd64.deb
  to main/g/grub2/grub-efi_1.98~20100128-1.1_amd64.deb
grub-emu_1.98~20100128-1.1_amd64.deb
  to main/g/grub2/grub-emu_1.98~20100128-1.1_amd64.deb
grub-firmware-qemu_1.98~20100128-1.1_amd64.deb
  to main/g/grub2/grub-firmware-qemu_1.98~20100128-1.1_amd64.deb
grub-ieee1275_1.98~20100128-1.1_amd64.deb
  to main/g/grub2/grub-ieee1275_1.98~20100128-1.1_amd64.deb
grub-linuxbios_1.98~20100128-1.1_amd64.deb
  to main/g/grub2/grub-linuxbios_1.98~20100128-1.1_amd64.deb
grub-pc_1.98~20100128-1.1_amd64.deb
  to main/g/grub2/grub-pc_1.98~20100128-1.1_amd64.deb
grub-rescue-pc_1.98~20100128-1.1_amd64.deb
  to main/g/grub2/grub-rescue-pc_1.98~20100128-1.1_amd64.deb
grub2_1.98~20100128-1.1.diff.gz
  to main/g/grub2/grub2_1.98~20100128-1.1.diff.gz
grub2_1.98~20100128-1.1.dsc
  to main/g/grub2/grub2_1.98~20100128-1.1.dsc
grub2_1.98~20100128-1.1_amd64.deb
  to main/g/grub2/grub2_1.98~20100128-1.1_amd64.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 567637@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Torsten Landschoff <torsten@debian.org> (supplier of updated grub2 package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Mon, 08 Feb 2010 22:15:01 +0100
Source: grub2
Binary: grub2 grub-linuxbios grub-efi grub-common grub-emu grub-pc grub-rescue-pc grub-coreboot grub-efi-ia32 grub-efi-amd64 grub-ieee1275 grub-firmware-qemu grub-yeeloong
Architecture: source amd64
Version: 1.98~20100128-1.1
Distribution: unstable
Urgency: low
Maintainer: GRUB Maintainers <pkg-grub-devel@lists.alioth.debian.org>
Changed-By: Torsten Landschoff <torsten@debian.org>
Description: 
 grub-common - GRand Unified Bootloader, version 2 (common files)
 grub-coreboot - GRand Unified Bootloader, version 2 (Coreboot version)
 grub-efi   - GRand Unified Bootloader, version 2 (dummy package)
 grub-efi-amd64 - GRand Unified Bootloader, version 2 (EFI-AMD64 version)
 grub-efi-ia32 - GRand Unified Bootloader, version 2 (EFI-IA32 version)
 grub-emu   - GRand Unified Bootloader, version 2 (emulated version)
 grub-firmware-qemu - GRUB firmware image for QEMU
 grub-ieee1275 - GRand Unified Bootloader, version 2 (Open Firmware version)
 grub-linuxbios - GRand Unified Bootloader, version 2 (dummy package)
 grub-pc    - GRand Unified Bootloader, version 2 (PC/BIOS version)
 grub-rescue-pc - GRUB bootable rescue images, version 2 (PC/BIOS version)
 grub-yeeloong - GRand Unified Bootloader, version 2 (Yeeloong version)
 grub2      - GRand Unified Bootloader, version 2 (dummy package)
Closes: 567637
Changes: 
 grub2 (1.98~20100128-1.1) unstable; urgency=low
 .
   * Non-maintainer upload.
   * Apply trivial patch (already merged upstream) fixing the offset
     computation for non-cached reads (closes: #567637).
Checksums-Sha1: 
 c3c21403388bf76f90258121b0b6521eebffda49 1813 grub2_1.98~20100128-1.1.dsc
 f3be28a4696a525b94eead892496388e0632fc33 285534 grub2_1.98~20100128-1.1.diff.gz
 f421a5afa72a0b678d014780f90da792156c4d82 232422 grub2_1.98~20100128-1.1_amd64.deb
 25ebdc0b4bf3e0410df5d3041f8971df9409a3e7 231204 grub-linuxbios_1.98~20100128-1.1_amd64.deb
 3b0295129340e3bd3ae0275957a12a666386ee6a 231212 grub-efi_1.98~20100128-1.1_amd64.deb
 70f8dce0be1c8d60ba05d7411d6a1f29583d8796 1175828 grub-common_1.98~20100128-1.1_amd64.deb
 1e07c944931710fb7b55a87efbfacbec22c8cd6f 750578 grub-emu_1.98~20100128-1.1_amd64.deb
 feafaaa289eda20a1b8f8e22d67ffc42c1b8c45e 817098 grub-pc_1.98~20100128-1.1_amd64.deb
 fbcf4c845dc5ff73e289fd7b3d8885da6c5345a2 231984 grub-rescue-pc_1.98~20100128-1.1_amd64.deb
 159a0cdeb767a6aba7949a87b496862848d18f56 608354 grub-coreboot_1.98~20100128-1.1_amd64.deb
 481d6c41b944fc5a3a4e616e3ec096795bc05fac 647850 grub-efi-ia32_1.98~20100128-1.1_amd64.deb
 4089da5dc5b65bfa0687ca5b2a660dc97f917d33 705938 grub-efi-amd64_1.98~20100128-1.1_amd64.deb
 bd0ad31115031bb52268dd4b737e90f695249b3e 600862 grub-ieee1275_1.98~20100128-1.1_amd64.deb
 11e6e709038e1ed3fa3995e658d606fe8ba263ad 577996 grub-firmware-qemu_1.98~20100128-1.1_amd64.deb
Checksums-Sha256: 
 63b8f412f99ab24822efb385303175a36315c9231fee040aa2126496aadcc5cc 1813 grub2_1.98~20100128-1.1.dsc
 bdad4f09fd81efbe7ab9a8e0e60afc1f77d46afbdbb68fe56a2cd2afdb91306e 285534 grub2_1.98~20100128-1.1.diff.gz
 25e379c57f191465462a49a845a23c37f934409f45fbe0c24ea0f7ad8a03fecd 232422 grub2_1.98~20100128-1.1_amd64.deb
 1e82f0661c3b7a8bd9cda186c4eb79cf0c8d573efa40165cb78470639e707b2f 231204 grub-linuxbios_1.98~20100128-1.1_amd64.deb
 71a7f279fd4289cb766b1c45caa4cd3f8f3082bc11c427186cbf6de3c31cb740 231212 grub-efi_1.98~20100128-1.1_amd64.deb
 7520ad14faf8d4e9f8598ecbeacd95ea08615facf7faba6773a1555e9e6da2cc 1175828 grub-common_1.98~20100128-1.1_amd64.deb
 f413b0837c91dc0cd71eb6403aa9e9b66d8a84f08411bd48a9fb5c4ff8b5f361 750578 grub-emu_1.98~20100128-1.1_amd64.deb
 eb768f064d51ec20cb5571ba161f344e86fde4d8cf51a8d35d9dba81941f0d06 817098 grub-pc_1.98~20100128-1.1_amd64.deb
 12b8abcf87d9e3133a9efb90f67a7c3ce7fd8f8ebe28c0d0c18ce19aee892cb1 231984 grub-rescue-pc_1.98~20100128-1.1_amd64.deb
 af7a85737eedc3996c87c8f7a640d51e76449ea7760f97d562c10a2daa67ea47 608354 grub-coreboot_1.98~20100128-1.1_amd64.deb
 c00b7c32b97314d5e4f359eb4093f93c46ec96cb898708549db3db49a0b5670c 647850 grub-efi-ia32_1.98~20100128-1.1_amd64.deb
 a0a1d9a0c432aa41c106cc7393f83097bb40635fb2bb561d7b6730d4aef60704 705938 grub-efi-amd64_1.98~20100128-1.1_amd64.deb
 ef69ed5658b0a1deea485d566e8b82180d8ae6290e1c6e410720da41d3f488c4 600862 grub-ieee1275_1.98~20100128-1.1_amd64.deb
 94ab4b09e67cb949d10864b4bdde0fa10127d6f2cf53d7f2936155d190c3f16b 577996 grub-firmware-qemu_1.98~20100128-1.1_amd64.deb
Files: 
 68b9ca9e4efc8a5bcf7b67f2b3a6a257 1813 admin extra grub2_1.98~20100128-1.1.dsc
 6d4a54e42ef35d66c34395426f29ec00 285534 admin extra grub2_1.98~20100128-1.1.diff.gz
 7b8e23406617485c20ac2a946cd3d0a4 232422 admin extra grub2_1.98~20100128-1.1_amd64.deb
 4de05da26cfafd805e6d87bc48d2e344 231204 admin extra grub-linuxbios_1.98~20100128-1.1_amd64.deb
 cbdca9140471b18ef155ce341aaa9b24 231212 admin extra grub-efi_1.98~20100128-1.1_amd64.deb
 effe6d15dc9f6af2c54451a41c9629d8 1175828 admin extra grub-common_1.98~20100128-1.1_amd64.deb
 10de9f2eaaf92f78895837f6cb66f951 750578 admin extra grub-emu_1.98~20100128-1.1_amd64.deb
 4f025d92f3d06585b9741bfe0ae4fba9 817098 admin extra grub-pc_1.98~20100128-1.1_amd64.deb
 58782a3cbca3fd656a3125484b72c1a4 231984 admin extra grub-rescue-pc_1.98~20100128-1.1_amd64.deb
 18d30f5fbf6769df219f8093334d47c1 608354 admin extra grub-coreboot_1.98~20100128-1.1_amd64.deb
 7f9d8efd2c3fac412ef388e8cb310c79 647850 admin extra grub-efi-ia32_1.98~20100128-1.1_amd64.deb
 273fa443774c6868612ac12d37b5c4cd 705938 admin extra grub-efi-amd64_1.98~20100128-1.1_amd64.deb
 2976501268d49ff4698ce3f74fb5e13a 600862 admin extra grub-ieee1275_1.98~20100128-1.1_amd64.deb
 0dd000579f2edd45bd983ea120dcde6b 577996 admin extra grub-firmware-qemu_1.98~20100128-1.1_amd64.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iD8DBQFLcIPZdQgHtVUb5EcRAiKXAJ9OqZKmA9UuNISC/d6vj7svrhFhzwCeMuQ1
FZPc3jNqILaoyJv2yDfTJvY=
=UBxW
-----END PGP SIGNATURE-----





Reply sent to Torsten Landschoff <torsten@debian.org>:
You have taken responsibility. (Mon, 08 Feb 2010 22:21:18 GMT) (full text, mbox, link).


Notification sent to Paul Menzel <pm.debian@googlemail.com>:
Bug acknowledged by developer. (Mon, 08 Feb 2010 22:21:18 GMT) (full text, mbox, link).


Forcibly Merged 567618 567637 568777. Request was from Lisandro Damián Nicanor Pérez Meyer <perezmeyer@uns.edu.ar> to control@bugs.debian.org. (Tue, 09 Feb 2010 13:39:03 GMT) (full text, mbox, link).


Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Wed, 10 Mar 2010 07:29:08 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sat Jan 13 18:52:43 2018; Machine Name: buxtehude

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.