Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 134770 - genkernel gen_initramfs.sh issue
Summary: genkernel gen_initramfs.sh issue
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: genkernel (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Genkernel Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-05-29 05:41 UTC by Gregory Bleiker
Modified: 2006-06-09 06:28 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gregory Bleiker 2006-05-29 05:41:26 UTC
I'm not sure if this is a bug, but its weird anyhow. I am trying to build an initrd with genkernel using the following:

export INSTALL_MOD_PATH=/usr/src/linux-KERNELVERSION
make modules_install (to install modules at different location)
genkernel --no-install --kerneldir=/usr/src/linux-KERNELVERSION/ initrd

however, the produced initramfs thingie does not boot. I have pocked around in the scripts a bit and stumblede across this line in gen_initramfs.sh:

        cat ${MERGE_LIST} > ${TMPDIR}/initramfs-${KV}

which supposedly concatenates all previous cpio archives. As cpio is the worst documented command on earth, I can't be sure of this, but I think cpio doesn't work like that. If you look at the archive with --list then you'll only see the contents of the first archive, however the boot process might have some nifty way to extract all the archives, who knows. 
If I extract all archives into a directory and then create the initramfs thingie, then it boots... any ides? Has this ever worked for anyone?
Comment 1 Chris Gianelloni (RETIRED) gentoo-dev 2006-05-31 08:17:40 UTC
It definitely works, seeing as how all of the release media are built with it.

Basically, that isn't your problem.  Your problem lies elsewhere.  Also, the kernel has special CPIO handling for the initramfs.  Because of how we are building our initramfs, you cannot use normal cpio commands to list the contents.  Instead, you have to split the archive into each individual component, then uncompress the gzipped portions, then run cpio on each.  Gotta love kernel internals, huh?

Anyway, the problem isn't with how we create the initramfs.  It seems instead like you have something missing which is causing the error.
Comment 2 Tim Yamin (RETIRED) gentoo-dev 2006-05-31 11:50:24 UTC
> however, the produced initramfs thingie does not boot.

Want to explain that in a bit more detail? What kernel are you using, for example? Does it not boot at all or does it hang, OOPS, or etc.?
Comment 3 Chris Gianelloni (RETIRED) gentoo-dev 2006-06-09 06:28:07 UTC
I cannot reproduce this problem with the information given.  Feel free to REOPEN this bug with the information requested by Tim.

Thanks