problems with old kernel to be removed
Good morning everybody.
I tried to remove old kernel because seems they give me problems when I try to install some programs. at the moment I use the first of the following list. ii linux-image-4.12.7 4.12.7-10.00.Custom i386 Linux kernel binary image for version 4.12.7 ii linux-image-4.12.7-64 4.12.7-64-10.00.Custom i386 Linux kernel binary image for version 4.12.7-64 pH linux-image-4.9.0-040900-generic 4.9.0-040900.201612111631 i386 Linux kernel image for version 4.9.0 on 32 bit x86 SMP pH linux-image-4.9.0-8-rt-686-pae 4.9.130-2 i386 Linux 4.9 for modern PCs, PREEMPT_RT pH linux-image-4.9.11 1.0.NAS i386 Linux kernel binary image for version 4.9.11 I d like to get rid off all the other but when I give in order the follows commands sudo apt-get --purge remove (list of what i want to remove) I get the following message Reading package lists... Done Building dependency tree Reading state information... Done The following packages will be REMOVED: linux-image-4.12.7-64 linux-image-4.9.0-040900-generic linux-image-4.9.0-8-rt-686-pae linux-image-4.9.11 0 upgraded, 0 newly installed, 4 to remove and 952 not upgraded. 4 not fully installed or removed. After this operation, 609 MB disk space will be freed. Do you want to continue? [Y/n] y (Reading database ... 494691 files and directories currently installed.) Removing linux-image-4.12.7-64 (4.12.7-64-10.00.Custom) ... Examining /etc/kernel/postrm.d . run-parts: executing /etc/kernel/postrm.d/initramfs-tools 4.12.7-64 /boot/vmlinuz-4.12.7-64 run-parts: executing /etc/kernel/postrm.d/zz-update-grub 4.12.7-64 /boot/vmlinuz-4.12.7-64 Searching for GRUB installation directory ... found: /boot/grub run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 1 Failed to process /etc/kernel/postrm.d at /var/lib/dpkg/info/linux-image-4.12.7-64.postrm line 291. dpkg: error processing package linux-image-4.12.7-64 (--remove): subprocess installed post-removal script returned error exit status 1 Removing linux-image-4.9.0-040900-generic (4.9.0-040900.201612111631) ... Examining /etc/kernel/postrm.d . run-parts: executing /etc/kernel/postrm.d/initramfs-tools 4.9.0-040900-generic /boot/vmlinuz-4.9.0-040900-generic update-initramfs: Deleting /boot/initrd.img-4.9.0-040900-generic run-parts: executing /etc/kernel/postrm.d/zz-update-grub 4.9.0-040900-generic /boot/vmlinuz-4.9.0-040900-generic Searching for GRUB installation directory ... found: /boot/grub run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 1 Failed to process /etc/kernel/postrm.d at /var/lib/dpkg/info/linux-image-4.9.0-040900-generic.postrm line 328. dpkg: error processing package linux-image-4.9.0-040900-generic (--remove): subprocess installed post-removal script returned error exit status 1 Removing linux-image-4.9.0-8-rt-686-pae (4.9.130-2) ... I: /boot/vmlinuz is now a symlink to vmlinuz-4.12.7 /etc/kernel/postrm.d/initramfs-tools: update-initramfs: Deleting /boot/initrd.img-4.9.0-8-rt-686-pae /etc/kernel/postrm.d/zz-update-grub: Searching for GRUB installation directory ... found: /boot/grub run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 1 dpkg: error processing package linux-image-4.9.0-8-rt-686-pae (--remove): subprocess installed post-removal script returned error exit status 1 Removing linux-image-4.9.11 (1.0.NAS) ... Examining /etc/kernel/postrm.d . run-parts: executing /etc/kernel/postrm.d/initramfs-tools 4.9.11 /boot/vmlinuz-4.9.11 update-initramfs: Deleting /boot/initrd.img-4.9.11 run-parts: executing /etc/kernel/postrm.d/zz-update-grub 4.9.11 /boot/vmlinuz-4.9.11 Searching for GRUB installation directory ... found: /boot/grub run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 1 Failed to process /etc/kernel/postrm.d at /var/lib/dpkg/info/linux-image-4.9.11.postrm line 291. dpkg: error processing package linux-image-4.9.11 (--remove): subprocess installed post-removal script returned error exit status 1 Errors were encountered while processing: linux-image-4.12.7-64 linux-image-4.9.0-040900-generic linux-image-4.9.0-8-rt-686-pae linux-image-4.9.11 E: Sub-process /usr/bin/dpkg returned an error code (1) any help would be great thank you |
I would see what's there. Have a look (e.g. ls -lh) for kernels, initrds, configs & System.maps in /boot. Note but ignore symlinks
Have a look (e.g. ls -lh) for module trees in /lib/modules. Presuming they're still there, remove your unwanted ones from your grub configuration. Then try again. |
Please paste the output from the following commands (without the row of equals signs for the latter command):
Code:
uname -a |
thank you very much for the answers,I solve the problems in a easy way, I reinstall knoppix again, I made a bit of a mess trying to install same strange workbench for freecad and the whole system went mad, so then I find out that I had several kernels built in and I was thinking were in conflict, so that's the decision to eliminate some of them.
Anyway everything seems fine now. thank you again. |
FYI, kernels are one of the few things you can remove without too much discomfort, as nothing is goiing to get broken if you remove kernels, initrds, modules, & sources. Kernel headers are a different matter - let's leave it at that.
|
Quote:
So, to be on the safe side, also reconfigure your boot loader when you remove unused kernels. |
All times are GMT -5. The time now is 12:39 AM. |