Sample Header Ad - 728x90

If retain_initrd is used, can this cpio image be accessed from userspace?

1 vote
1 answer
279 views
By default, the Linux kernel frees the memory that was used for an initramfs after its unpack is complete. If the kernel argument retain_initrd is used, then kexec --reuseinitrd becomes available to -- as the name implies -- reuse an initrd that was booted previously; meaning it's still retained in kernel memory. Insofar as an initramfs consists of a series of gzipped cpio archives concatenated to each other, it would be useful to be able to boot into the same initramfs one used previously, but with an additional archive (adding new or different files) either prepended or appended. Is there any stable, supportable way for a privileged/superuser account to access the cpio archive that the current kernel was booted with, if retain_initrd was used? Or alternately, is there a way to prepend or append to that retained content rather than replacing it when using kexec to upload new initrd content?
Asked by Charles Duffy (1890 rep)
Jul 16, 2020, 12:03 AM
Last activity: Nov 18, 2024, 09:13 AM