Bug#602682: grub-pc: on upgrade, endless loop of debconf dialogs (GRUB failed to install to the following devices)

2010-11-07 Thread Jonathan Nieder
Package: grub-pc
Version: 1.98+20100804-8
Severity: grave

Hi,

Happy grub-pc user.  But today's upgrade is not going so well:

1. I get a debconf dialog saying

GRUB failed to install to the following devices:

/dev/sda

Do you want to continue anyway?  If you do, your computer may
not start up properly.

The answer is no, obviously.  Why would I want my computer not to
start up properly?

2. I get a peek at the console.

Setting up grub-pc (1.98+20100804-8) ...
sed: -e expression #1, char 1: unknown command: `�
sed: -e expression #1, char 1: unknown command: `�
sed: -e expression #1, char 1: unknown command: `'
sed: -e expression #1, char 1: unknown command: `�
sed: -e expression #1, char 1: unknown command: `�
sed: -e expression #1, char 1: unknown command: `'
sed: -e expression #1, char 1: unknown command: `�
sed: -e expression #1, char 1: unknown command: `�
sed: -e expression #1, char 1: unknown command: `'
/usr/sbin/: Not found.

3. Another debconf dialog.

The grub-pc package is being upgraded.  This menu allows you
to select which devices you'd like grub-install to be
automatically run for, if any.

My choices are /dev/sda and /dev/dm-0.  I choose /dev/sda, of course.

4. Go back to step 1.

Downgrading to 1.98+20100804-7 does not help, even though
1.98+20100804-7 was working fine before.

Ideas?

*** BEGIN /proc/mounts
/dev/mapper/data-rootfs / ext4 
rw,relatime,errors=remount-ro,barrier=1,data=ordered 0 0
/dev/mapper/data-home /home ext4 rw,noatime,barrier=1,data=ordered 0 0
/dev/mapper/data-usr /usr ext4 rw,relatime,barrier=1,data=ordered 0 0
/dev/mapper/data-var /var ext4 rw,noatime,barrier=1,data=ordered 0 0
*** END /proc/mounts

*** BEGIN /boot/grub/device.map
(hd0)   /dev/disk/by-id/ata-HTS548080M9AT00_MRL402L4JN7TDB
*** 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
}

insmod lvm
insmod part_msdos
insmod ext2
set root='(data-usr)'
search --no-floppy --fs-uuid --set 195eaf1e-61ba-45ba-99e0-0b1f39823af1
if loadfont /share/grub/unicode.pf2 ; then
  set gfxmode=640x480
  load_video
  insmod gfxterm
fi
terminal_output gfxterm
insmod lvm
insmod part_msdos
insmod ext2
set root='(data-rootfs)'
search --no-floppy --fs-uuid --set cc444533-9179-4473-91ca-b5ee2543cb26
set locale_dir=($root)/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 lvm
insmod part_msdos
insmod ext2
set root='(data-rootfs)'
search --no-floppy --fs-uuid --set cc444533-9179-4473-91ca-b5ee2543cb26
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.36-rc6-686' --class debian --class 
gnu-linux --class gnu --class os {
insmod lvm
insmod part_msdos
insmod ext2
set root='(data-rootfs)'
search --no-floppy --fs-uuid --set cc444533-9179-4473-91ca-b5ee2543cb26
echo'Loading Linux 2.6.36-rc6-686 ...'
linux   /boot/vmlinuz-2.6.36-rc6-686 root=/dev/mapper/data-rootfs ro  
quiet
echo'Loading initial ramdisk ...'
initrd  /boot/initrd.img-2.6.36-rc6-686
}
menuentry 'Debian GNU/Linux, with Linux 2.6.36-rc6-686 (recovery mode)' --class 
debian --class gnu-linux --class gnu --class os {
insmod lvm
insmod part_msdos
insmod ext2
set root='(data-rootfs)'
search --no-floppy --fs-uuid --set cc444533-9179-4473-91ca-b5ee2543cb26
echo'Loading Linux 2.6.36-rc6-686 ...'
linux   /boot/vmlinuz-2.6.36-rc6-686 root=/dev/mapper/data-rootfs ro 
single 
echo'Loading initial ramdisk ...'
initrd  /boot/initrd.img-2.6.36-rc6-686
}
### END /etc/grub.d/10_linux ###

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

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

### BEGIN /etc/grub.d/30_otheros ###

# This entry automatically added by the Debian installer for an existing
# linux installation on /dev/sda1.

Bug#602682: grub-pc: on upgrade, endless loop of debconf dialogs (GRUB failed to install to the following devices)

2010-11-07 Thread Jonathan Nieder
severity 602682 normal
retitle 602682 grub-pc: postinst should cope better with broken update-grub
quit

Jonathan Nieder wrote:

 Setting up grub-pc (1.98+20100804-8) ...
 sed: -e expression #1, char 1: unknown command: `�

My mistake.  dash trouble with a development snapshot; downgrading
to dash from sid (0.5.5.1-7.2) fixes it.

Still, is this infinite loop for failing update-grub intentional?
if there is anything I can do to help the error handling, please let
me know.

Thanks,
Jonathan



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org