Ubuntu

package linux-image-2.6.31-20-generic 2.6.31-20.57 failed to install/upgrade: /etc/grub.d/README executable bit set

Reported by Hitesh Santani on 2010-03-11
290
This bug affects 49 people
Affects Status Importance Assigned to Milestone
grub2 (Ubuntu)
Undecided
Colin Watson

Bug Description

Binary package hint: grub2

sdfsdfsadf

ProblemType: Package
Architecture: i386
Date: Thu Mar 11 11:13:14 2010
DistroRelease: Ubuntu 9.10
ErrorMessage: subprocess installed post-installation script returned error exit status 2
InstallationMedia: Ubuntu 9.10 "Karmic Koala" - Release i386 (20091028.5)
Package: linux-image-2.6.31-20-generic 2.6.31-20.57
ProcVersionSignature: Ubuntu 2.6.31-19.56-generic
SourcePackage: grub2
Title: package linux-image-2.6.31-20-generic 2.6.31-20.57 failed to install/upgrade: subprocess installed post-installation script returned error exit status 2
Uname: Linux 2.6.31-19-generic i686

Hitesh Santani (santanihitesh) wrote :
Jean-Baptiste Lallement (jibel) wrote :

Thanks for your report

The relevant error is
---
Setting up linux-image-2.6.31-20-generic (2.6.31-20.57) ...
Running depmod.
update-initramfs: Generating /boot/initrd.img-2.6.31-20-generic
Running postinst hook script /usr/sbin/update-grub.
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-2.6.31-20-generic
Found initrd image: /boot/initrd.img-2.6.31-20-generic
Found linux image: /boot/vmlinuz-2.6.31-19-generic
Found initrd image: /boot/initrd.img-2.6.31-19-generic
Found linux image: /boot/vmlinuz-2.6.31-17-generic
Found initrd image: /boot/initrd.img-2.6.31-17-generic
Found linux image: /boot/vmlinuz-2.6.31-14-generic
Found initrd image: /boot/initrd.img-2.6.31-14-generic
Found memtest86+ image: /boot/memtest86+.bin
Found Microsoft Windows XP Professional on /dev/sda1
/etc/grub.d/README: 2: All: not found
/etc/grub.d/README: 4: 00_*:: not found
/etc/grub.d/README: 5: 10_*:: not found
/etc/grub.d/README: 6: Syntax error: "(" unexpected
User postinst hook script [/usr/sbin/update-grub] exited with value 2
dpkg: error processing linux-image-2.6.31-20-generic (--configure):
 subprocess installed post-installation script returned error exit status 2

Did you change the permission of the file /etc/grub.d/README to executable manually ?
To workaround this problem open a terminal and run:
$ sudo chmod a-x /etc/grub.d/README

and try performing the upgrade again.

Changed in grub2 (Ubuntu):
status: New → Incomplete
summary: package linux-image-2.6.31-20-generic 2.6.31-20.57 failed to
- install/upgrade: subprocess installed post-installation script returned
- error exit status 2
+ install/upgrade: /etc/grub.d/README executable bit set
tags: added: karmic
Colin Watson (cjwatson) on 2010-03-22
Changed in grub2 (Ubuntu):
status: Incomplete → Fix Committed
assignee: nobody → Colin Watson (cjwatson)
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package grub2 - 1.98-1ubuntu2

---------------
grub2 (1.98-1ubuntu2) lucid; urgency=low

  * Fix LVM/RAID probing in the absence of /boot/grub/device.map
    (LP: #525085, #527401).
  * Backport my upstream patch to copy .mo files from /usr/share/locale to
    match where 'make install' puts them (LP: #537998).
  * Look for .mo files in /usr/share/locale-langpack as well, in preference
    (LP: #537998).
  * Don't generate /boot/grub/device.map during grub-mkconfig (we already
    suppressed it during grub-install, but then grub-mkconfig generated it
    shortly afterwards, producing confusing results).
  * Don't run /etc/grub.d/README, even if it somehow ended up being
    executable (LP: #537123).
 -- Colin Watson <email address hidden> Mon, 22 Mar 2010 19:57:10 +0000

Changed in grub2 (Ubuntu):
status: Fix Committed → Fix Released
Axel Beckert (xtaran) wrote :

Hrm, I'd like to reopen this bug as I can reproduce this issue on Ubuntu Natty (grub-common 1.99~rc1-13ubuntu3) as well as Debian Sid (grub-common 1.99-11).

Problem seems that grub_file_is_not_garbage checks just for the file name ("README*"), but $1 contains the full path. So the line

      README*) return 1 ;; # documentation

should rather say something like:

      */README*) return 1 ;; # documentation

This fixes the issue for me.

Colin Watson (cjwatson) on 2011-09-05
Changed in grub2 (Ubuntu):
status: Fix Released → In Progress
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package grub2 - 1.99-12ubuntu1

---------------
grub2 (1.99-12ubuntu1) oneiric; urgency=low

  * Resynchronise with Debian. Remaining changes:
    - Adjust for default Ubuntu boot options ("quiet splash").
    - Default to hiding the menu; holding down Shift at boot will show it.
    - Set a monochromatic theme and an appropriate background for Ubuntu.
    - Apply Ubuntu GRUB Legacy changes to legacy update-grub script.
    - Fix backslash-escaping in merge_debconf_into_conf.
    - Remove "GNU/Linux" from default distributor string.
    - Add crashkernel option.
    - Bypass menu unless other OSes are installed or Shift is pressed.
    - Allow Shift to interrupt 'sleep --interruptible'.
    - Reduce visual clutter in normal mode.
    - Remove verbose messages printed before reading configuration.
    - Suppress kernel/initrd progress messages, except in recovery mode.
    - Show the boot menu if the previous boot failed.
    - Don't generate device.map during grub-install or grub-mkconfig.
    - Adjust upgrade version checks for Ubuntu.
    - Suppress "GRUB loading" message unless Shift is held down.
    - Adjust versions of grub-doc and grub-legacy-doc conflicts.
    - Fix LVM/RAID probing in the absence of /boot/grub/device.map.
    - Look for .mo files in /usr/share/locale-langpack first.
    - Build-depend on qemu-kvm rather than qemu-system for grub-pc tests.
    - Check hardware support before using gfxpayload=keep.
    - Put second and subsequent Linux menu entries in a submenu.
    - Preferred resolution detection for VBE.
    - Set vt.handoff=7 for smooth handoff to kernel graphical mode.
    - Update default/grub.md5sum to include maverick's default md5sum.
    - Add nomodeset to Linux kernel arguments in recovery mode.
    - Skip Windows os-prober entries on Wubi systems.
  * Suppress the menu by default on Wubi systems with no other-OS entries
    apart from Windows (LP: #826378).
  * Always store hostdisk drive names in canonical form, fixing 'grub-probe
    --target=drive' output when device.map is absent (LP: #820500).

grub2 (1.99-12) unstable; urgency=low

  [ Robert Millan ]
  * Fix grub-probe detection for LSI MegaRAID SAS devices on kFreeBSD.
    - kfreebsd_mfi_devices.patch

  [ Colin Watson ]
  * Backport from upstream:
    - Canonicalise the path argument to grub-probe (closes: #637768).
    - Skip */README* as well as README* (LP: #537123).
 -- Colin Watson <email address hidden> Mon, 05 Sep 2011 16:12:50 +0100

Changed in grub2 (Ubuntu):
status: In Progress → Fix Released
To post a comment you must log in.