-
下载源码 linux-2.6.39.4.tar.bz2
-
把源码包复制到/usr/src下,然后解压(tar -xvf linux-2.6.39.4.tar.bz2)
-
进入解压后的的目录, make mrproper
-
然后开始编译内核, make menuconfig 可能会出现缺少ncurses包
apt-get install libncurses5-dev
-
进入编译内核界面,在这个过程中,一定要选择好网络,网卡和控制台支持
主要是在
Device Driver ——>Multiple devices driver support(RAID)
——>NetWork device support --->Ethernet()
——>Graphics support -->support for fram buffer device -->Vesa VGA graphic
——>Graphics support ---->Display device support
——>Graphics support ---->Console display drive...
File System ——> miscell filesystem --->ecryptfs filesystem
Security Options ——> Enable access key support
Enable loadable module support——>Forced module support
Processor type and features --->processor family --->Athlon64
-
完成后点SAVE
-
然后make
-
make modules_install
-
cp /usr/src/linux-2.6.39.4/arch/x86_64/boot/bzImage /boot/vmlinuz-2.6.39.4 (这是64位的时候, 32位时是x86)
-
cp /usr/src/linux-2.6.39.4/.config /boot/config-2.6.39.4
-
生成 启动项
mkinitramfs -o /boot/initrd-linux2.6.39.4.img 2.6.39.4 (fedora 使用mkinitrd /boot/initrd-linux2.6.39.4.img 2.6.39.4)
-
make install
-
查看是否有相应的启动项 vi /boot/grub/grub.cfg (fedora中是文件 /boot/grub2/grub.cfg )
-
如果没有相应的grub选择界面 在/etc/default/grub中把
GRUB_HIDDEN_TIMEOUT = 0 注释掉
-
最后更新grub
sudo update-grub (fedora 中是 grub2-mkconfig -o /boot/grub2/grub.cfg)
linux内核的编译(2.6.39.4)
最新推荐文章于 2017-07-03 14:24:44 发布
注意:如果自己系统分区的时候,单独分区/boot的, 那么/boot大小要适当大一些,如果偏小,就会出错