From: Jonas Witschel Date: Wed, 22 May 2019 13:09:28 +0000 (+0200) Subject: dracut.sh: fix EFI directory if ESP is mounted to /efi X-Git-Tag: 050~186 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=305c6f91bb0846b417b31a86c62e016c1a334745;p=thirdparty%2Fdracut.git dracut.sh: fix EFI directory if ESP is mounted to /efi The EFI executables produced by dracut --uefi must be placed in the subdirectory /EFI/Linux of the EFI system partition (ESP) according to the Boot Loader Specification, see https://systemd.io/BOOT_LOADER_SPECIFICATION#logic This is done correctly for the mount points /boot and /boot/efi, but for the mount point /efi, the files are placed in /efi/Linux instead of the correct /efi/EFI/Linux. This commit fixes the directory so that the EFI executables are picked up correctly by conforming boot loaders. Apart from complying to the specification, the change is also in line with the commit message of 5c57209ba5ef36f8856b4ea1694de8e1da508b71 ("dracut.sh: add default path for --uefi") which introduced this feature as well as the documentation in dracut.8.asc. --- diff --git a/dracut.sh b/dracut.sh index b85d06001..183b892fb 100755 --- a/dracut.sh +++ b/dracut.sh @@ -787,7 +787,7 @@ if ! [[ $outfile ]]; then [[ $line =~ BUILD_ID\=* ]] && eval "$line" && echo "$BUILD_ID" && break; \ done) if [[ -d /efi ]] && mountpoint -q /efi; then - efidir=/efi + efidir=/efi/EFI else efidir=/boot/EFI if [[ -d /boot/efi/EFI ]] && mountpoint -q /boot/efi; then