免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 672 | 回复: 0
打印 上一主题 下一主题

linux内核编译笔记 [复制链接]

论坛徽章:
1
辰龙
日期:2014-05-15 19:37:15
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-09-15 15:55 |只看该作者 |倒序浏览
操作环境
  系统:CentOS4.3
  内核:2.6.9-34.EL
  新内核版本2.6.17
编译
2.6的内核编译操作
# make menuconfig# make# make modules_install# make install
注:
以前2.4的内核编译操作
# make modules
# make modules_install
# make install
# cp arch/i386/boot/bzImage /boot/vmlinuz-2.6.17
# cp System.map /boot/System.map-2.6.17
# mkinitrd ……
# ln -s /boot/vmlinuz-2.6.7 /boot/vmlinuz
# ln -s /boot/System.map-2.6.7 /boot/System.map
#vim /boot/grub/menu.lst
常见问题
 1.错误提示:Enforcing mode requested but no policy loaded
   因为系统启用了selinux的enforcing模式,需要回到原来的系统关闭selinux,如果不需要selinux,可以编内核的时候就去掉。
 2.错误提示:VFS:Unable to mount root fs on unknown-block(0,0)
   确保以下两项被编进内核
   Device Drivers ---> Block devices --->
      RAM disk support
     
  • Initial RAM disk (initrd) support
     3.启动错误提示:
        mkrootdev:lable /1 not found
        mount:error 2 mounting ext3
        mount:error 2 mounting none
        switchroot:mount failed:22
        Umount /initrd/dev failed:2
       需要以下驱动支持:
        Device Drivers  ---> ATA/ATAPI/MFM/RLL support  --->
  •      PCI IDE chipset support
      4.错误提示:
       Enforcing mode requested but no policy loaded. Halting now.
        kernel panic - not syncing: Attenpted to kill init!
       编缉/etc/grub/grup.conf
    title CentOS (2.6.17)
            root (hd0,0)
            kernel /vmlinuz-2.6.17 ro root=LABEL=/ enforcing=0
            initrd /initrd-2.6.17.img
    在后面加入enforcing=0


    本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/12859/showart_171741.html
  • 您需要登录后才可以回帖 登录 | 注册

    本版积分规则 发表回复

      

    北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
    未成年举报专区
    中国互联网协会会员  联系我们:huangweiwei@itpub.net
    感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

    清除 Cookies - ChinaUnix - Archiver - WAP - TOP