CentOS5内核版本升级
<p style="margin-top: 10px; margin-bottom: 10px; color: rgb(51, 51, 51); background-color: rgb(248, 248, 248); text-indent: 28px; font-family: 宋体; line-height: 28px;"><span style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);">yum -y install ncurses-devel </span><br style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"><span style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);">cd /usr/src/kernels/ </span><br style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"><span style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);">下载内核源码 </span><br style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"><span style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);">wget http://www.kernel.org/pub/linux/kernel/v3.0/linux-3.2.13.tar.bz2 </span><br style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"><span style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);">tar vxjf linux-3.2.13.tar.bz2 </span><br style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"><span style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);">cd linux-3.2.13 </span><br style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"><br style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"><span style="font-family: Verdana, Arial, Helvetica, sans-serif, 宋体; line-height: 22.390625px; text-indent: 0px; background-color: rgb(255, 255, 255);">make mrproper 清除环境变量,即清除配置文件</span><span style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"> </span><br style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"><span style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);">make menuconfig </span><br style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"><span style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);">请一定要加上下面的选项,你如果仅仅是想测试的话,别的不动都可以的。 </span></p><p style="margin-top: 10px; margin-bottom: 10px; color: rgb(51, 51, 51); background-color: rgb(248, 248, 248); text-indent: 28px; font-family: 宋体; line-height: 28px;"><span style="font-family: Verdana, Arial, Helvetica, sans-serif, 宋体; line-height: 22.390625px; text-indent: 0px; background-color: rgb(255, 255, 255);">make menuconfig添加如下选项</span><br style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"><span style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);">General setup ---> </span><br style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"></p><li style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px;">Enable deprecated sysfs features to support old userspace tools</li><li style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px;"> Enable deprecated sysfs features by default </li><p style="margin-top: 10px; margin-bottom: 10px; color: rgb(51, 51, 51); background-color: rgb(248, 248, 248); text-indent: 28px; font-family: 宋体; line-height: 28px;"><br style="line-height: 22.390625px; font-family: Verdana, Arial, Helvetica, sans-serif, 宋体; text-indent: 0px; background-color: rgb(255, 255, 255);"><b style="line-height: 22.390625px; font-family: Verdana, Arial, Helvetica, sans-serif, 宋体; text-indent: 0px; background-color: rgb(255, 255, 255);">Device Drivers ---> <br style="line-height: 1.6em;"> <m style="line-height: 1.6em;">Serial ATA (prod) and Parallel ATA (experimental) drivers</m></b></p><p style="border: 0px; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px; margin-bottom: 1.625em; outline: 0px; vertical-align: baseline; color: rgb(55, 55, 55); line-height: 24px;">networking support—>networking options—>network packet filtering framework(netfilter)<span id="more-10347" style="border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; outline: 0px; vertical-align: baseline;"></span></p><p style="border: 0px; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px; margin-bottom: 1.625em; outline: 0px; vertical-align: baseline; color: rgb(55, 55, 55); line-height: 24px;">(1) core netfilter configuration<br>A 勾中”Netfilter connection tracking support” -m state相关模块是依赖它的,不选则没有。<br>B 将netbios name service protocal support(new) 编译成模块,不然后面升级iptables后启动时会出错<br>C 勾中“Netfilter Xtables support (required for ip_tables)”<br>(2) IP: Netfilter Configuration<br>A 将 “IPv4 connection tracking support (require for NAT)” 编译成模块。<br>B 勾中IP tables support (required for filtering/masq/NAT) 。<br>C 将 “Full NAT” 下的 “MASQUERADE target support” 和 “REDIRECT target support” 编译成模块</p><p style="margin-top: 10px; margin-bottom: 10px; color: rgb(51, 51, 51); background-color: rgb(248, 248, 248); text-indent: 28px; font-family: 宋体; line-height: 28px;"><br></p><p style="margin-top: 10px; margin-bottom: 10px; color: rgb(51, 51, 51); background-color: rgb(248, 248, 248); text-indent: 28px; font-family: 宋体; line-height: 28px;"><br style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"><span style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);">cp include/linux/hidraw.h /usr/include/linux/ </span><br style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"><span style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);">cp include/linux/hid.h /usr/include/linux/ </span></p><p style="margin-top: 10px; margin-bottom: 10px; color: rgb(51, 51, 51); background-color: rgb(248, 248, 248); text-indent: 28px; font-family: 宋体; line-height: 28px;"><br style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"><span style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);">vim samples/hidraw/hid-example.c </span><br style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"><span style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);">( </span><br style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"><span style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);">在Linux下编译程序有时会遇到这种问题,这貌似是一个Linux历史遗留问题: </span><br style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"><span style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);">把所有#include <sys/xxx.h>都提到最前面,把#include <linux/xxx.h>的包含放在其后,就可以编译通过了,之所以出现面的问题是存在循环引用所致。 </span><br style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"><span style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);">) </span><br style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"><br style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"><span style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);">将13-15行的如下3行移动到33行以后。 </span><br style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"><br style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"><span style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"> 13 #include <linux/types.h> </span><br style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"><span style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"> 14 #include <linux/input.h> </span><br style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"><span style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"> 15 #include <linux/hidraw.h> </span><br style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"><br style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"><span style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"> 29 #include <sys/ioctl.h> </span><br style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"><span style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"> 30 #include <sys/types.h> </span><br style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"><span style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"> 31 #include <sys/stat.h> </span><br style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"><span style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"> 32 #include <fcntl.h> </span><br style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"><span style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"> 33 #include <unistd.h> </span><br style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"><br style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"><span style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);">vim /usr/include/linux/input.h </span><br style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"><br style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"><span style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);">line 647 </span><br style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"><span style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);">#define BUS_PCI 0x01 </span><br style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"><span style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);">#define BUS_ISAPNP 0x02 </span><br style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"><span style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);">#define BUS_USB 0x03 </span><br style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"><span style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);">#define BUS_HIL 0x04 </span><br style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"><span style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);">#define BUS_BLUETOOTH 0x05 </span><br style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"><span style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);">/*以下一行为新增*/ </span><br style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"><span style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);">#define BUS_VIRTUAL 0x06 </span><br style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"><br style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"><span style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);">#define BUS_ISA 0x10 </span><br style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"><span style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);">#define BUS_I8042 0x11 </span><br style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"><span style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);">#define BUS_XTKBD 0x12 </span><br style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"><span style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);">#define BUS_RS232 0x13 </span><br style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"><span style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);">#define BUS_GAMEPORT 0x14 </span><br style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"><span style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);">#define BUS_PARPORT 0x15 </span><br style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"><span style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);">#define BUS_AMIGA 0x16 </span><br style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"><span style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);">#define BUS_ADB 0x17 </span><br style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"><span style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);">#define BUS_I2C 0x18 </span><br style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"><span style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);">#define BUS_HOST 0x19 </span><br style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"><span style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);">#define BUS_GSC 0x1A </span><br style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"><span style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);">/*以下两行为新增*/ </span><br style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"><span style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);">#define BUS_ATARI 0x1B </span><br style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"><span style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);">#define BUS_SPI 0x1C </span><br style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"><br></p><p style="margin-top: 10px; margin-bottom: 10px; color: rgb(51, 51, 51); background-color: rgb(248, 248, 248); text-indent: 28px; font-family: 宋体; line-height: 28px;"><br></p><p style="margin-top: 10px; margin-bottom: 10px; color: rgb(51, 51, 51); background-color: rgb(248, 248, 248); text-indent: 28px; font-family: 宋体; line-height: 28px;">make clean 确保所有东西均保持最新状态.</p><p style="margin-top: 10px; margin-bottom: 10px; color: rgb(51, 51, 51); background-color: rgb(248, 248, 248); text-indent: 28px; font-family: 宋体; line-height: 28px;">make bzImage 生成内核文件</p><p style="margin-top: 10px; margin-bottom: 10px; color: rgb(51, 51, 51); background-color: rgb(248, 248, 248); text-indent: 28px; font-family: 宋体; line-height: 28px;">make modules 编译模块</p><p style="margin-top: 10px; margin-bottom: 10px; color: rgb(51, 51, 51); background-color: rgb(248, 248, 248); text-indent: 28px; font-family: 宋体; line-height: 28px;">make modules_install 安装模块</p><p style="margin-top: 10px; margin-bottom: 10px; color: rgb(51, 51, 51); background-color: rgb(248, 248, 248); text-indent: 28px; font-family: 宋体; line-height: 28px;">make install 安装</p><p style="margin-top: 10px; margin-bottom: 10px; color: rgb(51, 51, 51); background-color: rgb(248, 248, 248); text-indent: 28px; font-family: 宋体; line-height: 28px;"><br style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"><span style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);">#设置使用新内核启动。 </span><br style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"><span style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);">sed -i 's#default=1#default=0#g' grub.conf </span><br style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"><br style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"><span style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);">........test new kernel....... </span><br style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"><br style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"><span style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);">uname -a </span></p><p style="margin-top: 10px; margin-bottom: 10px; color: rgb(51, 51, 51); background-color: rgb(248, 248, 248); text-indent: 28px; font-family: 宋体; line-height: 28px;"><br></p><p style="margin-top: 10px; margin-bottom: 10px; color: rgb(51, 51, 51); background-color: rgb(248, 248, 248); text-indent: 28px; font-family: 宋体; line-height: 28px;"><br style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"><span style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);">---------------------------------------------------------------- </span><br style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"><br style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"><span style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);">修改/boot/grub/grub.conf 里面有个default=0 0表示第一个,1表示第二个,一次类推。例如我的文件是这样的。 </span><br style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"><br style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"><span style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"># grub.conf generated by anaconda </span><br style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"><span style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"># </span><br style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"><span style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"># Note that you do not have to rerun grub after making changes to this file </span><br style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"><span style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"># NOTICE: You have a /boot partition. This means that </span><br style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"><span style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"># all kernel and initrd paths are relative to /boot/, eg. </span><br style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"><span style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"># root (hd0,0) </span><br style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"><span style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"># kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol00 </span><br style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"><span style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"># initrd /initrd-version.img </span><br style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"><span style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);">#boot=/dev/hda </span><br style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"><span style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);">default=0 </span><br style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"><span style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);">timeout=5 </span><br style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"><span style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);">splashimage=(hd0,0)/grub/splash.xpm.gz </span><br style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"><span style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);">hiddenmenu </span><br style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"><span style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);">title CentOS (2.6.25linux1610-2.6) </span><br style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"><span style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"> root (hd0,0) </span><br style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"><span style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"> kernel /vmlinuz-2.6.25linux1610-2.6 ro root=/dev/VolGroup00/LogVol00 </span><br style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"><span style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"> initrd /initrd-2.6.25linux1610-2.6.img </span><br style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"><span style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);">title CentOS (2.6.18-92.el5) </span><br style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"><span style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"> root (hd0,0) </span><br style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"><span style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"> kernel /vmlinuz-2.6.18-92.el5 ro root=/dev/VolGroup00/LogVol00 </span><br style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"><span style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"> initrd /initrd-2.6.18-92.el5.img </span><br style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"><span style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);">我的default=0,那么我就是默认启动下面这个我最新编译的了。 </span><br style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"><span style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);">title CentOS (2.6.25linux1610-2.6) </span><br style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"><span style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"> root (hd0,0) </span><br style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"><span style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"> kernel /vmlinuz-2.6.25linux1610-2.6 ro root=/dev/VolGroup00/LogVol00 </span><br style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"><span style="color: rgb(0, 0, 0); font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25.1875px; text-indent: 0px; background-color: rgb(255, 255, 255);"> initrd /initrd-2.6.25linux1610-2.6.img </span></p><p></p> <p style="margin-top: 10px; overflow: hidden; line-height: 22.390625px; color: rgb(51, 51, 51); font-family: Verdana, Arial, Helvetica, sans-serif, 宋体;">在实践过程中,我根本就没有手动去修改grub的配置信息,在运行make install命令的时候,就给帮你更新了grub的配置。</p><p style="margin-top: 10px; overflow: hidden; line-height: 22.390625px; color: rgb(51, 51, 51); font-family: Verdana, Arial, Helvetica, sans-serif, 宋体;">先别急着重启机子,看看下面问题再说。</p><p style="margin-top: 10px; overflow: hidden; line-height: 22.390625px; color: rgb(51, 51, 51); font-family: Verdana, Arial, Helvetica, sans-serif, 宋体;"> </p><h3 style="overflow: hidden; line-height: 1.6em; color: rgb(51, 51, 51); font-family: Verdana, Arial, Helvetica, sans-serif, 宋体;"><font style="line-height: 1.6em;">解决问题</font></h3><p style="margin-top: 10px; overflow: hidden; line-height: 22.390625px; color: rgb(51, 51, 51); font-family: Verdana, Arial, Helvetica, sans-serif, 宋体;"> </p><hr style="line-height: 22.390625px; color: rgb(51, 51, 51); font-family: Verdana, Arial, Helvetica, sans-serif, 宋体;"><p style="margin-top: 10px; overflow: hidden; line-height: 22.390625px; color: rgb(51, 51, 51); font-family: Verdana, Arial, Helvetica, sans-serif, 宋体;">内核升级的过程都是相似的,遇到的问题却各有各的不同。——KiKi</p><p style="margin-top: 10px; overflow: hidden; line-height: 22.390625px; color: rgb(51, 51, 51); font-family: Verdana, Arial, Helvetica, sans-serif, 宋体;"><strong style="line-height: 1.6em;">问题1 <br style="line-height: 1.6em;"></strong>问题描述:重启系统会报错”insmod: error inserting ‘/lib/dm-region-hash.ko’: –1 File exits”,</p><p style="margin-top: 10px; overflow: hidden; line-height: 22.390625px; color: rgb(51, 51, 51); font-family: Verdana, Arial, Helvetica, sans-serif, 宋体;">原因: 在init文件中重复了insmod dm-region-hash.ko这条命令。</p><p style="margin-top: 10px; overflow: hidden; line-height: 22.390625px; color: rgb(51, 51, 51); font-family: Verdana, Arial, Helvetica, sans-serif, 宋体;">解决方法:</p><p style="margin-top: 10px; overflow: hidden; line-height: 22.390625px; color: rgb(51, 51, 51); font-family: Verdana, Arial, Helvetica, sans-serif, 宋体;">cp /boot/initrd-2.6.30.img /tmp<br style="line-height: 1.6em;">cd /tmp/<br style="line-height: 1.6em;">mkdir newinitrd<br style="line-height: 1.6em;">cd newinitrd/<br style="line-height: 1.6em;">zcat ../initrd-2.6.30.img |cpio -i<br style="line-height: 1.6em;">vi init 删掉重复的如下两行:<br style="line-height: 1.6em;">echo “Loading dm-region-hash.ko module”<br style="line-height: 1.6em;">insmod /lib/dm-region-hash.ko<br style="line-height: 1.6em;"># find .|cpio -c -o > ../initrd<br style="line-height: 1.6em;">14765 blocks<br style="line-height: 1.6em;"># cd ..<br style="line-height: 1.6em;"># gzip -9 < initrd > initrd-2.6.30.img<br style="line-height: 1.6em;"># ls<br style="line-height: 1.6em;">gconfd-root initrd initrd-2.6.30.img mapping-root newinitrd scim-panel-socket:0-root<br style="line-height: 1.6em;"># mv /boot/initrd-2.6.30.img /home/<br style="line-height: 1.6em;"># cp initrd-2.6.30.img /boot/<br style="line-height: 1.6em;">#reboot</p><p style="margin-top: 10px; overflow: hidden; line-height: 22.390625px; color: rgb(51, 51, 51); font-family: Verdana, Arial, Helvetica, sans-serif, 宋体;"><br style="line-height: 1.6em;"><strong style="line-height: 1.6em;">问题2</strong><br style="line-height: 1.6em;">问题描述:重启之后却进不了系统。提示如下cound not find filesystem /dev/root.<br style="line-height: 1.6em;"><img border="0" alt="could not find filesystem /dev/root - nm - wzk_1 的博客" src="http://img.blog.163.com/photo/OlFx3vw8o1ppobxlzPJ9Aw==/5089630528883891858.jpg" style="border: medium none; line-height: 1.6em;"></p><p style="margin-top: 10px; overflow: hidden; line-height: 22.390625px; color: rgb(51, 51, 51); font-family: Verdana, Arial, Helvetica, sans-serif, 宋体;">原因有可能是:<br style="line-height: 1.6em;">A:是由于无法加载磁盘硬件的模块驱动。<br style="line-height: 1.6em;">解决方式主要是通过make menuconfig中加载sata scsi的devices设备模块驱动。</p><p style="margin-top: 10px; overflow: hidden; line-height: 22.390625px; color: rgb(51, 51, 51); font-family: Verdana, Arial, Helvetica, sans-serif, 宋体;"># make menuconfig添加如下选项<br style="line-height: 1.6em;"><b style="line-height: 1.6em;">Device Drivers ---> <br style="line-height: 1.6em;"> <m style="line-height: 1.6em;">Serial ATA (prod) and Parallel ATA (experimental) drivers</m></b></p><p style="margin-top: 10px; overflow: hidden; line-height: 22.390625px; color: rgb(51, 51, 51); font-family: Verdana, Arial, Helvetica, sans-serif, 宋体;">常用的驱动模块如下:</p><pre style="line-height: 22.390625px; color: rgb(51, 51, 51);">insmod /lib/uhci-hcd.koinsmod /libohci-hcd.ko
insmod /lib/ehci-hcd.ko
insmod /lib/jbd.ko
insmod /lib/ext3.ko
insmod /lib/scsi_mod.ko
insmod /lib/sd_mod.ko
insmod /lib/libata.ko
<b style="line-height: 1.6em;">insmod /lib/ahci.ko<br style="line-height: 1.6em;"></b></pre><p style="border: 0px; font-family: simsun, Helvetica, Arial, sans-serif; outline: 0px; vertical-align: baseline; margin-top: 8px; margin-bottom: 8px; line-height: 26px; color: rgb(51, 51, 51); letter-spacing: 0.5px;"><br style="line-height: 22.390625px; font-family: Verdana, Arial, Helvetica, sans-serif, 宋体; letter-spacing: normal;"><span style="font-family: Verdana, Arial, Helvetica, sans-serif, 宋体; letter-spacing: normal; line-height: 22.390625px;">B: initrd是旧版本mkinitrd生成的。</span></p><p style="margin-top: 10px; overflow: hidden; line-height: 22.390625px; color: rgb(51, 51, 51); font-family: Verdana, Arial, Helvetica, sans-serif, 宋体;">解决方法就是加入对旧版sysfs路径的支持,方法如下:</p><blockquote style="line-height: 22.390625px; color: rgb(51, 51, 51); font-family: Verdana, Arial, Helvetica, sans-serif, 宋体;"><p style="margin-top: 10px; overflow: hidden; line-height: 1.6em;">1)、通过make menuconfig选中以下对应的选项</p></blockquote><blockquote style="line-height: 22.390625px; color: rgb(51, 51, 51); font-family: Verdana, Arial, Helvetica, sans-serif, 宋体;"><p style="margin-top: 10px; overflow: hidden; line-height: 1.6em;"><strong style="line-height: 1.6em;">General setup –> <br style="line-height: 1.6em;">[*] enable deprecated sysfs features to support old userspace tools</strong></p></blockquote><blockquote style="line-height: 22.390625px; color: rgb(51, 51, 51); font-family: Verdana, Arial, Helvetica, sans-serif, 宋体;"><p style="margin-top: 10px; overflow: hidden; line-height: 1.6em;">2)、修改.config文件</p></blockquote><p style="margin-top: 10px; overflow: hidden; line-height: 22.390625px; color: rgb(51, 51, 51); font-family: Verdana, Arial, Helvetica, sans-serif, 宋体;"> 修改.config文件中CONFIG_SYSFS_DEPRECATED_V2,将原本被注释掉的</p><p style="margin-top: 10px; overflow: hidden; line-height: 22.390625px; color: rgb(51, 51, 51); font-family: Verdana, Arial, Helvetica, sans-serif, 宋体;"> CONFIG_SYSFS_DEPRECATED_V2 改成CONFIG_SYSFS_DEPRECATED_V2=y</p><p style="margin-top: 10px; overflow: hidden; line-height: 22.390625px; color: rgb(51, 51, 51); font-family: Verdana, Arial, Helvetica, sans-serif, 宋体;">注 : 修改这项是因为旧版的mkinitrd及其nash在内核没有CONFIG_SYSFS_DEPRECATED_V2参数时默认使用旧版sysfs路 径格式,从而在新内核下无法正确访问/sys内的硬盘信息节点。</p><p style="margin-top: 10px; overflow: hidden; line-height: 22.390625px; color: rgb(51, 51, 51); font-family: Verdana, Arial, Helvetica, sans-serif, 宋体;"> </p><p style="margin-top: 10px; overflow: hidden; line-height: 22.390625px; color: rgb(51, 51, 51); font-family: Verdana, Arial, Helvetica, sans-serif, 宋体;">而本人是因为在编译内核的时候,没有添加sata硬盘的内核驱动模块,导致系统无法识别SATA硬盘,所以没法进入系统。属于原因A。</p>
页:
[1]