This repository was archived by the owner on Dec 7, 2023. It is now read-only.
Fix boot on recent distribution like Ubuntu >=19.10 #526
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Trying to boot an Ubuntu 19.10 or 20.04 would result in this error:
Installing busybox and setting
init=/bin/static-sh
as kernel-args correctly spawns a shell but thentrying to execute
/bin/bash
(or any dynamic executable) results in this error:The "not found" error is not about the executable itself, but about the
dynamic linker.
The dynamic linker address is
/lib64/ld-linux-x86-64.so.2
which is itselfa symlink to
/lib/x86_64-linux-gnu/ld-2.30.so
.Unfortunatly on the firecracker VM image, /lib/ only contains the
modules
directory from the
ignite-kernel
container image and nothing else.This is because on those distributions,
/lib
is supposed to be asymlink to
usr/lib
but when the/lib
directory from the kernel isextracted, it overrides this symlink, breaking dynamic linking.
From the gnu-tar manual, the
--keep-directory-symlink
flag provides exactlythe semantic we are looking for.
This patch simply adds this flag where the kernel tree is extracted over
the OS tree.