[Gllug] Debugging kernel loading initrd
John Edwards
john at cornerstonelinux.co.uk
Sun Apr 27 16:06:24 UTC 2008
On Sun, Apr 27, 2008 at 03:15:16PM +0100, Nix wrote:
> On 27 Apr 2008, John Edwards uttered the following:
>
>> On Sat, Apr 26, 2008 at 10:07:29PM +0100, Nix wrote:
>>> works. If it doesn't, there's not a chance it'll work when the kernel
>>> boots, either.
>>
>> Thanks again. Running in a chroot looks to be an easier way of
>> debugging the initramfs than booting a kernel. The initramfs is
>> actually a gzip'ed cpio archive, so instead of mounting it can be
>> unpacked using:
>> gzcat <file> | cpio -idmu
>
> Ah, you're keepig one initramfs and rebuilding it as needed? I found
> myself getting into tangles with out-of-date modules when I did that, so
> now I'm assembling it at build time via the kernel's build machinery
> (that strange usr/ subdirectory of the kernel's source tree is not empty
> for me).
Not really. I'm just modifying the userspace of an initramfs that
works on i686. Kernel modules are not being touched.
>> ------------------------------------------------------------
>> $ sudo chroot ipcop-initrd/ /init
>> Illegal instruction
>> ------------------------------------------------------------
>>
>> This matches some other tests I ran where rdinit=/bin/hello-world
>> would work, but rdinit=/bin/sh would fail.
>>
>> So the problem is almost certainly in busybox rather than anything
>> to do with the kernel or the structure of the initramfs.
>
> Suspect your uClibc as well and/or your toolchain. Built for i686,
> maybe?
It appears to be something to do with the C libraries. A whole bunch
of binaries that were built from the same C libraries also fail in the
chroot. Even simple binaries from Debian fail.
<snip>
--
#---------------------------------------------------------#
| John Edwards Email: john at cornerstonelinux.co.uk |
#---------------------------------------------------------#
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 196 bytes
Desc: Digital signature
URL: <http://mailman.lug.org.uk/pipermail/gllug/attachments/20080427/ae119787/attachment.pgp>
-------------- next part --------------
--
Gllug mailing list - Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug
More information about the GLLUG
mailing list