/etc/kernel/prerm.d/last-good-boot fails if grub is removed but not purged
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
grub (Ubuntu) |
Fix Released
|
Undecided
|
Colin Watson | ||
Intrepid |
Invalid
|
Undecided
|
Unassigned |
Bug Description
After installing linux-image-
$ sudo apt-get purge linux-image-
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
linux-
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 96.0MB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ... 109912 files and directories currently installed.)
Removing linux-image-
Examining /etc/kernel/
run-parts: executing /etc/kernel/
/etc/kernel/
run-parts: /etc/kernel/
Failed to process /etc/kernel/prerm.d at /var/lib/
dpkg: error processing linux-image-
subprocess pre-removal script returned error exit status 2
Errors were encountered while processing:
linux-
E: Sub-process /usr/bin/dpkg returned an error code (1)
I found out that the reason is that I had installed grub2 (just for testing) which removed grub which apparently provides this kernel-helper file. After installing grub (which removed grub2) the purge proceeded successfully.
This must mean, I believe, that the package linux-image (or some other such package) must depend on grub, but it does not, since I was allow to uninstall grub.
Please look at the situation and find a solution.
In Hardy it's set to recommend grub or lilo. What depends, recommends, and suggests are listed in Intrepid?