Bug#610071: grub-pc postinst loops when running non-interactive with multiple devices

Arne Nordmark nordmark at mech.kth.se
Sat Jan 15 09:19:01 UTC 2011


Package: grub-pc
Version: 1.98+20100804-13
Severity: normal

Because of #601141,
grub-pc postinst will always ask for devices to install, when
installed on multiple devices. When doing non-intercative parallel
upgrades (in my case using pdsh), this casuses the upgrade process to
stop at that point. However, when the connection is broken, the
postinst goes into an infinite loop instead of terminating. Example:
init(1)-+-aptitude(19983)-+-dpkg(20327)---frontend(25206)---grub-pc.postins(25226)---grub-pc.postins(10661)-+-grub-pc.postins(10662+
        |                 |                                                                                 `-sort(10663)
        |                 `-{aptitude}(19984)


The top level grub-pc,postinst repeatedly forks new processes, leading
to high load and a need to manually clean these processes on every
computer.

Arne

  -- Package-specific info:

*********************** BEGIN /proc/mounts
/dev/mapper/all-root / ext4 rw,relatime,errors=remount-ro,barrier=1,data=ordered 0 0
/dev/mapper/all-cache /var/cache/openafs ext4 rw,relatime,barrier=1,data=ordered 0 0
*********************** END /proc/mounts

*********************** BEGIN /boot/grub/device.map
(hd0)	/dev/disk/by-id/ata-ST380815AS_6RACVTL9
(hd1)	/dev/disk/by-id/ata-ST380815AS_6RACZGS1
(hd2)	/dev/disk/by-id/ata-ST3400620NS_9QG462BX
(hd3)	/dev/disk/by-id/ata-ST3400620NS_9QH09QTE
*********************** 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 raid
insmod mdraid
insmod lvm
insmod part_gpt
insmod part_gpt
insmod ext2
set root='(all-root)'
search --no-floppy --fs-uuid --set 137d0a64-7dc8-4d37-bf62-01f5a235c309
if loadfont /usr/share/grub/unicode.pf2 ; then
  set gfxmode=1024x768
  load_video
  insmod gfxterm
fi
terminal_output gfxterm
insmod raid
insmod mdraid
insmod lvm
insmod part_gpt
insmod part_gpt
insmod ext2
set root='(all-root)'
search --no-floppy --fs-uuid --set 137d0a64-7dc8-4d37-bf62-01f5a235c309
set locale_dir=($root)/boot/grub/locale
set lang=sv
insmod gettext
set timeout=5
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
insmod raid
insmod mdraid
insmod lvm
insmod part_gpt
insmod part_gpt
insmod ext2
set root='(all-root)'
search --no-floppy --fs-uuid --set 137d0a64-7dc8-4d37-bf62-01f5a235c309
insmod png
if background_image /usr/share/images/desktop-base/spacefun-grub.png; then
  set color_normal=light-gray/black
  set color_highlight=white/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.32-5-amd64' --class debian --class gnu-linux --class gnu --class os {
	insmod raid
	insmod mdraid
	insmod lvm
	insmod part_gpt
	insmod part_gpt
	insmod ext2
	set root='(all-root)'
	search --no-floppy --fs-uuid --set 137d0a64-7dc8-4d37-bf62-01f5a235c309
	echo	'Loading Linux 2.6.32-5-amd64 ...'
	linux	/boot/vmlinuz-2.6.32-5-amd64 root=/dev/mapper/all-root ro enable_mtrr_cleanup quiet
	echo	'Loading initial ramdisk ...'
	initrd	/boot/initrd.img-2.6.32-5-amd64
}
menuentry 'Debian GNU/Linux, with Linux 2.6.32-5-amd64 (recovery mode)' --class debian --class gnu-linux --class gnu --class os {
	insmod raid
	insmod mdraid
	insmod lvm
	insmod part_gpt
	insmod part_gpt
	insmod ext2
	set root='(all-root)'
	search --no-floppy --fs-uuid --set 137d0a64-7dc8-4d37-bf62-01f5a235c309
	echo	'Loading Linux 2.6.32-5-amd64 ...'
	linux	/boot/vmlinuz-2.6.32-5-amd64 root=/dev/mapper/all-root ro single enable_mtrr_cleanup
	echo	'Loading initial ramdisk ...'
	initrd	/boot/initrd.img-2.6.32-5-amd64
}
### 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 raid
	insmod mdraid
	insmod lvm
	insmod part_gpt
	insmod part_gpt
	insmod ext2
	set root='(all-root)'
	search --no-floppy --fs-uuid --set 137d0a64-7dc8-4d37-bf62-01f5a235c309
	linux16	/boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
	insmod raid
	insmod mdraid
	insmod lvm
	insmod part_gpt
	insmod part_gpt
	insmod ext2
	set root='(all-root)'
	search --no-floppy --fs-uuid --set 137d0a64-7dc8-4d37-bf62-01f5a235c309
	linux16	/boot/memtest86+.bin console=ttyS0,115200n8
}
menuentry "Memory test (memtest86+, experimental multiboot)" {
	insmod raid
	insmod mdraid
	insmod lvm
	insmod part_gpt
	insmod part_gpt
	insmod ext2
	set root='(all-root)'
	search --no-floppy --fs-uuid --set 137d0a64-7dc8-4d37-bf62-01f5a235c309
	multiboot	/boot/memtest86+_multiboot.bin
}
menuentry "Memory test (memtest86+, serial console 115200, experimental multiboot)" {
	insmod raid
	insmod mdraid
	insmod lvm
	insmod part_gpt
	insmod part_gpt
	insmod ext2
	set root='(all-root)'
	search --no-floppy --fs-uuid --set 137d0a64-7dc8-4d37-bf62-01f5a235c309
	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 ###
# 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

-- System Information:
Debian Release: 6.0
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-5-amd64 (SMP w/4 CPU cores)
Locale: LANG=sv_SE.UTF-8, LC_CTYPE=sv_SE.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.36           Debian configuration management sy
ii  grub-common             1.98+20100804-13 GRand Unified Bootloader, version 
ii  libc6                   2.11.2-7         Embedded GNU C Library: Shared lib
ii  libdevmapper1.02.1      2:1.02.48-4      The Linux Kernel Device Mapper use
ii  ucf                     3.0025+nmu1      Update Configuration File: preserv

grub-pc recommends no packages.

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

-- Configuration Files:
/etc/default/grub changed:
GRUB_DEFAULT=0
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet"
GRUB_CMDLINE_LINUX="enable_mtrr_cleanup"
GRUB_GFXMODE=1024x768


-- debconf information:
  grub2/kfreebsd_cmdline:
* grub2/device_map_regenerated:
  grub-pc/linux_cmdline: fillme
* grub2/linux_cmdline: enable_mtrr_cleanup
  grub-pc/install_devices_empty: true
  grub-pc/install_devices_failed: false
  grub-pc/chainload_from_menu.lst: true
  grub-pc/kopt_extracted: false
* grub-pc/install_devices: /dev/disk/by-id/ata-ST380815AS_6RACVTL9, /dev/disk/by-id/ata-ST380815AS_6RACZGS1
  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: /dev/disk/by-id/ata-ST380815AS_6RACVTL9, /dev/disk/by-id/ata-ST380815AS_6RACZGS1
* grub2/linux_cmdline_default: quiet
  grub-pc/mixed_legacy_and_grub2: true





More information about the Pkg-grub-devel mailing list