也可以search整个系统并看看相关的文字都在哪些文件出现:
#find /usr -name "*.*" -print -exec grep
-q -s mousedev {} \; -print
这个长命令很有用
8.4别忘了将你的配置保存到一个文件里,否则下次编译时又要重选!
Load Configuration from file
比如保存到/home/kilvon/conf/Kernel-kilvon.001
8.5用以下命令读取刚才的配置数据使之生效:
#make dep
#make clean
9.开始编译内核和模块
#make bzImage
#make modules
#make modules_install
10.将编译好的文件移到/boot下;如果上面某步有错,大部分情况是由于
配置内核选项时将一些当前版本只能编译为modules的选为编译到内核里,
我遇到好几次这样的情况.应为既然www.kernel.org发布一个稳定的内核,
(偶没down那些alpha,beta版)9成9可以成功的编译.
#move /usr/src/linux-2.4/System.map /boot/System.map-2.4.20-kilvon.001
#move /usr/src/linux-2.4/arch/i386/boot/bzImage
/boot/vmlinuz-2.4.20-kilvon.001
#rm -f System.map
#rm -f vmlinuz
#ln -s /boot/System.map-2.4.20-kilvon.001 /boot/System.map
#ln -s /boot/vmlinuz-2.4.20-kilvon.001 /boot/vmlinuz
11.作些收尾工作:
#new-kernel-pkg --install --depmod --mkinitrd 2.4.20-kilvon.001
--mkinitrd 作Initial Ramdisk的,可以直接敲个mkinitrd -h看看
--depmod 检查内核中有没有未解析的symbol
--install 在grub中安装一个启动选项
12.看看第7.2步的相关解释,现在请修改/boot/grub/grub.conf文件,
以下是修改后的grub.conf:
default=2
timeout=10
splashimage=(hd0,6)/grub/splash.xpm.gz
title Psyche (2.4.20-kilvon.001)
root (hd0,6)
kernel /vmlinuz-2.4.20-kilvon.001 ro root=/dev/hda8
initrd /initrd-2.4.20-kilvon.001.img
title Psyche (2.4.18-14 standard)
root (hd0,6)
kernel /vmlinuz-2.4.18-14.standard ro root=LABEL=/ hdc=ide-scsi
initrd /initrd-2.4.18-14.standard.img
title Windows 2000
rootnoverify (hd0,0)
chainloader +1
13.再好好检查一下/boot下的文件名是否敲对了(前面有好多的mv,cp动作)
[root@localhost boot]# ll
total 8880
5824 9月 6 04:53 boot.b
612 9月 6 04:53 chain.b
42150 9月 5 01:47 config-2.4.18-14
1024 3月 5 21:32 grub
130983 3月 5 03:49 initrd-2.4.18-14.img
130983 3月 4 20:21 initrd-2.4.18-14.standard.img
65499 3月 5 21:31 initrd-2.4.20-kilvon.001.img
473 3月 5 03:49 kernel.h
12288 3月 5 03:44 lost+found
23108 9月 6 22:05 message
21282 9月 6 22:05 message.ja
21 3月 5 03:49 module-info -> module-info-2.4.18-14
15436 9月 5 01:47 module-info-2.4.18-14
15436 3月 4 20:21 module-info-2.4.18.standard
16834 3月 5 21:17 MyKernelSetup-kilvon.001
640 9月 6 04:53 os2_d.b
28 3月 5 19:32 System.map -> System.map-2.4.20-kilvon.001
507814 9月 5 01:47 System.map-2.4.18-14
507814 3月 4 20:20 System.map-2.4.18-14.standard
588175 3月 5 21:24 System.map-2.4.20-kilvon.001
3236438 9月 5 01:47 vmlinux-2.4.18-14
31 3月 5 12:51 vmlinuz -> /boot/vmlinuz-2.4.20-kilvon.001
1125194 9月 5 01:47 vmlinuz-2.4.18-14
1125194 3月 4 20:19 vmlinuz-2.4.18-14.standard
1458790 3月 5 21:24 vmlinuz-2.4.20-kilvon.001
14.好了,来吧:
#reboot