Gentoo Archives: gentoo-catalyst

From: lurker <lurker@×××××××.com>
To: gentoo-catalyst@l.g.o
Subject: Re: [gentoo-catalyst] catalyst related kernel problem?
Date: Wed, 20 Feb 2008 20:38:56
Message-Id: 47BC8FD8.4080103@lavabit.com
In Reply to: Re: [gentoo-catalyst] catalyst related kernel problem? by "Åsmund Grammeltvedt"
1 On 08/01/08 15:46, Åsmund Grammeltvedt wrote:
2 > On Tuesday 08 January 2008 15:34:09 lurker wrote:
3 >> Greetings,
4 >>
5 >> Often when I build systems with catalyst I encounter the following
6 >>
7 >> kernel freeze after the boot loader has completed:
8 >>> [ ... lots of kernel loading stuff which seems ok ... ]
9 >>> Freeing unused kernel memory: 172k freed
10 >>> request_module: runaway loop modprobe binfmt-0000
11 >>> request_module: runaway loop modprobe binfmt-0000
12 >>> request_module: runaway loop modprobe binfmt-0000
13 >>> request_module: runaway loop modprobe binfmt-0000
14 >>> request_module: runaway loop modprobe binfmt-0000
15 >
16 > I had an issue with the same symptoms. It turned out that after some builds,
17 > the initramfs would contain empty files instead of links to busybox.
18 >
19 > In my case, the only way I could get it to work consistently was to patch
20 > genkernel to use symbolic links instead, when setting up the initramfs.
21 >
22
23 Now I'm constantly plagued by this hickup. I did my homework and
24 investigated this in depth.
25
26 I'm not sure this is completely the same as what Åsmund described
27 elsewhere in this thread. For me the hard links in /bin (of the
28 initramfs) to /bin/busybox works. The problem is that /bin/busybox is empty.
29
30 I dived into the code, focusing on how genkernel and catalyst works
31 together, and especially how genkernel generate the initramfs. After
32 patching in some primitive print_info debugging I discovered that
33 genkernel fails to add busybox with cpio (this is with genkernel-3.4.9
34 and catalyst-2.0.6_pre6):
35
36 In append_busybox() in genkernel-3.4.9/gen_initramfs.sh:36, busybox is
37 appended to the initramfs on line 101, which looks like this:
38
39 find . -print | cpio ${CPIO_ARGS} --append -F "${CPIO}"
40
41 I added debug prints of the size of the current initramfs (i.e. ${CPIO})
42 both before and after the above command, and it turns out that only 2048
43 bytes of data is added. Since the busybox executable that _should_ be
44 added at that time is 1080 Kb big, it's obviously here everything goes
45 wrong which was confirmed by extracting it. /bin/busybox is just and
46 empty executable. This happens no matter if I use kerncache or not.
47 Also, I have confirmed that there is a good busybox executable in ./bin
48 from the directory the above command runs from.
49
50 But why? When I do the exact same series of commands manually myself it
51 works. Obviously most people doesn't experience this problem either so
52 it has to be something with my system. Add to this the randomness of the
53 problem, that it works sometimes.
54
55 I would _really_ appreciate any input on this. I will gladly do any sort
56 of debugging if you just give my a few pointers on where to look and
57 what to do cause I'm completely lost now.
58
59 Also, my system runs stable amd64 Gentoo, but I run catalyst in a i686
60 chroot to protect my main system. Could that have anything to do with this?
61
62 --
63 gentoo-catalyst@l.g.o mailing list

Replies

Subject Author
Re: [gentoo-catalyst] catalyst related kernel problem? Chris Gianelloni <wolf31o2@g.o>