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>
Removed `USE_DOCKER` from the initrd builder usage statement as that
builder does not use Docker.
Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
The initrd image name should be kata-containers-initrd.img,
as its referenced by this name later on.
Fixes#14
Signed-off-by: Nitesh Konkar <niteshkonkar@in.ibm.com>
kata agent is installed in `${ROOTFS}/usr/bin/` rather than `${ROOTFS}/bin/`.
It just happended to work because `bin` is a symlink to `usr/bin`, which
might not be true in some distros. So do not rely on it.
Signed-off-by: Peng Tao <bergwolf@gmail.com>