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.