[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1033737: flash-kernel: Unable to run flash-kernel on EFI-based systems



Alternatively, this could be an environment variable to allow flash-kernel to run non-interactively on an EFI system (such as when installing/updating with apt, or after updating the initrd).

---

diff -Nru flash-kernel-3.106/debian/changelog flash-kernel-3.106+nmu1/debian/changelog
--- flash-kernel-3.106/debian/changelog 2022-04-22 23:55:41.000000000 +0000
+++ flash-kernel-3.106+nmu1/debian/changelog    2023-03-31 14:28:23.000000000 +0000
@@ -1,3 +1,10 @@
+flash-kernel (3.106+nmu1) UNRELEASED; urgency=medium
+
+  * Skip EFI detection mechanism when the FK_FORCE_EFI environment
+    variable is set to "yes".
+
+ -- Isaac True <isaac@is.having.coffee>  Fri, 31 Mar 2023 14:28:23 +0000
+
 flash-kernel (3.106) unstable; urgency=medium

   * db/all.db: Move MNT Reform 2 boards later to fix sort order.
diff -Nru flash-kernel-3.106/flash-kernel.8 flash-kernel-3.106+nmu1/flash-kernel.8
--- flash-kernel-3.106/flash-kernel.8   2022-03-23 14:22:28.000000000 +0000
+++ flash-kernel-3.106+nmu1/flash-kernel.8      2023-03-31 14:28:11.000000000 +0000
@@ -40,6 +40,10 @@
 .B choice of machine may cause host filesystem partitions to be mounted and
 .B modified.

+.IP FK_FORCE_EFI
+Skip EFI detection when this variable is set to `yes'. Normally, flash-kernel
+will abort if it detects that the system is running in EFI mode.
+
 .SH FILES
 .TP
 .B /usr/share/flash-kernel/db/all.db
diff -Nru flash-kernel-3.106/functions flash-kernel-3.106+nmu1/functions
--- flash-kernel-3.106/functions        2022-04-12 19:43:15.000000000 +0000
+++ flash-kernel-3.106+nmu1/functions   2023-03-31 14:28:23.000000000 +0000
@@ -789,7 +789,7 @@
        kfile=$(readlink -e "$kfile")
 fi

-if [ -d /sys/firmware/efi ]; then
+if [ -d /sys/firmware/efi ] && [ "x$FK_FORCE_EFI" != "xyes" ]; then
        # skipping when detect EFI
        echo "System running in EFI mode, skipping."
        exit 0


Reply to: