LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 694|回复: 1

小菜请教各位Debian编译内核的问题

[复制链接]
发表于 2005-7-24 14:33:28 | 显示全部楼层 |阅读模式
我从前在RedHat/FC上编译内核,都是make;make modules;make modules_install;make install;然后可以在grub的menu.list里看到新的启动项,而且initrd.img-*这个文件也生成好了。
现在在Debian上编译,同样的过程,需要自己配置grub,生成initrd.img这个文件。

请问此时还需要做哪些工作?只生成initrd.img这个文件就可以了吗?
initrd.img这个文件怎么生成啊?
发表于 2005-7-24 14:53:16 | 显示全部楼层
You can do a search in the Debian page for hints in compiling kernel in Debian.

Actually, you can use the following command as root to build your own kernel package:

#tar jxf linux-2.6.xxx
#cd linux-2.6.xxx
#make mrproper
#make menuconfig

#make-kpkg --append-to-version -custom kernel-image

Once finish, you will have a kernel-image-2.6.xxx-custom-*.deb in your parent directory. So:

#cd ..

Install this newly built kernel with dpkg -i,

#dpkg -i kernel-image-2.6.xxx-custom-*.deb

It should automatically update your menu.lst.

If you want to create a initrd, you should make sure you have installed the initrd-tools package.

The following steps are optional:
1. edit /etc/mkinitrd/modules to add the modules you want to load in the initrd
2. edit /etc/mkinitrd/mkinitrd.conf to make changes that suit your need.

If no changes are needed or you finish making changes, then you may create the initrd by:

#mkinitrd -o initrd.img kernel-version

Copy this initrd.img to /boot and make change to your menu.lst.
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表