package linux-image-2.6.27-7-generic 2.6.27-7.16 failed to install/upgrade: /etc/kernel/prerm.d/last-good-boot: 3: /usr/sbin/kernel-helper: not found

Bug #350413 reported by 3rd Maths
62
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Triaged
Medium
Unassigned

Bug Description

Hello me again :p,

After automaticly upgrading to the new kernel 2.6.27-11 without any problem; I was trying to remove old kernel files from my ubuntu intrepid install (using sysnaptique of course) to clean my grub screen.

but I faced with this error message, here is the detailed uninstall log :

--------------------------------------------------------------------------------
(Lecture de la base de données... 117926 fichiers et répertoires déjà installés.)
Suppression de linux-restricted-modules-2.6.27-7-generic ...
update-initramfs: Generating /boot/initrd.img-2.6.27-7-generic
(Lecture de la base de données... 117868 fichiers et répertoires déjà installés.)
Suppression de linux-image-2.6.27-7-generic ...
Examining /etc/kernel/prerm.d.
run-parts: executing /etc/kernel/prerm.d/dkms
run-parts: executing /etc/kernel/prerm.d/last-good-boot
/etc/kernel/prerm.d/last-good-boot: 3: /usr/sbin/kernel-helper: not found
run-parts: /etc/kernel/prerm.d/last-good-boot exited with return code 127
Failed to process /etc/kernel/prerm.d at /var/lib/dpkg/info/linux-image-2.6.27-7-generic.prerm line 267.
dpkg : erreur de traitement de linux-image-2.6.27-7-generic (--purge) :
 le sous-processus pre-removal script a retourné une erreur de sortie d'état 2
Des erreurs ont été rencontrées pendant l'exécution :
 linux-image-2.6.27-7-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)
Un paquet n'a pas pu être installé. Tentative de récupération :
--------------------------------------------------------------------------------

PLATFORM INFORMATION :
  - Dell Dimension E521
  - OS : Ubuntu Intrepid Ibex 8.10
  - uname -r => 2.6.27-11-generic

What I don't understand is that I was trying to clean the kernel, in the log I see it generates initramfs "Generating /boot/initrd.img-2.6.27-7-generic". Isn't it useless as what I wish is precisely to remove this version of the kernel and not to rebuild it :/ Here is the content of the boot fodler if it helps.

--------------------------------------------------------------------------------
/boot# ls -la
total 23708
drwxr-xr-x 3 root root 4096 2009-03-28 17:30 .
drwxr-xr-x 19 root root 4096 2009-03-28 03:04 ..
-rw-r--r-- 1 root root 508385 2009-01-29 22:11 abi-2.6.27-11-generic
-rw-r--r-- 1 root root 507665 2008-11-04 22:00 abi-2.6.27-7-generic
-rw-r--r-- 1 root root 91358 2009-01-29 22:11 config-2.6.27-11-generic
-rw-r--r-- 1 root root 91364 2008-11-04 22:00 config-2.6.27-7-generic
drwxr-xr-x 2 root root 4096 2009-03-28 17:25 grub
-rw-r--r-- 1 root root 8172570 2009-03-28 03:05 initrd.img-2.6.27-11-generic
-rw-r--r-- 1 root root 8169865 2009-03-28 17:30 initrd.img-2.6.27-7-generic
-rw-r--r-- 1 root root 124152 2008-09-11 22:11 memtest86+.bin
-rw-r--r-- 1 root root 1031799 2009-01-29 22:11 System.map-2.6.27-11-generic
-rw-r--r-- 1 root root 1029585 2008-11-04 22:00 System.map-2.6.27-7-generic
-rw-r--r-- 1 root root 1074 2009-01-29 22:12 vmcoreinfo-2.6.27-11-generic
-rw-r--r-- 1 root root 1073 2008-11-04 22:02 vmcoreinfo-2.6.27-7-generic
-rw-r--r-- 1 root root 2248912 2009-01-29 22:11 vmlinuz-2.6.27-11-generic
-rw-r--r-- 1 root root 2244464 2008-11-04 22:00 vmlinuz-2.6.27-7-generic
--------------------------------------------------------------------------------

Thanks,
  Uğur

ProblemType: Package
Architecture: i386
DistroRelease: Ubuntu 8.10
ErrorMessage: le sous-processus pre-removal script a retourné une erreur de sortie d'état 2
NonfreeKernelModules: nvidia
Package: linux-image-2.6.27-7-generic 2.6.27-7.16
ProcCmdLine: User Name=UUID=23a66131-11c8-42e4-b8d0-6c95abcf99d0 ro quiet splash
ProcVersionSignature: Ubuntu 2.6.27-11.27-generic
SourcePackage: linux
Title: package linux-image-2.6.27-7-generic 2.6.27-7.16 failed to install/upgrade: le sous-processus pre-removal script a retourné une erreur de sortie d'état 2

Revision history for this message
3rd Maths (3rd-maths) wrote :
Revision history for this message
Leann Ogasawara (leannogasawara) wrote :

Hi 3rd Maths,

The following seems to be the most relevant bits of the error message. Setting this to Triaged for the kernel team to investigate. Thanks.

run-parts: executing /etc/kernel/prerm.d/last-good-boot
/etc/kernel/prerm.d/last-good-boot: 3: /usr/sbin/kernel-helper: not found
run-parts: /etc/kernel/prerm.d/last-good-boot exited with return code 127
Failed to process /etc/kernel/prerm.d at /var/lib/dpkg/info/linux-image-2.6.27-7-generic.prerm line 267.
dpkg : erreur de traitement de linux-image-2.6.27-7-generic (--purge) :
 le sous-processus pre-removal script a retourné une erreur de sortie d'état 2

Changed in linux (Ubuntu):
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
JuRiJ (juraj-kvasnica) wrote :
Download full text (4.2 KiB)

Same problem here. My system is Karmic Koala (9.10)
Original install was Ubuntu 8.10 (Intrepid Ibex) which I upgraded to Ubuntu 9.04 (Jaunty Jackalope) and finally to Ubuntu 9.10 (Karmic Koala - development branch).

these are the kernels, that I have installed on my PC (aptitude search linux-image):
ipA linux-image-2.6.27-11-generic - Linux kernel image for version 2.6.27 on x86/x86_64
id linux-image-2.6.27-7-generic - Linux kernel image for version 2.6.27 on x86/x86_64
ipA linux-image-2.6.27-9-generic - Linux kernel image for version 2.6.27 on x86/x86_64
ipA linux-image-2.6.28-11-generic - Linux kernel image for version 2.6.28 on x86/x86_64
idA linux-image-2.6.28-13-generic - Linux kernel image for version 2.6.28 on x86/x86_64
i A linux-image-2.6.28-14-generic - Linux kernel image for version 2.6.28 on x86/x86_64
id linux-image-2.6.31-4-generic - Linux kernel image for version 2.6.31 on x86/x86_64
i linux-image-2.6.31-5-generic - Linux kernel image for version 2.6.31 on x86/x86_64
i linux-image-2.6.31-6-generic - Linux kernel image for version 2.6.31 on x86/x86_64
i linux-image-generic

uname -a:
Linux havis 2.6.31-5-generic #24-Ubuntu SMP Sat Aug 1 12:47:58 UTC 2009 x86_64 GNU/Linux

command:
aptitude purge linux-image-2.6.27-7-generic

Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done
The following packages will be REMOVED:
  linux-image-2.6.27-7-generic{ap}
0 packages upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
Need to get 0B of archives. After unpacking 111MB will be freed.
Do you want to continue? [Y/n/?] y
Writing extended state information... Done
(Reading database ... 211186 files and directories currently installed.)
Removing linux-imag...

Read more...

Revision history for this message
JuRiJ (juraj-kvasnica) wrote :

I managed to solve this problem.
install grub2
purge old grub (see this bug for more info: https://bugs.launchpad.net/ubuntu/+source/grub/+bug/272885)
purge dkms (remove this file: /etc/kernel/prerm.d/last-good-boot )

purge any linux-image-VERSION you might have installed from previous Ubuntu releases.

Revision history for this message
Matt Zimmerman (mdz) wrote :

This looks like a bug in the old "last good boot" framework, which has since been removed from Ubuntu. If there are bugs in the config file remnants left behind, it may be worth fixing that up so that other users don't run into the same problem.

summary: package linux-image-2.6.27-7-generic 2.6.27-7.16 failed to
- install/upgrade: le sous-processus pre-removal script a retourné une
- erreur de sortie d'état 2
+ install/upgrade: /etc/kernel/prerm.d/last-good-boot: 3:
+ /usr/sbin/kernel-helper: not found
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.