[arch-projects] [mkinitcpio] Build image into the kernel?

Dave Reisner d at falconindy.com
Tue Aug 27 21:16:57 EDT 2013

On Tue, Aug 27, 2013 at 03:39:20PM -0700, Greg KH wrote:
> Hi all,
> I was playing around with the kernel cpio image creation, and was
> wanting to add an already-built cpio image to an already-built kernel
> image.
> Instead of writing yet-another-script to do this type of thing, I
> noticed that mkinitcpio's documentation said that it supported this:
> 	Support for the inclusion of the initial ramdisk image in a
> 	kernel, thus making a self-contained kernel image possible.
> But, I couldn't find this option anywhere in the tool.
> Am I missing something here?

This feature doesn't exist anymore. Rewind about 2 years, we used to use
the gen_init_cpio program from the usr/ dir of the kernel tree. I
suppose, based on Documentation/filesystems/ramfs-rootfs-initramfs.txt,
that the input list for gen_init_cpio can be used during the kernel
build to incorporate the initramfs into the image. mkinitcpio's -s
option would stop the initramfs build prior to image creation, leaving
behind this input list.

Sorry, it seems the wiki page was simply never updated to reflect this.
We (ok, I did it) switched to using bsdcpio because it proved to be
significantly more efficient and accurate.

I'm curious about your idea to write a script which would incorporate
the built initramfs into the bzImage -- I didn't realize such a thing
was possible. If it's feasible to incorporate into mkinitcpio, I'd
accept such a patch (or feature request with documentation on how to do


More information about the arch-projects mailing list