Installing a Linux-2.6.14+initrd on Sarge (nodevfs anymore)

Posted by jcdr on Sat 12 Nov 2005 at 01:21

Tags:

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 udev
I 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-pkg
When 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.deb
Now 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.deb
Of 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/status
The 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, cpio
Now 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-grub
The 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.

 

 


Posted by markybob (67.163.xx.xx) on Sat 12 Nov 2005 at 03:08
for those who care. #336724 & #336418

[ Parent | Reply to this comment ]

Posted by Anonymous (87.74.xx.xx) on Sat 12 Nov 2005 at 10:38
WTF?

[ Parent | Reply to this comment ]

Posted by dopehouse (84.130.xx.xx) on Sat 12 Nov 2005 at 11:16
[ View dopehouse's Scratchpad ]
#336724 = http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=336724
#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 ]

Posted by Anonymous (84.163.xx.xx) on Mon 5 Dec 2005 at 14:48
Even simpler: just write "bugs.debian.org/<bugnumber>" the the location bar. The BTS web frontend is smart enough to To The Right Thing. (Same goes for bugs.debian.org/<packagename>)

[ Parent | Reply to this comment ]

Posted by Anonymous (194.108.xx.xx) on Sun 13 Nov 2005 at 17:10
And is the new kernel OK with udev from sarge? Rumors say that newer kernels need newer udev and vice versa.

[ Parent | Reply to this comment ]

Posted by ido50 (85.64.xx.xx) on Sun 13 Nov 2005 at 18:10
[ View Weblogs ]
Well, I did that under Etch. I've installed kernel 2.6.14.2+initramfs (yaird didn't work, so I used initramfs), everything works fine, except I have no sound.

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 ]

Posted by Anonymous (80.5.xx.xx) on Sun 13 Nov 2005 at 18:24
Use gentoo :)

[ Parent | Reply to this comment ]

Posted by Anonymous (213.222.xx.xx) on Sun 13 Nov 2005 at 18:30
yeah, yeah initrd is a piece of shit, i really don't understand why not deprecated this crap.
DevFS is also a pain in the ass, programmers who write these 2 eat my shit.

GreetZ

Oneill

[ Parent | Reply to this comment ]

Posted by Anonymous (82.119.xx.xx) on Mon 14 Nov 2005 at 15:19
This is really dirty.

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 ]

Posted by Anonymous (82.173.xx.xx) on Mon 21 Nov 2005 at 10:23
hmm, i don't know whats the probleem overhere..

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 ]

Posted by philcore (70.161.xx.xx) on Wed 23 Nov 2005 at 03:05
[ View Weblogs ]
If you're going to keep doing this, please fix your typo, or realize we're talking about 2.6.14 not 2.4.16.

[ Parent | Reply to this comment ]

Posted by philcore (70.161.xx.xx) on Wed 23 Nov 2005 at 03:13
[ View Weblogs ]
whoa. Cool. The display is goofed and it shows the comments a bunch of times. Appologies to anonymous poster. I thought you were posting the same thing over and over. Steeeeeeeeeeeeve.

[ Parent | Reply to this comment ]

Posted by undefined (192.91.xx.xx) on Wed 30 Nov 2005 at 00:03
curious: can't you just "cp -a /dev/hd* ${INITRDDIR}/dev/" in some script within /etc/mkinitrd/scripts, as the problem with no devfs should just be a matter of locating the proper dev file for mounting the root fs?

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 ]

Posted by Anonymous (209.204.xx.xx) on Wed 30 Nov 2005 at 06:07
http://kernel-handbook.alioth.debian.org/

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 ]

Posted by Anonymous (84.163.xx.xx) on Mon 5 Dec 2005 at 15:11
This makes we wonder what happened to the old "on a server, I run a non-modular kernel" wisdom... as all the distributions give you are modular kernels, and you couldn't use a non-modular kernel anyway since you have to put in all the stuff you need... do people still build kernels?

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 ]

Posted by Anonymous (68.14.xx.xx) on Mon 12 Dec 2005 at 15:26
Go figure, I migrated AWAY from Mandrake, Suse, et al. just so I didn't have to use initrd! And yes, some people do still compile their own kernels.

[ Parent | Reply to this comment ]

Posted by Anonymous (68.2.xx.xx) on Sat 24 Dec 2005 at 15:08
There are 2 things I'm extremely glad I did over the years:
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 ]

Posted by relaxag (210.59.xx.xx) on Sun 15 Jan 2006 at 02:14
I use the kernel is 2.4.27.
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 ]

Posted by Anonymous (212.98.xx.xx) on Sun 15 Jan 2006 at 09:49
Kernel 2.4 is not the kernel 2.6 !
'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 ]

Posted by jcdr (212.98.xx.xx) on Thu 13 Apr 2006 at 17:20
[ View Weblogs ]
Here is the new link to the last yaird package:
http://ftp.de.debian.org/debian/pool/main/y/yaird/yaird_0.0.12-9_ i386.deb

[ Parent | Reply to this comment ]

Sign In

Username:

Password:

[Register|Advanced]

 

Flattr

 

Current Poll

What do you use for configuration management?








( 704 votes ~ 10 comments )