linux内核的编译(2.6.39.4)

  1. 下载源码 linux-2.6.39.4.tar.bz2

  2. 把源码包复制到/usr/src下,然后解压(tar -xvf linux-2.6.39.4.tar.bz2)

  3. 进入解压后的的目录, make mrproper

  4. 然后开始编译内核, make menuconfig 可能会出现缺少ncurses包

    apt-get install libncurses5-dev

  5. 进入编译内核界面,在这个过程中,一定要选择好网络,网卡和控制台支持

    主要是在

    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

  6. 完成后点SAVE

  7. 然后make

  8. make modules_install

  9. cp /usr/src/linux-2.6.39.4/arch/x86_64/boot/bzImage /boot/vmlinuz-2.6.39.4 (这是64位的时候, 32位时是x86)

  10. cp /usr/src/linux-2.6.39.4/.config /boot/config-2.6.39.4

  11. 生成 启动项

    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)

  12. make install

  13. 查看是否有相应的启动项 vi /boot/grub/grub.cfg (fedora中是文件 /boot/grub2/grub.cfg )

  14. 如果没有相应的grub选择界面 在/etc/default/grub中把

    GRUB_HIDDEN_TIMEOUT = 0 注释掉

  15. 最后更新grub

    sudo update-grub (fedora 中是 grub2-mkconfig -o /boot/grub2/grub.cfg)

注意:如果自己系统分区的时候,单独分区/boot的, 那么/boot大小要适当大一些,如果偏小,就会出错     
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值