all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Mathieu Othacehe <othacehe@gnu.org>
To: 65842@debbugs.gnu.org
Cc: Mathieu Othacehe <othacehe@gnu.org>
Subject: [bug#65842] [PATCH 2/2] image: Do not allow BIOS bootloader and GPT.
Date: Sat,  9 Sep 2023 17:57:26 +0200	[thread overview]
Message-ID: <627b212f6b5bf9fd412e8c899b67b031cb1c4a00.1694273927.git.othacehe@gnu.org> (raw)
In-Reply-To: <cover.1694273927.git.othacehe@gnu.org>

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.
---
 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 @@ (define* (system-disk-image 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))
-- 
2.38.1





      parent reply	other threads:[~2023-09-09 15:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-09 15:51 [bug#65842] [PATCH 0/2] image: Introduce mbr-hybrid-raw image type Mathieu Othacehe
2023-09-09 15:57 ` [bug#65842] [PATCH 1/2] image: Introduce the " Mathieu Othacehe
2023-09-09 15:57 ` Mathieu Othacehe [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=627b212f6b5bf9fd412e8c899b67b031cb1c4a00.1694273927.git.othacehe@gnu.org \
    --to=othacehe@gnu.org \
    --cc=65842@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.