Chinaunix
标题:
linux内核编译笔记
[打印本页]
作者:
iakuf
时间:
2006-09-15 15:55
标题:
linux内核编译笔记
操作环境
系统: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
欢迎光临 Chinaunix (http://bbs.chinaunix.net/)
Powered by Discuz! X3.2