Files
kata-containers/initrd-builder
Stefan Hajnoczi a7bafc53c9 initrd-builder: make initrd_builder.sh idempotent
If initrd_builder.sh fails partway through it may not be possible to run
it again without creating a new rootfs.

This happens because initrd_builder.sh checks for the presence of
/sbin/init and refuses to run if it is missing.  Later on, the script
moves /sbin/init to /init, where the kernel expects to find it in an
initramfs.  After this step initrd_builder.sh will refuse to run again
since /sbin/init is now missing.

Create a symlink from /init to /sbin/init instead of moving the file.
This allows initrd_builder.sh to be run repeatedly on the same rootfs.

Fixes: #130
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2018-06-29 15:08:56 +01:00
..

Kata Containers initrd image generation

A Kata Containers initrd image is generated using the initrd_builder.sh script. This script uses a rootfs directory created by the rootfs-builder/rootfs.sh script.

Creating a guest OS initrd image

To create a guest OS initrd image run:

$ sudo ./initrd_builder.sh path/to/rootfs

The rootfs.sh script populates the path/to/rootfs directory.

Further information

For more information on how to use the initrd_builder.sh script, run:

$ ./initrd_builder.sh -h