Bug#720032: grub-probe misdetects filesystem and UUID

Erich Schubert erich at debian.org
Sat Aug 17 20:40:17 UTC 2013


Package: grub-pc
Version: 2.00-17
Severity: important

Grub since version 2.00 is unable to boot (goes to resuce prompt only).
Downgrading to 1.99-27+deb7u1 resolves the problem, so this is a regression.

I've noticed that grub seems to misdetect the filesystem and UUID:
It reports the UUID as 07D6-0A0F, and detects it as "fat":

-- grub-probe -vv
... trying various fs, but not ext2/3/4 yet ...
grub-core/kern/fs.c:55: Detecting fat...
07D6-0A0F
--

I believe this bug is another instance of #505137
but I have no idea why this wasn't a problem before.
Maybe grub previously was running the ext2/3/4 test before FAT?

hexdump -Cn 512 /dev/sda1
--
00000000  eb 63 90 00 65 6c 6c 20  38 2e 30 00 02 04 01 00  |.c..ell 8.0.....|
00000010  02 00 02 00 00 f8 5e 00  3f 00 ff 00 3f 00 00 00  |......^.?...?...|
00000020  47 78 01 00 80 00 29 0f  0a d6 07 44 65 6c 6c 55  |Gx....)....DellU|
00000030  74 69 6c 69 74 79 00 41  54 31 36 20 20 20 00 00  |tility.AT16   ..|
00000040  00 00 00 00 00 00 00 00  00 00 00 30 33 c0 8e d0  |...........03...|
00000050  bc 00 07 fc b9 80 00 8e  d8 be 00 80 1d 0d 02 00  |................|
00000060  00 00 00 00 ff fa 90 90  f6 c2 80 74 05 f6 c2 70  |...........t...p|
00000070  74 02 b2 80 ea 79 7c 00  00 31 c0 8e d8 8e d0 bc  |t....y|..1......|
00000080  00 20 fb a0 64 7c 3c ff  74 02 88 c2 52 be 80 7d  |. ..d|<.t...R..}|
00000090  e8 17 01 be 05 7c b4 41  bb aa 55 cd 13 5a 52 72  |.....|.A..U..ZRr|
000000a0  3d 81 fb 55 aa 75 37 83  e1 01 74 32 31 c0 89 44  |=..U.u7...t21..D|
000000b0  04 40 88 44 ff 89 44 02  c7 04 10 00 66 8b 1e 5c  |. at .D..D.....f..\|
000000c0  7c 66 89 5c 08 66 8b 1e  60 7c 66 89 5c 0c c7 44  ||f.\.f..`|f.\..D|
000000d0  06 00 70 b4 42 cd 13 72  05 bb 00 70 eb 76 b4 08  |..p.B..r...p.v..|
000000e0  cd 13 73 0d f6 c2 80 0f  84 d8 00 be 8b 7d e9 82  |..s..........}..|
000000f0  00 66 0f b6 c6 88 64 ff  40 66 89 44 04 0f b6 d1  |.f....d. at f.D....|
00000100  c1 e2 02 88 e8 88 f4 40  89 44 08 0f b6 c2 c0 e8  |....... at .D......|
00000110  02 66 89 04 66 a1 60 7c  66 09 c0 75 4e 66 a1 5c  |.f..f.`|f..uNf.\|
00000120  7c 66 31 d2 66 f7 34 88  d1 31 d2 66 f7 74 04 3b  ||f1.f.4..1.f.t.;|
00000130  44 08 7d 37 fe c1 88 c5  30 c0 c1 e8 02 08 c1 88  |D.}7....0.......|
00000140  d0 5a 88 c6 bb 00 70 8e  c3 31 db b8 01 02 cd 13  |.Z....p..1......|
00000150  72 1e 8c c3 60 1e b9 00  01 8e db 31 f6 bf 00 80  |r...`......1....|
00000160  8e c6 fc f3 a5 1f 61 ff  26 5a 7c be 86 7d eb 03  |......a.&Z|..}..|
00000170  be 95 7d e8 34 00 be 9a  7d e8 2e 00 cd 18 eb fe  |..}.4...}.......|
00000180  47 52 55 42 20 00 47 65  6f 6d 00 48 61 72 64 20  |GRUB .Geom.Hard |
00000190  44 69 73 6b 00 52 65 61  64 00 20 45 72 72 6f 72  |Disk.Read. Error|
000001a0  0d 0a 00 bb 01 00 b4 0e  cd 10 ac 3c 00 75 f4 c3  |...........<.u..|
000001b0  00 00 00 00 00 00 00 00  00 c4 1e 48 00 cd 13 72  |...........H...r|
000001c0  a1 66 ff 06 3e 00 81 06  48 00 00 02 75 06 81 06  |.f..>...H...u...|
000001d0  4a 00 00 10 c3 44 69 73  6b 20 65 72 72 6f 72 00  |J....Disk error.|
000001e0  4e 6f 20 6c 6f 61 64 65  72 00 44 45 4c 4c 42 49  |No loader.DELLBI|
000001f0  4f 20 42 49 4e 00 00 00  00 00 00 00 00 00 55 aa  |O BIN.........U.|
00000200
--

As you can see, there is some data remaining from the original Dell restore
partition that wasn't properly reset (it is a valid ext2 filesystem though)
The laptop was installed a long time ago (2004?) so I don't remember the
exact details of how I installed Debian then.

Reformatting the partition zeroed out the sector and fixes the detection.
I havn't rebooted yet, so I don't know if this resolved the overall problem
(non-bootable system). For reference, I kept a partition image, if more
information is needed / useful than above sector dump.

-- Package-specific info:

*********************** WARNING grub-setup left core.img in filesystem

*********************** BEGIN /proc/mounts
/dev/mapper/cryptroot / ext3 rw,noatime,errors=remount-ro,barrier=1,data=ordered 0 0
/dev/sda1 /boot ext2 rw,noatime,errors=continue 0 0
*********************** END /proc/mounts

*********************** BEGIN /boot/grub/device.map
(hd0)	/dev/disk/by-id/ata-Hitachi_HTS721060G9SA00_MPCCN8Y3H28ZGL
(hd1)	/dev/disk/by-id/usb-Generic_Flash_Disk_17033EBC-0:0
*********************** END /boot/grub/device.map

*********************** BEGIN /boot/grub/grub.cfg
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by 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 [ x"${feature_menuentry_id}" = xy ]; then
  menuentry_id_option="--id"
else
  menuentry_id_option=""
fi

export menuentry_id_option

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
}

function load_video {
  if [ x$feature_all_video_module = xy ]; then
    insmod all_video
  else
    insmod efi_gop
    insmod efi_uga
    insmod ieee1275_fb
    insmod vbe
    insmod vga
    insmod video_bochs
    insmod video_cirrus
  fi
}

if [ x$feature_default_font_path = xy ] ; then
   font=unicode
else
insmod part_msdos
insmod fat
set root='hd0,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint='hd0,msdos1'  07D6-0A0F
else
  search --no-floppy --fs-uuid --set=root 07D6-0A0F
fi
    font="/grub/unicode.pf2"
fi

if loadfont $font ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
  set locale_dir=$prefix/locale
  set lang=de_DE
  insmod gettext
fi
terminal_output gfxterm
set timeout=5
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
insmod part_msdos
insmod fat
set root='hd0,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint='hd0,msdos1'  07D6-0A0F
else
  search --no-floppy --fs-uuid --set=root 07D6-0A0F
fi
insmod png
if background_image /grub/.background_cache.png; then
  set color_normal=white/black
  set color_highlight=black/white
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' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-9d4d069c-cff2-4568-bcbd-5b0a187b1dda' {
	load_video
	insmod gzio
	insmod part_msdos
	insmod fat
	set root='hd0,msdos1'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint='hd0,msdos1'  07D6-0A0F
	else
	  search --no-floppy --fs-uuid --set=root 07D6-0A0F
	fi
	echo	'Linux 3.10-2-686-pae wird geladen …'
	linux	/vmlinuz-3.10-2-686-pae root=UUID=9d4d069c-cff2-4568-bcbd-5b0a187b1dda ro  quiet
	echo	'Initiale Ramdisk wird geladen …'
	initrd	/initrd.img-3.10-2-686-pae
}
submenu 'Erweiterte Optionen für Debian GNU/Linux' $menuentry_id_option 'gnulinux-advanced-9d4d069c-cff2-4568-bcbd-5b0a187b1dda' {
	menuentry 'Debian GNU/Linux, mit Linux 3.10-2-686-pae' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.10-2-686-pae-advanced-9d4d069c-cff2-4568-bcbd-5b0a187b1dda' {
		load_video
		insmod gzio
		insmod part_msdos
		insmod fat
		set root='hd0,msdos1'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint='hd0,msdos1'  07D6-0A0F
		else
		  search --no-floppy --fs-uuid --set=root 07D6-0A0F
		fi
		echo	'Linux 3.10-2-686-pae wird geladen …'
		linux	/vmlinuz-3.10-2-686-pae root=UUID=9d4d069c-cff2-4568-bcbd-5b0a187b1dda ro  quiet
		echo	'Initiale Ramdisk wird geladen …'
		initrd	/initrd.img-3.10-2-686-pae
	}
	menuentry 'Debian GNU/Linux, mit Linux 3.10-2-686-pae (Wiederherstellungsmodus)' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.10-2-686-pae-recovery-9d4d069c-cff2-4568-bcbd-5b0a187b1dda' {
		load_video
		insmod gzio
		insmod part_msdos
		insmod fat
		set root='hd0,msdos1'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint='hd0,msdos1'  07D6-0A0F
		else
		  search --no-floppy --fs-uuid --set=root 07D6-0A0F
		fi
		echo	'Linux 3.10-2-686-pae wird geladen …'
		linux	/vmlinuz-3.10-2-686-pae root=UUID=9d4d069c-cff2-4568-bcbd-5b0a187b1dda ro single 
		echo	'Initiale Ramdisk wird geladen …'
		initrd	/initrd.img-3.10-2-686-pae
	}
	menuentry 'Debian GNU/Linux, mit Linux 3.10-1-686-pae' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.10-1-686-pae-advanced-9d4d069c-cff2-4568-bcbd-5b0a187b1dda' {
		load_video
		insmod gzio
		insmod part_msdos
		insmod fat
		set root='hd0,msdos1'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint='hd0,msdos1'  07D6-0A0F
		else
		  search --no-floppy --fs-uuid --set=root 07D6-0A0F
		fi
		echo	'Linux 3.10-1-686-pae wird geladen …'
		linux	/vmlinuz-3.10-1-686-pae root=UUID=9d4d069c-cff2-4568-bcbd-5b0a187b1dda ro  quiet
		echo	'Initiale Ramdisk wird geladen …'
		initrd	/initrd.img-3.10-1-686-pae
	}
	menuentry 'Debian GNU/Linux, mit Linux 3.10-1-686-pae (Wiederherstellungsmodus)' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.10-1-686-pae-recovery-9d4d069c-cff2-4568-bcbd-5b0a187b1dda' {
		load_video
		insmod gzio
		insmod part_msdos
		insmod fat
		set root='hd0,msdos1'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint='hd0,msdos1'  07D6-0A0F
		else
		  search --no-floppy --fs-uuid --set=root 07D6-0A0F
		fi
		echo	'Linux 3.10-1-686-pae wird geladen …'
		linux	/vmlinuz-3.10-1-686-pae root=UUID=9d4d069c-cff2-4568-bcbd-5b0a187b1dda ro single 
		echo	'Initiale Ramdisk wird geladen …'
		initrd	/initrd.img-3.10-1-686-pae
	}
}

### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###

### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
	insmod part_msdos
	insmod fat
	set root='hd0,msdos1'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint='hd0,msdos1'  07D6-0A0F
	else
	  search --no-floppy --fs-uuid --set=root 07D6-0A0F
	fi
	linux16	/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
	insmod part_msdos
	insmod fat
	set root='hd0,msdos1'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint='hd0,msdos1'  07D6-0A0F
	else
	  search --no-floppy --fs-uuid --set=root 07D6-0A0F
	fi
	linux16	/memtest86+.bin console=ttyS0,115200n8
}
menuentry "Memory test (memtest86+, experimental multiboot)" {
	insmod part_msdos
	insmod fat
	set root='hd0,msdos1'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint='hd0,msdos1'  07D6-0A0F
	else
	  search --no-floppy --fs-uuid --set=root 07D6-0A0F
	fi
	multiboot	/memtest86+_multiboot.bin
}
menuentry "Memory test (memtest86+, serial console 115200, experimental multiboot)" {
	insmod part_msdos
	insmod fat
	set root='hd0,msdos1'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint='hd0,msdos1'  07D6-0A0F
	else
	  search --no-floppy --fs-uuid --set=root 07D6-0A0F
	fi
	multiboot	/memtest86+_multiboot.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

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

### BEGIN /etc/grub.d/30_uefi-firmware ###
### END /etc/grub.d/30_uefi-firmware ###

### 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 ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f  ${config_directory}/custom.cfg ]; then
  source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
*********************** END /boot/grub/grub.cfg

*********************** BEGIN /proc/mdstat
cat: /proc/mdstat: No such file or directory
*********************** END /proc/mdstat

*********************** BEGIN /dev/disk/by-id
total 0
lrwxrwxrwx 1 root root  9 Aug 17 21:34 ata-HL-DT-STCD-RW_DVD-ROM_GCC-4244N -> ../../sr0
lrwxrwxrwx 1 root root  9 Aug 17 22:06 ata-Hitachi_HTS721060G9SA00_MPCCN8Y3H28ZGL -> ../../sda
lrwxrwxrwx 1 root root 10 Aug 17 21:59 ata-Hitachi_HTS721060G9SA00_MPCCN8Y3H28ZGL-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 Aug 17 21:34 ata-Hitachi_HTS721060G9SA00_MPCCN8Y3H28ZGL-part2 -> ../../sda2
lrwxrwxrwx 1 root root 10 Aug 17 21:34 ata-Hitachi_HTS721060G9SA00_MPCCN8Y3H28ZGL-part3 -> ../../sda3
lrwxrwxrwx 1 root root 10 Aug 17 21:34 dm-name-cryptroot -> ../../dm-0
lrwxrwxrwx 1 root root 10 Aug 17 21:34 dm-name-cryptswap -> ../../dm-1
lrwxrwxrwx 1 root root 10 Aug 17 21:34 dm-uuid-CRYPT-LUKS1-6731f2b9b054446eac0c471f5b07c939-cryptroot -> ../../dm-0
lrwxrwxrwx 1 root root 10 Aug 17 21:34 dm-uuid-CRYPT-PLAIN-cryptswap -> ../../dm-1
lrwxrwxrwx 1 root root  9 Aug 17 22:06 scsi-SATA_Hitachi_HTS72106_MPCCN8Y3H28ZGL -> ../../sda
lrwxrwxrwx 1 root root 10 Aug 17 21:59 scsi-SATA_Hitachi_HTS72106_MPCCN8Y3H28ZGL-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 Aug 17 21:34 scsi-SATA_Hitachi_HTS72106_MPCCN8Y3H28ZGL-part2 -> ../../sda2
lrwxrwxrwx 1 root root 10 Aug 17 21:34 scsi-SATA_Hitachi_HTS72106_MPCCN8Y3H28ZGL-part3 -> ../../sda3
*********************** END /dev/disk/by-id

*********************** BEGIN /dev/disk/by-uuid
total 0
lrwxrwxrwx 1 root root 10 Aug 17 21:34 4b3f176e-2485-447f-90d5-20dfb7e1c2d2 -> ../../dm-1
lrwxrwxrwx 1 root root 10 Aug 17 21:34 6731f2b9-b054-446e-ac0c-471f5b07c939 -> ../../sda2
lrwxrwxrwx 1 root root 10 Aug 17 21:34 9d4d069c-cff2-4568-bcbd-5b0a187b1dda -> ../../dm-0
*********************** END /dev/disk/by-uuid

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

Kernel: Linux 3.10-2-686-pae (SMP w/2 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.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.50
ii  grub-common            2.00-17
ii  grub-pc-bin            2.00-17
ii  grub2-common           2.00-17
ii  ucf                    3.0027+nmu1

grub-pc recommends no packages.

grub-pc suggests no packages.

-- debconf information:
  grub2/kfreebsd_cmdline:
  grub2/device_map_regenerated:
* grub2/linux_cmdline:
  grub-pc/install_devices_empty: false
* grub-pc/install_devices_failed: true
  grub-pc/chainload_from_menu.lst: true
  grub-pc/kopt_extracted: false
* grub-pc/install_devices: /dev/disk/by-id/ata-Hitachi_HTS721060G9SA00_MPCCN8Y3H28ZGL, /dev/disk/by-id/ata-Hitachi_HTS721060G9SA00_MPCCN8Y3H28ZGL-part1
  grub-pc/postrm_purge_boot_grub: false
  grub-pc/install_devices_failed_upgrade: true
  grub-pc/disk_description:
  grub2/kfreebsd_cmdline_default: quiet
  grub-pc/partition_description:
  grub-pc/install_devices_disks_changed:
* grub2/linux_cmdline_default: quiet
  grub-pc/mixed_legacy_and_grub2: true



More information about the Pkg-grub-devel mailing list