6

I know that it's possible to extract from a linux kernel the embedded initramfs cpio. I want to know if the reverse operation is possible; i.e., given both a compiled kernel and initramfs archive, how does one combine them?

I'm trying to achieve the same effect of this kernel config...

CONFIG_EFI=y
CONFIG_EFI_STUB=y
...
CONFIG_FB_EFI=y
...
CONFIG_CMDLINE_BOOL=y
CONFIG_CMDLINE="root=..."
...
CONFIG_BLK_DEV_INITRD=y
CONFIG_INITRAMFS_SOURCE="my_initrd.cpio"

...without actually configuring and/or compiling the kernel.

References:

rubicks
  • 794
  • 1
  • 8
  • 18

1 Answers1

3

Here is my solution: you can create a combined .efi image with kernel, command line and initramfs inside, called a "unified kernel image".

Reference: Preparing a unified kernel image – ArchWiki.  You might want to focus on the “Manually” subsection.

JonFStr
  • 66
  • 5