Remove custom kernel
Hi could anyone tell me the procedure for remvoing a custom kernel ?? I built one and now I want to remove it since my driver appears to work in the deafult. Please give me the steps/commands.
Thank you. |
IMO, the easiest way for the newbie is to boot into the kernel you want to use and then use the synaptic package manager to remove the one you don't want.
|
If the new kernel was built from source code (and not installed from a .deb file or Synaptic), then it can't be removed using Yum. Instead one should just be able to boot the kernel you want to use, then just remove the old kernel files from /boot/. One can also remove the _old_ kernel source from /usr/src/ if it's not needed, but if the modules were compiled against this custom kernel, make sure they work with your other kernel before removing the custom one. I'm pretty sure kernel.org has some information about all this (should be in the README file that comes along the kernel source code, too), and if you haven't yet, it's a good idea to do a quick search from the web.
|
I guess I'm just too coddled by Debian. :) Won't he have to modify his grub or lilo lists if he removes files by hand?
|
For manually remove of customed compiled kernels.
Whether using grub or lilo you need to remove the section of that kernel from it. Grub you need to edit /boot/grub/grub.conf or 1st.menu and save the file. Lilo I forget how to do that. I know after edit you need to run the command lilo. Remove the kernel image, system.map, and initrd that matches the kernel version to remove in /boot. Remove the kernel source from /usr/src. And last remove the /lib/modules/<kernel-version-of-modules> Brian |
I knew this is so many years.
Just to expand on Brian1's reply which helps me as well. I'm on Ubuntu 20.04, and for custom manual built kernel. The following is the files I need to remove * /boot/config-<kernel-version> * /boot/initrd.img-<kernel-version> * /boot/System.map-<kernel-version> * /boot/vmlinuz-<kernel-version> After that, execute sudo update-grub. The grub entries will be updated automatically as its scripts inside /etc/grub.d will automatically detect files inside /boot then update accordingly. Note that /boot/grub/grub.cfg is not meant to be directly edit as noted inside the file as "DO NOT EDIT THIS FILE". It might be in 2007 things might be different from now. But yeah, I just add this updated info for later new users reading this. |
Quote:
|
Quote:
|
All times are GMT -5. The time now is 01:00 AM. |