From 6d486bbc1f89c6cb07502bbb6016d83bf31d65f0 Mon Sep 17 00:00:00 2001 From: Teo Mrnjavac Date: Fri, 17 Feb 2017 16:20:43 +0100 Subject: [PATCH] Improve EFI configuration check in bootloader. --- src/modules/bootloader/main.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/modules/bootloader/main.py b/src/modules/bootloader/main.py index 60d635ca4..89568bc6f 100644 --- a/src/modules/bootloader/main.py +++ b/src/modules/bootloader/main.py @@ -9,7 +9,7 @@ # Copyright 2014, Benjamin Vaudour # Copyright 2014, Kevin Kofler # Copyright 2015, Philip Mueller -# Copyright 2016, Teo Mrnjavac +# Copyright 2016-2017, Teo Mrnjavac # # Calamares is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -294,6 +294,18 @@ def run(): if libcalamares.globalstorage.value("bootLoader") is None and fw_type != "efi": return None + partitions = libcalamares.globalstorage.value("partitions") + + if fw_type == "efi": + esp_found = False + + for partition in partitions: + if partition["mountPoint"] == libcalamares.globalstorage.value("efiSystemPartition"): + esp_found = True + + if not esp_found: + return None + prepare_bootloader(fw_type) return None