diff --git a/debian/patches/apertis/Fix-the-path-to-bootable-binaries-in-efi-entry.patch b/debian/patches/apertis/Fix-the-path-to-bootable-binaries-in-efi-entry.patch new file mode 100644 index 0000000000000000000000000000000000000000..d83378efcd3a9bda7ad377158ecd388db4efe140 --- /dev/null +++ b/debian/patches/apertis/Fix-the-path-to-bootable-binaries-in-efi-entry.patch @@ -0,0 +1,36 @@ +From eddc14ee54896149a9b6293255352185669abcd6 Mon Sep 17 00:00:00 2001 +From: Denis Pynkin <denis.pynkin@collabora.com> +Date: Mon, 3 May 2021 23:04:26 +0000 +Subject: Fix the path to bootable binaries in efi entry + +`stat` doesn't work well due `coreutils-gplv2` +created by Debos returning "?" instead of mount point. +Fall back to the provided directory, since we have separate +partition for "/boot/efi". +This change allow to use correct paths for kernel and initrd +for entry generation. + +Signed-off-by: Denis Pynkin <denis.pynkin@collabora.com> +--- + src/kernel-install/90-loaderentry.install | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/src/kernel-install/90-loaderentry.install b/src/kernel-install/90-loaderentry.install +index 0c73007..c61bf2b 100644 +--- a/src/kernel-install/90-loaderentry.install ++++ b/src/kernel-install/90-loaderentry.install +@@ -20,6 +20,11 @@ MACHINE_ID=$KERNEL_INSTALL_MACHINE_ID + + BOOT_ROOT=${ENTRY_DIR_ABS%/$MACHINE_ID/$KERNEL_VERSION} + BOOT_MNT=$(stat -c %m $BOOT_ROOT) ++# stat doesn't work well due `coreutils-gplv2` ++# returning "?" instead of mount point. ++# Fall back to the provided directory, since we have separate ++# partition for "/boot/efi" ++mountpoint "$BOOT_MNT" || BOOT_MNT="$BOOT_ROOT" + ENTRY_DIR=${ENTRY_DIR_ABS#$BOOT_MNT} + + if [ $COMMAND = "remove" ]; then +-- +2.20.1 + diff --git a/debian/patches/series b/debian/patches/series index 32b6ee686d535dcaf6a95d57c11a250fba908059..74a4e3a0e7c1ab4283f9a02d0d91836720cd127d 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -27,3 +27,4 @@ apertis/Remove-bashisms-from-the-UEFI-entries-generator.patch apertis/Reworked-kernel-install-script.patch apertis/Remove-bashisms-from-the-entry-directory-plugin.patch apertis/kernel-install-allow-to-create-BOOT-MACHINE_ID.patch +apertis/Fix-the-path-to-bootable-binaries-in-efi-entry.patch \ No newline at end of file