installation of kernel image failed: Could not find postinst hook script [usr/sbin/update-grub]

Bug #261392 reported by fourmi
328
This bug affects 6 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Expired
Medium
Unassigned

Bug Description

This important security update failed. It was notified, as all updates, by Update Manager (in the Hardy Important Security updates). I expected the package to install normally but instead it crashed and I was invited to fill in this report.

DistroRelease: Ubuntu 8.04

:: Symptoms ::
Setting up linux-image-2.6.24-19-generic (2.6.24-19.41) ...
Running depmod.
update-initramfs: Generating /boot/initrd.img-2.6.24-19-generic
Could not find postinst hook script [usr/sbin/update-grub].
Looked in: '/bin', '/sbin', '/usr/bin', '/usr/sbin'
dpkg: error processing linux-image-2.6.24-19-generic (--configure):
 subprocess post-installation script returned error exit status 2

:: Test Case ::
(DONT DO THAT ON A PRODUCTION SYSTEM)
Run the following command:
sudo apt-get remove --purge grub

Nothing complains about it and you don't have a boot loader anymore.

:: Workaround::
Install grub by running following commands on a console/shell:
sudo apt-get install --reinstall grub

It should bring you back the /usr/sbin/update-grub file.

Nothing protects the user against the removal of grub, then all updates of the kernel will fail.

Revision history for this message
fourmi (fourmi1060) wrote :
Raseel (raseel)
Changed in linux:
status: New → Confirmed
Revision history for this message
Daniel Hahler (blueyed) wrote :

I've seen this kind of error in bug 179984 already.
Maybe the comments there might help to solve/debug this.

description: updated
Revision history for this message
Leann Ogasawara (leannogasawara) wrote : Re: installation of kernel image 2.6.24-19-41 failed: Could not find postinst hook script [usr/sbin/update-grub]

The Ubuntu Kernel Team is planning to move to the 2.6.27 kernel for the upcoming Intrepid Ibex 8.10 release. As a result, the kernel team would appreciate it if you could please test this newer 2.6.27 Ubuntu kernel. There are one of two ways you should be able to test:

1) If you are comfortable installing packages on your own, the linux-image-2.6.27-* package is currently available for you to install and test.

--or--

2) The upcoming Alpha5 for Intrepid Ibex 8.10 will contain this newer 2.6.27 Ubuntu kernel. Alpha5 is set to be released Thursday Sept 4. Please watch http://www.ubuntu.com/testing for Alpha5 to be announced. You should then be able to test via a LiveCD.

Please let us know immediately if this newer 2.6.27 kernel resolves the bug reported here or if the issue remains. More importantly, please open a new bug report for each new bug/regression introduced by the 2.6.27 kernel and tag the bug report with 'linux-2.6.27'. Also, please specifically note if the issue does or does not appear in the 2.6.26 kernel. Thanks again, we really appreicate your help and feedback.

Revision history for this message
Pablo Castellano (pablocastellano) wrote :

The Intrepid Ibex 8.10 Beta release was most recently announced - http://www.ubuntu.com/testing/intrepid/beta . It contains the 2.6.27 Ubuntu kernel. It would be great if you could test and verify if this is still an issue. The status is being set to Incomplete until we receive further feedback. Thanks.

Changed in linux:
status: Confirmed → Incomplete
Revision history for this message
Angel Carpintero (sack) wrote :

Continuing from bug https://bugs.launchpad.net/bugs/279432 marked as duplicated by this one.

Let me point out that this happened after upgrade from hardy to Intrepid on AMD64 ... many packages were
removed and never installed new one ... so that's the reason why grub was missing.

Before install grub :
which update-grub
( nothing )

apt-cache policy grub
grub:
  Installed: (none)
  Candidate: 0.97-29ubuntu36
  Version Table: (none)

After install grub :

which update-grub
/usr/sbin/update-grub

apt-cache policy grub
grub:
  Installed: 0.97-29ubuntu36
  Candidate: 0.97-29ubuntu36
  Version Table:
 *** 0.97-29ubuntu36 0
        500 http://www.archive.ubuntu.com intrepid/main Packages
        100 /var/lib/dpkg/status

Cheers,

-Angel

Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

Confirmed in intrepid.

A user can remove grub without any problem because it's only a Recommends of the kernel.

Changed in linux:
status: Incomplete → Confirmed
description: updated
Changed in linux:
importance: Undecided → Medium
status: Confirmed → Triaged
Revision history for this message
Tribes (tribes) wrote :

If you removed GRUB on yourself, because you use lilo or another GRUB or whatever, a possible solution is to create an executable shellscript in /usr/bin which is named update-grub and does nothing. If you have created one, you will be able to install the new kernel versions.

description: updated
Revision history for this message
Matthias Jordan (matthiasjordan) wrote :

Faster workaround:

sudo ln -s /bin/true /sbin/update-grub

Revision history for this message
Dave Gilbert (ubuntu-treblig) wrote :

I've just glued a few more dupes in to this one, various users with lilo rather than grub etc

Revision history for this message
MarianoAbsatz (el-baby) wrote :

This keeps happening in the latest linux-image-2.6.24-23-server available for hardy (which, incidentally, is an LTS release, so it's here to stay).

I don't expect to use workarounds for critical packages (like, for instance, the kernel) in order to work and configure OK.

And there is no shortage of linux-image-server / lilo users since grub is not compatible with LVM or RAID (which are common in server setups).

Is no one going to fix a 9 month old bug in the kernel packaging for an LTS release?

People set up to solve this for intrepid and hardy got left behind...

What does LTS stand for?

Revision history for this message
Jeremy Foshee (jeremyfoshee) wrote :

This bug report was marked as Triaged a while ago but has not had any updated comments for quite some time. Please let us know if this issue remains in the current Ubuntu release, http://www.ubuntu.com/getubuntu/download . If the issue remains, click on the current status under the Status column and change the status back to "New". Thanks.

[This is an automated message. Apologies if it has reached you inappropriately; please just reply to this message indicating so.]

tags: added: kj-triage
Changed in linux (Ubuntu):
status: Triaged → Incomplete
Revision history for this message
Jeremy Foshee (jeremyfoshee) wrote :

This bug report was marked as Incomplete and has not had any updated comments for quite some time. As a result this bug is being closed. Please reopen if this is still an issue in the current Ubuntu release http://www.ubuntu.com/getubuntu/download . Also, please be sure to provide any requested information that may have been missing. To reopen the bug, click on the current status under the Status column and change the status back to "New". Thanks.

[This is an automated message. Apologies if it has reached you inappropriately; please just reply to this message indicating so.]

tags: added: kj-expired
Changed in linux (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.