Vmware下成功编译linux内核2.6

 

编译内核确实是个让人窒息和苦闷的过程,经过几天的努力,今天终于顺利通过。感谢好友“编程夜未眠”的技术支持

我是在Vmware下装的Red Hat 9,下载了linux的内核版本 2.6.14 .4

1)解压至/usr/src目录下,注意必须得在linux中解压

2)进入解压后的目录,$make menuconfig(基于X11的图形内核配置工具)。注意,在Vmware下以下选项必须选上,否则编译要出问题:

      Device Drivers  --->SCSI device support  ---><*> SCSI disk support

Device Drivers  --->SCSI device support  --->SCSI low-level drivers  ---> <*> BusLogic SCSI support

Device Drivers  ---> Fusion MPT device support  ---><M> Fusion MPT (base + ScsiHost) drivers<M> Fusion MPT misc device (ioctl) driver(这个不确定)

Device Drivers  ---> USB support  ---><*> USB Mass Storage support

Device Drivers  ---> Networking support --->Ethernet (10 or 100Mbit)  ---> <*> AMD PCnet32 PCI support

最好把ext3文件系统支持也编译进内核(我这个版本默认是模块形式)

     <*> Ext3 journalling file system support
 <*>Ext3 extended attributes
 <*>Ext3 POSIX Access Control Lists
 <*>Ext3 Security Labels
 <*>JBB (ext3) debugging support

3)编译内核,$make(为了将无用的输出信息重定向到永无返回的黑洞,可以运行$make > /dev/null)

      4)安装内核,$make bzImage(产生压缩内核,可以不要)

$ cp /usr/src/linux- 2.6.14 .4/arch/i386/boot/bzImage  /boot/newkernel

           编辑 /etc/grub.conf文件,为新内核建立一个启动项,添加以下内容:

                     title NewKernel ( 2.6.14 .4)

                         root (hd0,0)

                     kernel  /newkernel ro root=/dev/sda2

  (5)安装模块,$make modules(编译模块,可以不要)

               $make modules_install(安装模块)

(6)$reboot 看看效果

    后记:如果你运气和RP实在是很好,看了我的文章,也许你可以一次就成功,那种成功的喜悦是很爽的 作者可是花了n个小时。

你可能感兴趣的:(vmware,ext,attributes,networking,debugging,linux内核)