From patchwork Sat Sep 9 15:57:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Othacehe X-Patchwork-Id: 53692 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id DB2AA27BBEA; Sat, 9 Sep 2023 16:58:26 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 6646827BBE2 for ; Sat, 9 Sep 2023 16:58:26 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qf0LT-0006EB-Ig; Sat, 09 Sep 2023 11:58:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qf0LQ-0006De-Ll for guix-patches@gnu.org; Sat, 09 Sep 2023 11:58:00 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qf0LP-0003X6-K0 for guix-patches@gnu.org; Sat, 09 Sep 2023 11:58:00 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qf0LR-0000MD-Se for guix-patches@gnu.org; Sat, 09 Sep 2023 11:58:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#65842] [PATCH 2/2] image: Do not allow BIOS bootloader and GPT. Resent-From: Mathieu Othacehe Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 09 Sep 2023 15:58:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65842 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 65842@debbugs.gnu.org Cc: Mathieu Othacehe Received: via spool by 65842-submit@debbugs.gnu.org id=B65842.16942750601331 (code B ref 65842); Sat, 09 Sep 2023 15:58:01 +0000 Received: (at 65842) by debbugs.gnu.org; 9 Sep 2023 15:57:40 +0000 Received: from localhost ([127.0.0.1]:48339 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qf0L6-0000LN-HI for submit@debbugs.gnu.org; Sat, 09 Sep 2023 11:57:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49100) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qf0L5-0000L6-0Q for 65842@debbugs.gnu.org; Sat, 09 Sep 2023 11:57:39 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qf0Kw-0003Ug-Pb for 65842@debbugs.gnu.org; Sat, 09 Sep 2023 11:57:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=d/JkcrQOxVr6Rzja5ilKAwzIawmYhaHC+Dk7MX/RbqA=; b=D5GU1hvFeAQNEfkNLYmF fXAk8IbYHbk2/fbNpDSAPlckcL8yVIynBi6jhgv3PJuW07TGAVhfpnzwF0e0E67eSFBFLChdzB76C COXjVh46UuBCeSOruPYwFjcZ8JmsSBSACsHHsRLnvXY51Bg9mnyLA0DqKORUH3baqKXwkPYH2Vgvg 5+KQ7fmINWm3itMvtaoK+TyiDPqE0tG81CGBpxLPQBTkYZ4jXnOjym3WIBeuStHu/l0QhBmLLEb2I P1sx6f5w/L/7ZktUXdT0mAmABXVx6Ep5SAGHaXwFixGY8vmAfcy9f65Oi4XhYnODHOjbJ+uWw0oDb B2wqvWF4XEd96Q==; From: Mathieu Othacehe Date: Sat, 9 Sep 2023 17:57:26 +0200 Message-Id: <627b212f6b5bf9fd412e8c899b67b031cb1c4a00.1694273927.git.othacehe@gnu.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches 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))