From a6beabb84372ba44e377dbe35d056acd3648a21a Mon Sep 17 00:00:00 2001 From: borkluce Date: Sun, 30 Aug 2026 14:28:16 +0100 Subject: [PATCH] initrd: install perf in ukl-base and fail non-destructively on missing binary The ukl-base image did not install perf, but buildinitrd.sh lists it as required, so the build aborted and deleted its working directory, leaving an empty initrd and an unexplained 'Unable to mount root fs' panic at boot. - Add perf to the ukl-base Dockerfile so the required set is present. - On a missing binary, print a clear error naming it and pointing to the fix, and no longer 'rm -rf $WDIR', so the failure is diagnosable. --- initrd/buildinitrd.sh | 4 ++-- initrd/ukl-base/Dockerfile | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/initrd/buildinitrd.sh b/initrd/buildinitrd.sh index 27628e086..3bfda2100 100755 --- a/initrd/buildinitrd.sh +++ b/initrd/buildinitrd.sh @@ -15,8 +15,8 @@ copy() if [ -n "$file" ] ; then cp $file $WDIR/$file else - echo "Missing required file: $1 for directory $2" - rm -rf $WDIR + echo "ERROR: required binary '$1' not found in the build container (for '$2')." >&2 + echo " Add it to initrd/ukl-base/Dockerfile, or remove it from the file list in buildinitrd.sh." >&2 exit 1 fi } diff --git a/initrd/ukl-base/Dockerfile b/initrd/ukl-base/Dockerfile index 3e69632e5..34c95e9ff 100644 --- a/initrd/ukl-base/Dockerfile +++ b/initrd/ukl-base/Dockerfile @@ -3,4 +3,4 @@ FROM fedora:36 RUN dnf update -y RUN dnf -y install sed elfutils-libelf-devel bc hostname perl dropbear \ msr-tools wget dnf-plugins-core bzip2 curl xz cpio shadow-utils procps-ng iproute \ - pciutils net-tools openssh-server less ethtool + pciutils net-tools openssh-server less ethtool perf