Posted by jcdr on Sat 12 Nov 2005 at 01:21
Until recently I used the default 2.6.8 kernel included into Sarge. When I tryed to install a vanilla 2.6.14 kernel I faced the "no devfs" problem. It's not that I forgot to turn on "devfs": "devfs" in not part of the Linux kernel anymore. The "udev" subsystem replace "devfs" and it's easy to install it into Sarge.
I used the following command:
apt-get -y install udevI compiled the kernel by using the Debian package support found into the kernel source code, not by using the "make-kpkg" because it failed with this kernel (into the documentation creation if I remember correctly). To create a Debian package with the kernel source code tools simply use the following command:
fakeroot make deb-pkgWhen this operation is finish you get a "deb" package into the parent folder, and you can install it with the following command:
dpkg -i kernel-image_2.6.14-2.6.14.debNow begin the problem if you use "initrd". If you make an "mkinitrd -o /boot/initrd.img-2.6.14 2.6.14" and update your boot loader your 2.6.14 kernel will fail because the "initrd-tools" into Sarge require "devfs", and since "devfs" is not into your kernel, it fail to mount the root filesystem. I tryed to use the "initrd-tools" from unsable, but the problem remain. After searching a while on the net I discovered that there is at least two others tools to create an initrd image: "initramfs-tools" and "yaird". Because of too may dependency problems, "initramfs-tools" is difficult to install into Sarge. But "yaird" only have one dependency problem against the libc6. First I download it, then install the packages it depend on, and forced it installation like this:
wget http://ftp.de.debian.org/debian/pool/main/y/yaird/yaird_0.0.11-11_i386.deb apt-get -y install libhtml-template-perl libparse-recdescent-perl dpkg -i --force-all yaird_0.0.11-11_i386.debOf course the name of the package will change over time, and you must consult the package search tools into the Debian web site to find the correct version. To shut down the dependency problem with the libc6, I edited the /var/lib/dpkg/status file and removed the "(>= 2.3.5-1)" after the "libc6" word. Ok, this is a very dirty hack, but I don't know an other way at this time. You can try to do this with the following commands, at your own risk:
mv /var/lib/dpkg/status /var/lib/dpkg/status.orig cat /var/lib/dpkg/status.orig | sed "s/Depends: libc6 (>= 2.3.5-1), perl (>= 5.6.0-16), libhtml-template-perl, dash, libparse-recdescent-perl, cpio/Depends: libc6, perl (>= 5.6.0-16), libhtml-template-perl, dash, libparse-recdescent-perl, cpio/" > /var/lib/dpkg/status diff -u0 /var/lib/dpkg/status.orig /var/lib/dpkg/statusThe result of the diff must look like this:
--- /var/lib/dpkg/status.orig 2005-11-09 02:25:47.000000000 +0100 +++ /var/lib/dpkg/status 2005-11-09 02:27:15.000000000 +0100 @@ -6634 +6634 @@ -Depends: libc6 (>= 2.3.5-1), perl (>= 5.6.0-16), libhtml-template-perl, dash, libparse-recdescent-perl, cpio +Depends: libc6, perl (>= 5.6.0-16), libhtml-template-perl, dash, libparse-recdescent-perl, cpioNow that you have the right tools to make yout initrd image you can use it with the following commands:
rm /boot/initrd.img-2.6.14 mkinitrd.yaird -o /boot/initrd.img-2.6.14 2.6.14 update-grubThe last line update your boot loader and must be adapted to your system if you don't use GRUB. If everything work like with my machine, you should be able to reboot with your vanilla 2.6.14 kernel. As a side note: yaird create a initrd image based on "cpio" format instead of "cramfs", so you can disable "carmfs" into the kernel configuration.