Skip to content
Snippets Groups Projects
Commit 2b59d307 authored by Denis Pynkin's avatar Denis Pynkin
Browse files

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: default avatarDenis Pynkin <denis.pynkin@collabora.com>
parent 31283fcf
No related branches found
No related tags found
No related merge requests found
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
......@@ -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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment