免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 976 | 回复: 0
打印 上一主题 下一主题

[原创更新版]:Kernel Compiling (redhat 9, Kernel 2.4.20-8) [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2004-01-16 05:09 |只看该作者 |倒序浏览
Kernel Compiling (redhat 9, Kernel 2.4.20-

1.        Get the kernel version
bash # rpm –q kernel
2.        Download appropriate kernel source on RHN
3.        Install kernel source
4.        If you are recompiling, you’d better to run:
bash # make mrproper
to clean all configurations and the files created last compiling
5.        Configure kernel
In xWindows, start terminal
bash # cd /usr/src/linux2.4.20.8
bash # make xconfig

if you are using remote terminal, run:
bash # make menuconfig

Must be Enabled
File System ->; Ext3
Block Device ->; Loopback Device Support

Recommend
Don’t build in Network Device Driver and USB driver, I got trouble when I did that, esp., I have two different NIC

Backup config in kernel source root to another file if you want to recompile

6.        Check dependance and prepare to compile your kernel
bash # make dep
bash # make clean

7.        Compile and install modules
bash # make modules
bash # make modules_install

if you don’t do this, when you reboot your computer, you will see errors.

8.        Compile Kernel
bash # make install

if you want to trace the compiling history, you can use nohup to output the log to file as:

bash # nohup make install &
bash # tail –f nohup.out

9.        Now it is time to reboot your computer. You will see boot loader menu, by default, it starts the old kernel. If you want the new one, you can edit grub.conf
bash # vi /etc/grub/grub.conf
and change the line:
default=1
to:
default=0

10.        Trouble Shooting
If your kernel didn’t work properly, you can check from the following aspects (my personal experience, only as reference):
10.1        config
Normally, the kernel source is OK, if you made wrong configuration, you get problems, just keep patience to tune up your configuration, and keep a copy.
10.2        modules
Check /lib/modules/versioncustom whether the library has been updated, i.e. NIC driver in /lib/modules/2.4.20-8custom/kernel/drivers/net
10.3        boot loader (applicable to grub)
Check /boot and /boot/grub/grub.conf to make sure the links are correct.
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP