linux kernel 手动编译简单步骤

$sudosu

$cd~/Desktop

$cplinux-2.6.27.7.tar.gz/usr/src/

$cd/usr/src/linux-2.6.27.7

$makemrproper

$makemenuconfig

$make-j2

$makeinstall

$makemodules_install

$ln-s/boot/vmlinuz-2.6.27.7/vmlinuz-2.6.27.7

$mkinitramfs-o/boot/init.img-2.6.27.7/lib/modules/2.6.27.7

$ln-s/boot/init.img-2.6.27.7/init.img-2.6.27.7

$gedit/boot/grub/menu.lst

最后一步添加grub:

ubuntu实例:

添加如下信息:("uuid"和"root"可以拷贝原来的配置信息)

titlelinuxkernel2.6.27.7

uuidbdce929d-3c0b-4f10-aeb7-76b0fb8b62cd

kernel/vmlinuz-2.6.27.7root=UUID=1d668bc0-d6b1-4798-8173-b05b65e925e7roquietsplash

initrd/initrd.img-2.6.27.7

quiet

titlelinuxkernel2.6.27.7(recoverymode)

uuidbdce929d-3c0b-4f10-aeb7-76b0fb8b62cd

kernel/vmlinuz-2.6.27.7root=UUID=1d668bc0-d6b1-4798-8173-b05b65e925e7rosingle

initrd/initrd.img-2.6.27.7

相关推荐