linux 内核编译安装及卸载

编译安装:

下载需要的包

apt-get install kernel-package libncurses5-dev fakeroot wget bzip2

 

cp linux-3.x.x /usr/src

cd /usr/src/linux-3.x.x

make menuconfig

make modules

make modules_install

make

make install

sudo mkinitramfs -o /boot/initrd.img-3.x.x

sudo update-initramfs -c -k 3.x.x

sudo update-grub2


 

卸载:

 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 grub configuration file /etc/grub.conf or /boot/grub/menu.lst to point to correct kernel version.
posted @ 2013-02-28 15:27  billowkiller  阅读(393)  评论(0编辑  收藏  举报
Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.