guix-commits
[Top][All Lists]
Advanced

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

02/02: image: Do not allow BIOS bootloader and GPT.


From: guix-commits
Subject: 02/02: image: Do not allow BIOS bootloader and GPT.
Date: Wed, 20 Sep 2023 03:53:00 -0400 (EDT)

mothacehe pushed a commit to branch master
in repository guix.

commit 6bd17a0806ad32d1493ac51a7443276f719c4224
Author: Mathieu Othacehe <othacehe@gnu.org>
AuthorDate: Sat Sep 9 17:57:26 2023 +0200

    image: Do not allow BIOS bootloader and GPT.
    
    When using grub-bootloader with a GPT image, GRUB will fail during
    installation with a cryptic error message.
    
    * gnu/system/image.scm (system-disk-image): Raise an error when trying to 
use
    a non-EFI compatible bootloader with a GPT image partitioning.
    
    Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
---
 gnu/system/image.scm | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/gnu/system/image.scm b/gnu/system/image.scm
index b1b928b222..fa4cab0b03 100644
--- a/gnu/system/image.scm
+++ b/gnu/system/image.scm
@@ -530,6 +530,13 @@ used in the image."
                 (image-partition-table-type image)))
        (else "")))
 
+    (when (and (gpt-image? image)
+               (not
+                (memq (bootloader-name bootloader) '(grub-efi grub-efi32))))
+      (raise
+       (formatted-message
+        (G_ "EFI bootloader required with GPT partitioning"))))
+
     (let* ((format (image-format image))
            (image-type (format->image-type format))
            (image-type-options (genimage-type-options image-type image))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]