Linux - Laptop and NetbookHaving a problem installing or configuring Linux on your laptop? Need help running Linux on your netbook? This forum is for you. This forum is for any topics relating to Linux and either traditional laptops or netbooks (such as the Asus EEE PC, Everex CloudBook or MSI Wind).
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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)
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.
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.
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.
Except Grub might complain and crash at startup if you have configurations in there of Kernels that do not exist (have been removed). Yes, it's true. I have experienced this myself.. Typically I just expected those boot options not to work, not to crash Grub.
So, to be on the safe side, also reconfigure your boot loader when you remove unused kernels.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.