Bug#601141: grub-pc: install_devices check always fails with multiple devices

Jeff DeFouw jeffd at i2k.com
Sat Oct 23 18:32:25 UTC 2010


Package: grub-pc
Version: 1.98+20100804-6
Severity: normal
Tags: patch


Multiple install devices are stored with comma separators.  When the 
postinst script checks for the existence of each device, it does not 
remove the commas, so it will always fail.  Every upgrade asks again for 
install devices because the test thinks they're missing.  Another 
section of postinst removes the commas with sed, so I copied that in the 
included patch.

-- Package-specific info:

*********************** BEGIN /proc/mounts
/dev/mapper/root-root / ext3 rw,relatime,errors=remount-ro,data=writeback 0 0
/dev/md0 /boot ext3 rw,noatime,errors=continue,data=ordered 0 0
*********************** END /proc/mounts

*********************** BEGIN /boot/grub/device.map
(hd0)	/dev/disk/by-id/ata-WDC_WD5001ABYS-01YNA0_WD-WCAS87478871
(hd1)	/dev/disk/by-id/ata-WDC_WD5001ABYS-01YNA0_WD-WCAS87644777
(hd2)	/dev/disk/by-id/ata-WDC_WD5001ABYS-01YNA0_WD-WCAS87724489
*********************** END /boot/grub/device.map

*** /tmp/remove-commas-from-dev-list.patch
--- a/grub-pc.postinst	2010-10-23 13:34:51.000000000 -0400
+++ b/grub-pc.postinst	2010-10-23 13:35:39.000000000 -0400
@@ -434,7 +434,7 @@
           else
             db_get grub-pc/install_devices
             valid=1
-            for device in $RET; do
+            for device in `echo $RET | sed -e 's/,/ /g'` ; do
               if [ ! -e "$device" ]; then
                 valid=0
                 break


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

Kernel: Linux 2.6.32-5-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/bash

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-6 GRand Unified Bootloader, version 
ii  libc6                    2.11.2-6        Embedded GNU C Library: Shared lib
ii  libdevmapper1.02.1       2:1.02.48-3     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                  5.0.6      common files for the Debian Deskto

-- debconf information:
  grub2/kfreebsd_cmdline:
* grub2/device_map_regenerated:
* grub-pc/linux_cmdline:
* grub2/linux_cmdline:
  grub-pc/install_devices_failed: false
* grub-pc/chainload_from_menu.lst: false
  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: quiet
  grub-pc/install_devices_empty: false
* grub-pc/install_devices: /dev/disk/by-id/ata-WDC_WD5001ABYS-01YNA0_WD-WCAS87724489, /dev/disk/by-id/ata-WDC_WD5001ABYS-01YNA0_WD-WCAS87644777, /dev/disk/by-id/ata-WDC_WD5001ABYS-01YNA0_WD-WCAS87478871
  grub-pc/install_devices_failed_upgrade: true
  grub-pc/partition_description:
* grub-pc/install_devices_disks_changed: /dev/disk/by-id/ata-WDC_WD5001ABYS-01YNA0_WD-WCAS87724489, /dev/disk/by-id/ata-WDC_WD5001ABYS-01YNA0_WD-WCAS87644777, /dev/disk/by-id/ata-WDC_WD5001ABYS-01YNA0_WD-WCAS87478871
  grub-pc/mixed_legacy_and_grub2: true





More information about the Pkg-grub-devel mailing list