2. The Problem

Normally, you want to have a drop-in replacement for a generic Debian kernel, with a (as much as possible) identical configuration, an initial ramdisk, hundreds of modules, nearly nothing built-in. Your preferred way of doing it would be


# wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.14.tar.bz2
# tar xjf linux-2.6.14.tar.bz2
# ln -s linux-2.6.14 linux
# cd linux
# cp some-old-dot-config .config
# make oldconfig
# make menuconfig
# make-kpkg clean
# make-kpkg --initrd --append-to-version=serial-cputype --revision=revision kernel-image
# dpkg -i ../kernel-image-whatever.deb
# reboot

For 2.6.14 on Sarge, this does not work, however. The reason for this is that the initial ram disk created by mkinitrd during the dpkg -i call relies on devfs, which is no longer available in 2.6.14.

It has been proposed to populate the /dev directory on your root filesystem manually with device files with something like cd /dev && ./MAKEDEV most. This is no option, however, if you have probably fast-changing device numbers like when using the device mapper, for example.

Another option may be to build a kernel which needs no initial ramdisk. This again fails if your root is on lvm since you have no device file for it there. Besides that, your kernel grows rather big if you want to support a lot of machines since all disk controllers, all filesystems must be built-in. Perhaps you will build a lot of kernels if you have to support a lot of machines. The single drop-in replacement kernel is no longer available.

Shortly: you want to have a working initial ramdisk for good reasons. As we learn from the experimental distribution of Debian, this is also the direction in which the Debian developers are going. One possible implementation of such an initial ramdisk is yaird. However, instead of forcing the installation of Debian's binary yaird package from the experimental distribution, as it has been proposed in the article on debian-administration.org, we backport yaird to Sarge. Furthermore, we also backport kernel-package since the version from sid can create kernel image packages which use yaird. The actual steps are described in the following section.