2010년 11월 8일 월요일

How to: Linux delete or remove kernel

How to: Linux delete or remove kernel


A. Linux Kernel and related files are stored in following locations:
=> /boot - Stores actual kernel and related file such system man and initrd images,

=> /etc or /boot/grub - Stores grub.conf file (most distro use /boot/grub these days).

=> /iib/modules/KERNEL-VERSION/* - Linux device drivers (modules)




.deb based distro - Debian or Ubuntu Linux

Again find out all installed kernel version:
$ dpkg --list | grep kernel-image



Now remove kernel-image-2.4.27-2-386 with apt-get command itself:
# apt-get remove kernel-image-2.4.27-2-386
OR
$ sudo apt-get remove kernel-image-2.4.27-2-386


If you have custom compiled kernel you need to remove following files/dirs:

* /boot/vmlinuz*KERNEL-VERSION*
* /boot/initrd*KERNEL-VERSION*
* /boot/System-map*KERNEL-VERSION*
* /boot/config-*KERNEL-VERSION*
* /lib/modules/*KERNEL-VERSION*/

*update grub2
update-grub

댓글 없음:

sublime close without confirmation

  Close without confirm   Yes, you can just write a plugin to set the view as scratch and close it. Then create a keybinding for that c...