/sbin/update-grub complains about being run instead of /usr/sbin/update-grub

Bug #78552 reported by Bogdan Butnaru
22
Affects Status Importance Assigned to Milestone
grub (Ubuntu)
Invalid
Undecided
Steve Langasek
linux-meta (Ubuntu)
Invalid
Undecided
Unassigned
ubiquity (Baltix)
Invalid
Undecided
Unassigned
update-manager (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: linux-image-2.6-386

Each time one of the linux-image-2.6.* packages is added or removed, I get the warning:

"You shouldn't call /sbin/update-grub. Please call /usr/sbin/update-grub instead!"

-- although the call isn't made by me, but by the package manager. From what I can tell from the /sbin/update-grub script, this is a mis-configuration of the package.

I don't remember seeing this in Edgy. I'm running Feisty, and I get this message for every linux-image-* package I've tried. For instance, I got it for "sudo aptitude remove linux-image-2.6.20-4-386".

Revision history for this message
chantra (chantra) wrote :

More exactly, the message is as follow:

Running postrm hook script /sbin/update-grub.
Your /etc/kernel-img.conf needs to be updated. Read grub's NEWS.Debian[1]
file and follow its instructions.

 1. /usr/share/doc/grub/NEWS.Debian.gz

You shouldn't call /sbin/update-grub. Please call /usr/sbin/update-grub instead!

Searching for GRUB installation directory ... found: /boot/grub

Looking at /usr/share/doc/grub/NEWS.Debian.gz, /sbin/update-grub has been moved to /usr/sbin/update-grub

NEWS.Debian.gz says that you _must_ edit /etc/kernel-img.conf and change:
 postinst_hook = /sbin/update-grub
 postrm_hook = /sbin/update-grub

to
postinst_hook = /usr/sbin/update-grub
postrm_hook = /usr/sbin/update-grub

In the meanwhile, a wrapper is provided to keep backward compatibility.

I don't know yet if kernel-img.conf will be automatically updated in a close future so I change this bug status to confirmed.
I believe people installing brand new feisty will get their kernel-img.conf properly configured.

Changed in linux-meta:
status: Unconfirmed → Confirmed
Revision history for this message
Ben Collins (ben-collins) wrote :

kernel-image.conf is not something the kernel manages. It's done by the installer.

Not sure where the update for this should go, but the kernel is likely not the right place for it.

Changed in linux-meta:
status: Confirmed → Rejected
Revision history for this message
Bogdan Butnaru (bogdanb) wrote :

I marked the bug as affecting the package manager and grub packages. I'm not sure if either is directly responsible, but they should at least have a better idea who is, and leave a hint.

As far as I can tell, when updating to the /usr-rooted update-grub the kernel-img.conf file should be updated, but I don't know enough apt-get-fu to find out exactly who should do that.

Revision history for this message
chantra (chantra) wrote :

Ben Collins:
kernel-image.conf is not something the kernel manages. It's done by the installer.

Therefore ubiquity is going to deal with that and a brand new installation is going to have kernel-image.conf set correctly.

People upgrading from edgy to feisty will either have to edit the file manually or fortunately, the update-manager will deal with that when upgrading from edgy to feisty.

Maybe update-manager should be modified in such a way that when a distribution upgrade is performed it will check for any instance of /sbin/update-grub and replace them with /usr/sbin/update-grub

Changed in update-manager:
status: Unconfirmed → Rejected
Scott Zawalski (cowbud)
Changed in grub:
status: Unconfirmed → Confirmed
Revision history for this message
Michael Vogt (mvo) wrote :

While we could certainly add this to update-manager I think it should be done in grub so that people who upgrade with a different method (apt-get dist-upgrade, synaptic etc) get the benefit of this too.

Revision history for this message
Ian Jackson (ijackson) wrote : Re: [Bug 78552] Re: /sbin/update-grub complains about being run instead of /usr/sbin/update-grub

Michael Vogt writes ("[Bug 78552] Re: /sbin/update-grub complains about being run instead of /usr/sbin/update-grub"):
> While we could certainly add this to update-manager I think it should be
> done in grub so that people who upgrade with a different method (apt-get
> dist-upgrade, synaptic etc) get the benefit of this too.

It is IMO outrageous that this command isn't being run from PATH.

Ian.

Revision history for this message
Matt LaPlante (cybrmatt) wrote :

The update-grub man page gives the depricated location of /sbin/update-grub. I reported this in bug #107741, but someone felt this was a duplicate, despite the fact that there is no mention of man pages in this bug.

The section in question:

######
The update-grub script can be ran automagically from the /etc/kernel-img.conf file by adding the following lines:

       postinst_hook = /sbin/update-grub
       postrm_hook = /sbin/update-grub
######

Revision history for this message
Alec Wright (alecjw) wrote :

I can confirm when installing kernel 2.6.22-6 on gutsy. I vagely recall it happening on previous kernel/ubuntu versions too.

Revision history for this message
Joey Stanford (joey) wrote :

Me too on Gutsy:

----
Setting up linux-image-2.6.22-11-generic (2.6.22-11.32) ...
Running depmod.
update-initramfs: Generating /boot/initrd.img-2.6.22-11-generic
Running postinst hook script /sbin/update-grub.
Your /etc/kernel-img.conf needs to be updated. Read grub's NEWS.Debian[1]
file and follow its instructions.

 1. /usr/share/doc/grub/NEWS.Debian.gz

Searching for GRUB installation directory ... found: /boot/grub
Searching for default file ... found: /boot/grub/default
Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst
Searching for splash image ... none found, skipping ...
Found kernel: /boot/vmlinuz-2.6.22-11-generic
Found kernel: /boot/vmlinuz-2.6.22-10-generic
Found kernel: /boot/memtest86+.bin
Updating /boot/grub/menu.lst ... done
----

Revision history for this message
Patrick J. LoPresti (lopresti) wrote :

"Me too"

Since the installer created kernel-img.conf, and since update-manager is the only supported upgrade path for Ubuntu, update-manager should fix the broken configuration file. In my opinion.

But regardless, the kernel-img.conf file is broken following an upgrade to Gutsy. From my end-user point of view, I don't care whose fault it is, I just think it needs to be fixed...

Revision history for this message
Pål Grønås Drange (pgdx) wrote :

This bug is still valid:

Linux ms-development 2.6.20-17-generic #2 SMP Thu Jul 10 00:05:43 UTC 2008 i686 GNU/Linux

The following packages will be upgraded:
  linux-headers-2.6.20-17 linux-headers-2.6.20-17-generic
  linux-image-2.6.20-17-generic
3 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 32.8MB of archives.
After unpacking 0B of additional disk space will be used.
Do you want to continue [Y/n]?
Get:1 http://security.ubuntu.com feisty-security/main linux-headers-2.6.20-17 2.6.20-17.39 [8127kB]

[ ... ]

Unpacking replacement linux-image-2.6.20-17-generic ...
Running postrm hook script /sbin/update-grub.
You shouldn't call /sbin/update-grub. Please call /usr/sbin/update-grub instead!

Searching for GRUB installation directory ... found: /boot/grub
Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst
Searching for splash image ... none found, skipping ...
Found kernel: /boot/vmlinuz-2.6.20-17-generic
Found kernel: /boot/vmlinuz-2.6.20-16-generic
Found kernel: /boot/vmlinuz-2.6.20-15-generic
Found kernel: /boot/memtest86+.bin
Updating /boot/grub/menu.lst ... done

Setting up linux-headers-2.6.20-17 (2.6.20-17.39) ...

Setting up linux-headers-2.6.20-17-generic (2.6.20-17.39) ...
Setting up linux-image-2.6.20-17-generic (2.6.20-17.39) ...
Running depmod.
update-initramfs: Generating /boot/initrd.img-2.6.20-17-generic
Not updating initrd symbolic links since we are being updated/reinstalled
(2.6.20-17.37 was configured last, according to dpkg)
Not updating image symbolic links since we are being updated/reinstalled
(2.6.20-17.37 was configured last, according to dpkg)
Running postinst hook script /sbin/update-grub.
You shouldn't call /sbin/update-grub. Please call /usr/sbin/update-grub instead!

Searching for GRUB installation directory ... found: /boot/grub
Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst
Searching for splash image ... none found, skipping ...
Found kernel: /boot/vmlinuz-2.6.20-17-generic
Found kernel: /boot/vmlinuz-2.6.20-16-generic
Found kernel: /boot/vmlinuz-2.6.20-15-generic
Found kernel: /boot/memtest86+.bin
Updating /boot/grub/menu.lst ... done

done

Steve Langasek (vorlon)
Changed in grub:
assignee: nobody → vorlon
milestone: ubuntu-7.04 → none
Revision history for this message
dino99 (9d9) wrote :

outdated report & no more maintained distro; please send a new one if that issue still exist (using ubuntu-bug)

Changed in grub (Ubuntu):
status: Confirmed → Invalid
Changed in ubiquity (Baltix):
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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