From 87e4e3c4a067521a9385421f49c886ffae4d2656 Mon Sep 17 00:00:00 2001
From: Philip <philm@manjaro.org>
Date: Mon, 23 Jan 2017 15:29:49 +0100
Subject: [PATCH] [bootloader] improve efi check and don't fail if install path
 is null

---
 src/modules/bootloader/main.py | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/src/modules/bootloader/main.py b/src/modules/bootloader/main.py
index 9feb02e724..60d635ca4f 100644
--- a/src/modules/bootloader/main.py
+++ b/src/modules/bootloader/main.py
@@ -240,7 +240,13 @@ def install_grub(efi_directory, fw_type):
                                efi_file_target[efi_bitness]])
     else:
         print("Bootloader: grub (bios)")
+        if libcalamares.globalstorage.value("bootLoader") is None:
+            return
+
         boot_loader = libcalamares.globalstorage.value("bootLoader")
+        if boot_loader["installPath"] is None:
+            return
+
         check_target_env_call([libcalamares.job.configuration["grubInstall"],
                                "--target=i386-pc",
                                "--recheck",
@@ -282,10 +288,12 @@ def run():
 
     :return:
     """
-    if libcalamares.globalstorage.value("bootLoader") is None:
-        return None
 
     fw_type = libcalamares.globalstorage.value("firmwareType")
+
+    if libcalamares.globalstorage.value("bootLoader") is None and fw_type != "efi":
+        return None
+
     prepare_bootloader(fw_type)
 
     return None
-- 
GitLab