diff options
author | Mathieu Othacehe <othacehe@gnu.org> | 2023-09-09 17:57:26 +0200 |
---|---|---|
committer | Mathieu Othacehe <othacehe@gnu.org> | 2023-09-20 09:38:40 +0200 |
commit | 6bd17a0806ad32d1493ac51a7443276f719c4224 (patch) | |
tree | 5366cbcc31db33696d03ded16ccc8b9af0197e11 /gnu/system/image.scm | |
parent | e5ed1712da049b1c3dcf01e0a7e02e48a8aff012 (diff) |
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>
Diffstat (limited to 'gnu/system/image.scm')
-rw-r--r-- | gnu/system/image.scm | 7 |
1 files changed, 7 insertions, 0 deletions
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)) |