我是虚拟机下安装 redhat9 ,在上面编译内核的.
我主要参考了网上的资料.
以下是我的编译步骤:
安装module-init-tools-3.0.tar.bz2
tar -jxvf module-init-tools-3.0.tar.bz2
./configure --prefix=/bin
make
make install
安装modutils-2.4.21-23.src.rpm
rpm -ivh modutils-2.4.21-23.src.rpm
rpmbuild --bb /usr/src/redhat/SPECS/modutils.spec
rpm -Fi /usr/src/redhat/RPMS/i386/modutils-2.4.21-23.i386.rpm
若有
"user rusty and group rusty not existing"的警告
则: adduser rusty
groupadd rusty
解压内核代码
将linux-2.6.18.tar.bz2 复制到/usr/src
tar -jxvf linux-2.6.18.tar.bz2
进入内核代码目录
make mrproper
配置内核
make menuconfig
Enable loadable module support ->Module unloading
Device Drivers ---> USB support ---> USB Mass Storage support
Device Drivers ---> Networking support --->;Ethernet (10 or 100Mbit) ---> AMD PCnet32 PCI support
Device Drivers --->SCSI device support ---> SCSI disk support
Device Drivers --->SCSI device support --->scsi device support
Device Drivers ---> Fusion MPT device support --->
还有与ext3相关的,全部编入内核,
scsi如果以模块编译的,我的实验是不成功的,不知为什么,所以全部编译入内核.
退出后,
make clean
make bzImage
make modules
make modules_install
make install
假如出现 "NO MODULE BUSLOGIC FOUND",则
编辑文档 /etc/modules.conf
将"alias scsi hostadapter BusLogic"这行注释掉,
至此编译完成,
重启,选择2.6.18
阅读(1307) | 评论(0) | 转发(0) |