Bug#666992: grub-pc: installation into partition broken, postinst script does not detect MBR installation

Norbert Preining preining at logic.at
Tue Apr 3 07:40:26 UTC 2012


Package: grub-pc
Version: 1.99-20
Severity: important

Dear maintainers of grub2

I don't know if it was always like that, but the last update of grub2
failed in the postinst script, because it tried to install into
	/dev/sda3
which was found via
	grub-probe --target=device /boot
Yes, all my linux is in /dev/sda3, all of it. The error message is
# grub-install /dev/sda3
/usr/sbin/grub-setup: warn: Attempting to install GRUB to a partitionless disk or to a partition.  This is a BAD idea..
/usr/sbin/grub-setup: warn: Embedding is not possible.  GRUB can only be installed in this setup by using blocklists.  However, blocklists are UNRELIABLE and their use is discouraged..
/usr/sbin/grub-setup: error: will not proceed with blocklists.
#

I faintly remember that I *have* installed grub into sda3 before, but
that is no proof I assume.

Now, installation into the MBR works without a problem, and I am
anyway running it from the MBR.

So what I see here are two bugs:
* grub is not able to be installed into my /dev/sda3
* postinst is not able to detect that grub is already installed in MBR

Just to let you know

Norbert


-- Package-specific info:

*********************** BEGIN /proc/mounts
/dev/root / ext4 rw,noatime,errors=remount-ro 0 0
/dev/sda2 /xp fuseblk rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096 0 0
/dev/loop0 /media/TL2009 iso9660 ro,relatime 0 0
/dev/loop1 /media/TL2011 iso9660 ro,relatime 0 0
*********************** END /proc/mounts

*********************** BEGIN /boot/grub/device.map
(hd0)	/dev/sda
*********************** 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 [ "${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 {
  insmod vbe
  insmod vga
  insmod video_bochs
  insmod video_cirrus
}

terminal_input console
terminal_output console
set timeout=5
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=cyan/blue
set menu_color_highlight=white/blue
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Debian GNU/Linux, with Linux 3.4.0-rc1+' --class debian --class gnu-linux --class gnu --class os {
	insmod gzio
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos3)'
	search --no-floppy --fs-uuid --set=root 961635f4-762d-4136-a3d5-35fca8e4f3d8
	echo	'Loading Linux 3.4.0-rc1+ ...'
	linux	/boot/vmlinuz-3.4.0-rc1+ root=/dev/sda3 ro rootfstype=ext4 acpi_osi="!Windows 2006" nmi_watchdog=0 
}
menuentry 'Debian GNU/Linux, with Linux 3.4.0-rc1+ (recovery mode)' --class debian --class gnu-linux --class gnu --class os {
	insmod gzio
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos3)'
	search --no-floppy --fs-uuid --set=root 961635f4-762d-4136-a3d5-35fca8e4f3d8
	echo	'Loading Linux 3.4.0-rc1+ ...'
	linux	/boot/vmlinuz-3.4.0-rc1+ root=/dev/sda3 ro single rootfstype=ext4 acpi_osi="!Windows 2006" nmi_watchdog=0
}
menuentry 'Debian GNU/Linux, with Linux 3.3.0+' --class debian --class gnu-linux --class gnu --class os {
	insmod gzio
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos3)'
	search --no-floppy --fs-uuid --set=root 961635f4-762d-4136-a3d5-35fca8e4f3d8
	echo	'Loading Linux 3.3.0+ ...'
	linux	/boot/vmlinuz-3.3.0+ root=/dev/sda3 ro rootfstype=ext4 acpi_osi="!Windows 2006" nmi_watchdog=0 
}
menuentry 'Debian GNU/Linux, with Linux 3.3.0+ (recovery mode)' --class debian --class gnu-linux --class gnu --class os {
	insmod gzio
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos3)'
	search --no-floppy --fs-uuid --set=root 961635f4-762d-4136-a3d5-35fca8e4f3d8
	echo	'Loading Linux 3.3.0+ ...'
	linux	/boot/vmlinuz-3.3.0+ root=/dev/sda3 ro single rootfstype=ext4 acpi_osi="!Windows 2006" nmi_watchdog=0
}
menuentry 'Debian GNU/Linux, with Linux 3.3.0-wl+' --class debian --class gnu-linux --class gnu --class os {
	insmod gzio
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos3)'
	search --no-floppy --fs-uuid --set=root 961635f4-762d-4136-a3d5-35fca8e4f3d8
	echo	'Loading Linux 3.3.0-wl+ ...'
	linux	/boot/vmlinuz-3.3.0-wl+ root=/dev/sda3 ro rootfstype=ext4 acpi_osi="!Windows 2006" nmi_watchdog=0 
}
menuentry 'Debian GNU/Linux, with Linux 3.3.0-wl+ (recovery mode)' --class debian --class gnu-linux --class gnu --class os {
	insmod gzio
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos3)'
	search --no-floppy --fs-uuid --set=root 961635f4-762d-4136-a3d5-35fca8e4f3d8
	echo	'Loading Linux 3.3.0-wl+ ...'
	linux	/boot/vmlinuz-3.3.0-wl+ root=/dev/sda3 ro single rootfstype=ext4 acpi_osi="!Windows 2006" nmi_watchdog=0
}
menuentry 'Debian GNU/Linux, with Linux 3.2.0+' --class debian --class gnu-linux --class gnu --class os {
	insmod gzio
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos3)'
	search --no-floppy --fs-uuid --set=root 961635f4-762d-4136-a3d5-35fca8e4f3d8
	echo	'Loading Linux 3.2.0+ ...'
	linux	/boot/vmlinuz-3.2.0+ root=/dev/sda3 ro rootfstype=ext4 acpi_osi="!Windows 2006" nmi_watchdog=0 
}
menuentry 'Debian GNU/Linux, with Linux 3.2.0+ (recovery mode)' --class debian --class gnu-linux --class gnu --class os {
	insmod gzio
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos3)'
	search --no-floppy --fs-uuid --set=root 961635f4-762d-4136-a3d5-35fca8e4f3d8
	echo	'Loading Linux 3.2.0+ ...'
	linux	/boot/vmlinuz-3.2.0+ root=/dev/sda3 ro single rootfstype=ext4 acpi_osi="!Windows 2006" nmi_watchdog=0
}
menuentry 'Debian GNU/Linux, with Linux 2.6.39+' --class debian --class gnu-linux --class gnu --class os {
	insmod gzio
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos3)'
	search --no-floppy --fs-uuid --set=root 961635f4-762d-4136-a3d5-35fca8e4f3d8
	echo	'Loading Linux 2.6.39+ ...'
	linux	/boot/vmlinuz-2.6.39+ root=/dev/sda3 ro rootfstype=ext4 acpi_osi="!Windows 2006" nmi_watchdog=0 
}
menuentry 'Debian GNU/Linux, with Linux 2.6.39+ (recovery mode)' --class debian --class gnu-linux --class gnu --class os {
	insmod gzio
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos3)'
	search --no-floppy --fs-uuid --set=root 961635f4-762d-4136-a3d5-35fca8e4f3d8
	echo	'Loading Linux 2.6.39+ ...'
	linux	/boot/vmlinuz-2.6.39+ root=/dev/sda3 ro single rootfstype=ext4 acpi_osi="!Windows 2006" nmi_watchdog=0
}
### 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 ext2
	set root='(hd0,msdos3)'
	search --no-floppy --fs-uuid --set=root 961635f4-762d-4136-a3d5-35fca8e4f3d8
	linux16	/boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos3)'
	search --no-floppy --fs-uuid --set=root 961635f4-762d-4136-a3d5-35fca8e4f3d8
	linux16	/boot/memtest86+.bin console=ttyS0,115200n8
}
menuentry "Memory test (memtest86+, experimental multiboot)" {
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos3)'
	search --no-floppy --fs-uuid --set=root 961635f4-762d-4136-a3d5-35fca8e4f3d8
	multiboot	/boot/memtest86+_multiboot.bin
}
menuentry "Memory test (memtest86+, serial console 115200, experimental multiboot)" {
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos3)'
	search --no-floppy --fs-uuid --set=root 961635f4-762d-4136-a3d5-35fca8e4f3d8
	multiboot	/boot/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/40_custom ###

# For booting Microsoft Windows
menuentry "Microsoft Windows 7" {
	set root=(hd0,2)
	drivemap -s (hd0) ${root}
	chainloader +1
}

# 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  $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 Apr  3 13:03 ata-MATSHITADVD-RAM_UJ862AS_HF01_053096 -> ../../sr0
lrwxrwxrwx 1 root root  9 Apr  3 16:30 ata-WDC_WD10JPVT-00A1YT0_WD-WXK1A7154276 -> ../../sda
lrwxrwxrwx 1 root root 10 Apr  3 13:03 ata-WDC_WD10JPVT-00A1YT0_WD-WXK1A7154276-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 Apr  3 13:03 ata-WDC_WD10JPVT-00A1YT0_WD-WXK1A7154276-part2 -> ../../sda2
lrwxrwxrwx 1 root root 10 Apr  3 13:03 ata-WDC_WD10JPVT-00A1YT0_WD-WXK1A7154276-part3 -> ../../sda3
lrwxrwxrwx 1 root root 10 Apr  3 13:03 ata-WDC_WD10JPVT-00A1YT0_WD-WXK1A7154276-part4 -> ../../sda4
lrwxrwxrwx 1 root root  9 Apr  3 16:30 scsi-SATA_WDC_WD10JPVT-00_WD-WXK1A7154276 -> ../../sda
lrwxrwxrwx 1 root root 10 Apr  3 13:03 scsi-SATA_WDC_WD10JPVT-00_WD-WXK1A7154276-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 Apr  3 13:03 scsi-SATA_WDC_WD10JPVT-00_WD-WXK1A7154276-part2 -> ../../sda2
lrwxrwxrwx 1 root root 10 Apr  3 13:03 scsi-SATA_WDC_WD10JPVT-00_WD-WXK1A7154276-part3 -> ../../sda3
lrwxrwxrwx 1 root root 10 Apr  3 13:03 scsi-SATA_WDC_WD10JPVT-00_WD-WXK1A7154276-part4 -> ../../sda4
lrwxrwxrwx 1 root root  9 Apr  3 16:30 wwn-0x50014ee656ef437f -> ../../sda
lrwxrwxrwx 1 root root 10 Apr  3 13:03 wwn-0x50014ee656ef437f-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 Apr  3 13:03 wwn-0x50014ee656ef437f-part2 -> ../../sda2
lrwxrwxrwx 1 root root 10 Apr  3 13:03 wwn-0x50014ee656ef437f-part3 -> ../../sda3
lrwxrwxrwx 1 root root 10 Apr  3 13:03 wwn-0x50014ee656ef437f-part4 -> ../../sda4
*********************** END /dev/disk/by-id

*********************** BEGIN /dev/disk/by-uuid
total 0
lrwxrwxrwx 1 root root 10 Apr  3 13:03 04722AAB722AA182 -> ../../sda2
lrwxrwxrwx 1 root root 10 Apr  3 13:03 4f28b77d-a040-4455-96d6-acebbfaef8d3 -> ../../sda4
lrwxrwxrwx 1 root root 10 Apr  3 13:03 961635f4-762d-4136-a3d5-35fca8e4f3d8 -> ../../sda3
*********************** END /dev/disk/by-uuid

-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (499, 'unstable'), (101, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 3.4.0-rc1+ (SMP w/2 CPU cores; PREEMPT)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages grub-pc depends on:
ii  debconf [debconf-2.0]  1.5.42
ii  grub-common            1.99-20
ii  grub-pc-bin            1.99-20
ii  grub2-common           1.99-20
ii  ucf                    3.0025+nmu2

grub-pc recommends no packages.

grub-pc suggests no packages.

-- debconf information:
  grub2/kfreebsd_cmdline:
  grub2/device_map_regenerated:
  grub2/linux_cmdline: rootfstype=ext4 acpi_osi="!Windows 2006" nmi_watchdog=0
* grub-pc/install_devices_failed: true
  grub-pc/chainload_from_menu.lst: true
  grub-pc/kopt_extracted: false
  grub-pc/postrm_purge_boot_grub: false
  grub-pc/disk_description:
  grub2/kfreebsd_cmdline_default: quiet
  grub2/linux_cmdline_default:
  grub-pc/install_devices_empty: false
* grub-pc/install_devices: /dev/disk/by-id/ata-WDC_WD10JPVT-00A1YT0_WD-WXK1A7154276, /dev/disk/by-id/ata-WDC_WD10JPVT-00A1YT0_WD-WXK1A7154276-part3
  grub-pc/install_devices_failed_upgrade: true
  grub-pc/partition_description:
  grub-pc/install_devices_disks_changed:
  grub-pc/mixed_legacy_and_grub2: true





More information about the Pkg-grub-devel mailing list