From: Li Tian Date: Wed, 14 Jan 2026 05:24:36 +0000 (+0800) Subject: fix(dracut): remove trailing null characters from SBATs when building UKIs X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=785fbf8b6ce6553823b454ec47d2e7276017e3f7;p=thirdparty%2Fdracut-ng.git fix(dracut): remove trailing null characters from SBATs when building UKIs SBAT of kernel has null character paddings at the end. Using tools like ukify will display massive amount of '\0' in SBAT. Ukify is doing ".rstrip('b\x00')" when merging SBATs. --- diff --git a/dracut.sh b/dracut.sh index 2f83ad581..7039e1571 100755 --- a/dracut.sh +++ b/dracut.sh @@ -3438,6 +3438,7 @@ get_sbat_string() { local inp=$1 local out=$uefi_outdir/$2 "${OBJCOPY:-objcopy}" -O binary --only-section=.sbat "$inp" "$out" + sed -i 's/\x00*$//' "$out" clean_sbat_string "$out" }