rootfs-builder: fix unbootable dracut-based initramfs on Fedora

This is a forward port of Kata 1.x PR's
https://github.com/kata-containers/osbuilder/pull/480 and
https://github.com/kata-containers/osbuilder/pull/494 .

Fixes #646

Signed-off-by: Pavel Mores <pmores@redhat.com>
This commit is contained in:
Pavel Mores
2020-08-13 19:16:30 +02:00
parent fcfe00369b
commit 2dfb8bc549
2 changed files with 18 additions and 10 deletions

View File

@@ -441,8 +441,7 @@ prepare_overlay()
# we were passed a pre-populated rootfs directory
if [ ! -e ./sbin/init ]; then
ln -sf ./usr/lib/systemd/systemd ./init
ln -sf ../../init ./lib/systemd/systemd
ln -sf ../init ./sbin/init
ln -sf /init ./sbin/init
fi
# Kata systemd unit file