Installing a Linux-2.6.14+initrd on Sarge (nodevfs anymore)
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.
[ Parent | Reply to this comment ]
[ Parent | Reply to this comment ]
[ Send Message | View dopehouse's Scratchpad ]
#336418 = http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=336418
these are bug-numbers. you can use them at http://www.debian.org/Bugs/ just write them into the first box and hit the search-button.
[ Parent | Reply to this comment ]
[ Parent | Reply to this comment ]
[ Parent | Reply to this comment ]
The soundcard is configured ok, its modules are loaded, volume is up, and yet no sound. On boot, ALSA loads and prints "No soundcards found", though I think I had this line before (2.6.8) anyway.
I'm not so sure if this is related, but /var/log/messages has this message:
Nov 13 15:26:35 localhost kernel: klogd 1.4.1#17, log source = /proc/kmsg started.
Nov 13 15:26:35 localhost kernel: Inspecting /boot/System.map-2.6.14.2
Nov 13 15:26:35 localhost kernel: Loaded 25187 symbols from /boot/System.map-2.6.14.2.
Nov 13 15:26:35 localhost kernel: Symbols match kernel version 2.6.14.
Nov 13 15:26:35 localhost kernel: No module symbols loaded - kernel modules not enabled.
Notice the last line. I believe this is not good.
Module autoloading is supported in the kernel, plus the module-init-tools package is installed properly.
What can I do?
[ Parent | Reply to this comment ]
[ Parent | Reply to this comment ]
DevFS is also a pain in the ass, programmers who write these 2 eat my shit.
GreetZ
Oneill
[ Parent | Reply to this comment ]
what about
umount /dev (if it's on devfs)
cd /dev
./MAKEDEV most
and install 2.6.14 kernel? I do it like this. Okay, not so nice than having udev, but MUCH nicer than this hack.
[ Parent | Reply to this comment ]
i got the debian source "linux-source-2.4.16" from the unstable tree,
!! Only the linux-source-2.4.16.tar.bz2.
i installed udev, and compiled my new kernel.
( apt-get install udev )
everything is working fine for me
i installed sarge on a Dell Power Edge 2850
there for i needed a new kernel..
[ Parent | Reply to this comment ]
[ Parent | Reply to this comment ]
[ Parent | Reply to this comment ]
i encountered a similar problem and solved the problem as i stated above, but then again i was booting 2.4.27 on a legacy woody server with initrd-tools backported from sarge (by backports.org), so maybe not similar enough to make a comparision to your situation.
[ Parent | Reply to this comment ]
As a newbie, I liked this one:
http://newbiedoc.sourceforge.net/system/kernel-pkg.html
which does not use initrd (you need all the hardware modules built into the kernel for it to boot - don't forget ide/scsi so the init can transfer from the kernel to the disk). I got this working for kernel-source-2.6.8-16 on sarge for a DELL precision M50 laptop. I have no idea if it will work with later kernel source.
[ Parent | Reply to this comment ]
I've heard an old hand on the local LUG newsgroup proclaim that he doesn't roll his own kernels anyway. And the new kernel.org regime (still?) expects us to use distribution-kernels anway...
So, what gives?
(About to dust of my kernel building knowledge... I jumped to 1G RAM barrier (to 1.7G) and now need a HIGHMEM kernel, so I thought it should be a good excuse to migrate to 2.6 on this Debian system. But I hate initrd (never used before, never want to))
[ Parent | Reply to this comment ]
[ Parent | Reply to this comment ]
1. Got the hell away from RPM distros and went on to more flexible options. After
many installs of various flavors, I settled on Debian. Not a spin-off, but just plain old Debian.
2. Learned how to compile my own kernel. It's a great learning process and it's nice to know exactly what's going on "under the hood".
[ Parent | Reply to this comment ]
I could not use this command"fakeroot make deb-pkg".
It found no rule to...target 'dep-pkg'.
What can I do?
Please tell me,thank you.
[ Parent | Reply to this comment ]
'make-kpkg' is probably the best way to build a 2.4 kernel. You must install 'kernel-package' package to get this command.
[ Parent | Reply to this comment ]
http://ftp.de.debian.org/debian/pool/main/y/yaird/yaird_0.0.12-9_ i386.deb
[ Parent | Reply to this comment ]