From the synopsis:
use Sys::Export::CPIO; use Sys::Export -src => '/', -dst => Sys::Export::CPIO->new("initrd. +cpio"); rewrite_path '/sbin' => '/bin'; rewrite_path '/usr/sbin' => '/bin'; rewrite_path '/usr/bin' => '/bin'; add '/bin/busybox'; add ...; finish;
I even have a test (gated by environment variables) which can generate the initrd by exporting pieces of an Alpine docker container, and then run Linux with that initrd inside qemu.
|
---|