|
|
根据http://www.howtoforge.com/kernel_compilation_debian此文,我的当前内核是2.4.27升级到2.6.20.4
做到第8步:
8 Create A Ramdisk
Now we must create a ramdisk for our new kernel. Normally we do this with mkinitrd, but our new kernel uses udev instead of devfs, and you'll most likely get this error message with an mkinitrd generated ramdisk during boot-up:
mount: unknown filesystem type 'devfs'
which might lead to a kernel panic.
The new way of creating ramdisks is with mkinitrd.yaird. Backports.org has a yaird package for Debian Sarge. Before we can install it, we must install two prerequisites:
apt-get install libhtml-template-perl libparse-recdescent-perl
Then we install yaird like this:
cd /tmp
wget http://downloads.howtoforge.com/files/yaird_0.0.12-8bpo1_i386.deb
dpkg -i yaird_0.0.12-8bpo1_i386.deb
(The original yaird package was located in http://backports.org/debian/pool/main/y/yaird/, but was removed in the meantime, so I've made the package available under http://downloads.howtoforge.com/files/yaird_0.0.12-8bpo1_i386.deb.)
Before we can create the new ramdisk, we must edit the configuration file of our new kernel which you can find in the /boot directory (run
ls -l /boot
to find out). In this tutorial it's called /boot/config-2.6.18.3-default1, and in that file we must comment out the line CONFIG_DEFCONFIG_LIST (towards the beginning of the file) because otherwise mkinitrd.yaird will throw an error like this at us:
yaird error: bad value in /boot/config-2.6.18.3-default1: CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" (fatal)
So we do this:
vi /boot/config-2.6.18.3-default1
[...]
# CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
[...]
Now we can finally create our ramdisk like this:
运行此语句出错:
[color="Red"]mkinitrd.yaird -o /boot/initrd.img-2.6.18.3-default1 2.6.18.3-default1
错误信息:
[color="Red"]yaird error: can't open /proc/bus/input/devices (fatal)
然后我查看该目录,发现/proc/bus下没有input目录。
这是什么原因呢?在menuconfig时,我是先load 2.4的.config,然后没做改动再保存。是需要配置什么吗?:ask :ask :ask :ask |
|