做了一个多星期的内核编译,多多少少总会出现一些问题,网上写的贴子太完美了,只是不适用自己。今天上网终于发现新大陆了,有人狠批了那些发表编译内核文章的,想必他的就可用吧。结果真是,太好了!
我是按他一步步做的,这不是我的创新,我只是写了我所做的事!
1.首先下载了内核升级工具
module-init-tools-3.2.tar.bz2
mkinitrd-4.1.18-2.i386.rpm
lvm2-2.00.25-1.01.i386.rpm
device-mapper-1.00.19-2.i386.rpm
并且下载内核源码包:linux-2.6.18.tar.bz2
把这5个全部复制到/usr/src目录下
2.解压源码
#cd /usr/src
#rm -rf linux(没有linux就不用了)
#tar jvxf linux-2.6.18.tar.bz2
#ln -s linux-2.6.18 linux
3.安装module-init-tools工具
#tar jvxf module-init-tools-3.2.tar.bz2
#cd module-init-tools-3.2
#./configure --prefix=/
#make moveold
#make all install
#./generate-modprobe.conf /etc/modprobe.conf
4.安装rpm包
#rpm -ivh --nodeps mkinitrd-4.1.18-2.i386.rpm
#rpm -ivh --nodeps lvm2-2.00.25-1.01.i386.rpm
#rpm -ivh --nodeps device-mapper-1.00.19-2.i386.rpm
5.配置内核选项
#cd /usr/src/linux
#make mrproper
#make menuconfig (我试了下,make xconfig,make gconfig,make silentoldconfig都出错)
1)Loadable Module support选项中,选上“Module unloading”和“Automatic kernel module loading”这两项
2)Device Drivers--->Block Devices中选上“Loopback device support”;
Device Drivers--->Multi-device support(RAID and LVM)处要选上“device mapper support”;
Device Drivers--->Graphics support,一定要选上“ Support for frame. buffer devices”;
Device Drivers --->USB support --->选上“USB Mass Storage support”
3)File system--->(以下9个选项是关于ext2和ext3文件系统配置,全部选上)
Second extended fs support
Ext2 extended attributes
Ext2 POSIX Access Control Lists
Ext2 Security Labels
Ext3 journalling file system support
Ext3 extended attributes
Ext3 POSIX Access Control Lists
Ext3 Security Labels
JBB (ext3) debugging support
File system--->DOS/FAT/NT Filesystems --->选上“NTFS file system support”;
4)如果你在vmware下编译内核,硬盘用的是scsi的,以下三个选项必选:
Device Drivers ---><*>SCSI device support (此项不选的话,下面两项就选择不上)
Device Drivers ---><*>SCSI device support ---><*>SCSI disk support
Device Drivers---><8>SCSI device support--->SCSI low-level drivers---><*>; BusLogic SCSI support
6.编译内核
#make
#make modules
#make modules_install
#cp /usr/src/linux-2.6.18/drivers/scsi/BusLogic.o /lib/modules/2.6.18/kernel/drivers/scsi
#make install(自动完成,不需手动修改)
以上步骤完成后就可以重启系统,进入新的内核!
阅读(739) | 评论(0) | 转发(0) |