2)网卡驱动 请务必把自己网卡对应的驱动编译进内核,比较普遍的网卡是realtek 8139,以下就是这种网卡的配置,以供参考 Device Drivers---> Networking support---> Ethernet (10 or 100Mbit) ---> <*> RealTek RTL-8139 C+ PCI Fast Ethernet Adapter support (EXPERIMENTAL) <*> RealTek RTL-8139 PCI Fast Ethernet Adapter support
3)声卡驱动 也要选择自己声卡对应的驱动编译进内核,比较普遍的声卡是i810_audio,以下就是这种声卡的配置,以供参考 Device Drivers ---> Sound ---> <*> Sound card support Advanced Linux Sound Architecture ---> <*> Advanced Linux Sound Architecture <*> Sequencer support < > Sequencer dummy client <*> OSS Mixer API <*> OSS PCM (digital audio) API[*] OSS Sequencer API <*> RTC Timer support PCI devices ---> <*> Intel i8x0/MX440, SiS 7012; Ali 5455; NForce Audio; AMD768/8111 Open Sound System ---> < > Open Sound System (DEPRECATED) 以上三项配置关系到新内核能否正常运行,请备加注意.其他的配置如果不是很了解,大可以按默认的选择.
三、编译过程 按如下命令编译,大概需要一个多小时,大可以好好放松一下:-) make bzImage make modules make modules_install make install
运行新内核之前,请检查一下/boot/grub/grub.conf的内容,下面的配置可作参考 # grub.conf generated by anaconda # # Note that you do not have to rerun grub after making changes to this file # NOTICE: You have a /boot partition. This means that # all kernel and initrd paths are relative to /boot/, eg. # root (hd0,0) # kernel /vmlinuz-version ro root=/dev/hdc3 # initrd /initrd-version.img #boot=/dev/hdc default=1 timeout=10 splashimage=(hd0,0)/grub/splash.xpm.gz title Red Hat Linux (2.6.7) root (hd0,0) kernel /vmlinuz-2.6.7 ro root=LABEL=/ initrd /initrd-2.6.7.img title Red Hat Linux (2.4.20-8) root (hd0,0) kernel /vmlinuz-2.4.20-8 ro root=LABEL=/ initrd /initrd-2.4.20-8.img 四、运行内核的常见问题
1)RPM问题
进入编译好的内核后,与RPM相关的命令有些不能使用,并出现下列错误:
rpmdb: unable to join the environment error: db4 error(11) from dbenv->open: Resource temporarily unavailable error: cannot open Packages index using db3 - Resource temporarily unavailable (11) error: cannot open Packages database in /var/lib/rpm no packages 解决方法是执行“export LD_ASSUME_KERNEL =2.2.25”命令,也可以将其写入/etc/bashrc。