From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id MKUhDl6kwmSrOwAASxT56A (envelope-from ) for ; Thu, 27 Jul 2023 19:07:42 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id QATvDV6kwmSI+QAAauVa8A (envelope-from ) for ; Thu, 27 Jul 2023 19:07:42 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 08F644710F for ; Thu, 27 Jul 2023 19:07:42 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=jpoiret.xyz header.s=dkim header.b=jcOLZMk5; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1690477662; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=IG2oK1pgx/BMSN4US/GNIDZE5o5l2rJSprXnYCz0eQ8=; b=i9E7Wj4ZHfsh8bDggOYiBZKs84d1EvD6QEHaoD4zRrhsJLfPhqOKYPwS1uvWdIpTu3qasp V0vlVpjb+aNJR5Hx67QtIBi85Yl7v9jbqvuobWT6r6tX2KIpqjKHHkF9W9Btas1vu2L+Fz SLQZ5xsEKhjdE9KDladrkk+obgA63WcjobusXvMjXA4Fu2bG2BzqX8sH6ky9va2Zq4acU2 PfUhMJ/MQ9h4vEFNOOXAcC2m2RtfvoZOTFXw6c9gwyiS1DG441D20BG1XwNwBuoEpiScYy ncGX4WhaY91U8CQ6AxQoiLYODAKurDNQnCRAvFNUw5ntxHTDWt5n1sk9S9v9kw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1690477662; a=rsa-sha256; cv=none; b=dF3WDbljvMW8h5Q6joR4JZdN5C9UYZ/zOJxgxnYUuSz4S8ppWSs1vyz5s5rXPwlqVpy5LA zUqDBjZrRP5f4GBHqngXiwjujvKPdT4C3NansqxPxp9Xy3RwQGcy5EP//1/Fj445FPNbTM BByo/zQDloaFxNWOXWrQIDbUIAS8YiQdW/Rs5H91dOtLjgmDuuFw4VERqRMB/OcWLr3DVz 3azmNl0OpnF7ScGFHyFsWNpUoPE+aakst3WSZX1JEsm+JxYjroWc3p45rYBNQyDH9wdrp8 NoK0+g1NANybWMH/K56BylKdt2+nc5ZedCtGk/Y6nAQgzlebR71xnnFAMTjdYw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=jpoiret.xyz header.s=dkim header.b=jcOLZMk5; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qP3zB-0007E7-HY; Thu, 27 Jul 2023 12:37:09 -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 1qP3z9-0007Dd-J2 for bug-guix@gnu.org; Thu, 27 Jul 2023 12:37:07 -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 1qP3z8-0003L1-I4; Thu, 27 Jul 2023 12:37:06 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qP3z3-0000yY-Kh; Thu, 27 Jul 2023 12:37:01 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#64593: [PATCH] image: Add mbr-raw-image-type and use by default. Resent-From: Josselin Poiret Original-Sender: "Debbugs-submit" Resent-CC: mail@cbaines.net, dev@jpoiret.xyz, ludo@gnu.org, othacehe@gnu.org, rekado@elephly.net, zimon.toutoune@gmail.com, me@tobias.gr, bug-guix@gnu.org Resent-Date: Thu, 27 Jul 2023 16:37:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64593 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Ludovic =?UTF-8?Q?Court=C3=A8s?= , Josselin Poiret Cc: 64593@debbugs.gnu.org, Yann Dupont , Sergey Trofimov , Christopher Baines , Josselin Poiret , Ludovic =?UTF-8?Q?Court=C3=A8s?= , Mathieu Othacehe , Ricardo Wurmus , Simon Tournier , Tobias Geerinckx-Rice X-Debbugs-Original-Xcc: Christopher Baines , Josselin Poiret , Ludovic =?UTF-8?Q?Court=C3=A8s?= , Mathieu Othacehe , Ricardo Wurmus , Simon Tournier , Tobias Geerinckx-Rice Received: via spool by 64593-submit@debbugs.gnu.org id=B64593.16904757853698 (code B ref 64593); Thu, 27 Jul 2023 16:37:01 +0000 Received: (at 64593) by debbugs.gnu.org; 27 Jul 2023 16:36:25 +0000 Received: from localhost ([127.0.0.1]:42967 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qP3yT-0000xa-EC for submit@debbugs.gnu.org; Thu, 27 Jul 2023 12:36:25 -0400 Received: from jpoiret.xyz ([206.189.101.64]:45100) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qP3yQ-0000xM-6V for 64593@debbugs.gnu.org; Thu, 27 Jul 2023 12:36:24 -0400 Received: from authenticated-user (jpoiret.xyz [206.189.101.64]) by jpoiret.xyz (Postfix) with ESMTPA id E9416185313; Thu, 27 Jul 2023 16:36:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jpoiret.xyz; s=dkim; t=1690475779; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=IG2oK1pgx/BMSN4US/GNIDZE5o5l2rJSprXnYCz0eQ8=; b=jcOLZMk53MHuxVp962+EuOTzEQ+iizaJpQd8XZlckQGi4fRloh3LVigLLMEF/AgJdh0m4T 2rpqjWAHXlGvV8njliLvLnsi4zJtmWafkUDZiCckdk5H5T7i0pAxZLEM0x9b4aXxFA7yFX mNX5x8OnyK0TLJkfSfZ77U9ztqUikVzaZLLyfERKv+4oxsywmqwdQ3VAcFqT1JLup35COC EUy8sW9WSCMPs2DGK2pBwVdMf9azhlgafGTNwqwVKxVxrJLGG/MluVAUj8lDcu9eLkU1kr l4kbr6iBd+tQhCT3LussrnE6+MQLsmpaxFsAU1GEtU1mYz2z62L/3a3mTmZXBA== Date: Thu, 27 Jul 2023 18:35:08 +0200 Message-ID: In-Reply-To: <87mszuplfj.fsf@inria.fr> References: <87mszuplfj.fsf@inria.fr> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spamd-Bar: ++++ X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Josselin Poiret From: Josselin Poiret via Bug reports for GNU Guix Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: bug-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -3.15 X-Spam-Score: -3.15 X-Migadu-Queue-Id: 08F644710F X-Migadu-Scanner: mx1.migadu.com X-TUID: OLLvPeCX50Rz From: Josselin Poiret * gnu/system/image.scm (mbr-disk-image, mbr-raw-image-type): New variables. * guix/scripts/system.scm (%default-options): Use mbr-raw-image-type by default. --- How about this for now? I think the bootloader/image-type situation is not clear, but at least this keeps the behavior of the previous default option. gnu/system/image.scm | 16 ++++++++++++++++ guix/scripts/system.scm | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/gnu/system/image.scm b/gnu/system/image.scm index 841e7e0c7e..92e659753e 100644 --- a/gnu/system/image.scm +++ b/gnu/system/image.scm @@ -76,6 +76,7 @@ (define-module (gnu system image) esp32-partition root-partition + mbr-disk-image efi-disk-image iso9660-image docker-image @@ -84,6 +85,7 @@ (define-module (gnu system image) raw-with-offset-disk-image image-with-os + mbr-raw-image-type efi-raw-image-type efi32-raw-image-type qcow2-image-type @@ -145,6 +147,15 @@ (define root-partition (flags '(boot)) (initializer (gexp initialize-root-partition)))) +(define mbr-disk-image + (image-without-os + (format 'disk-image) + (partition-table-type 'mbr) + (partitions + (list (partition + (inherit root-partition) + (offset root-offset)))))) + (define efi-disk-image (image-without-os (format 'disk-image) @@ -201,6 +212,11 @@ (define-syntax-rule (image-with-os base-image os) (inherit base-image) (operating-system os))) +(define mbr-raw-image-type + (image-type + (name 'mbr-raw) + (constructor (cut image-with-os mbr-disk-image <>)))) + (define efi-raw-image-type (image-type (name 'efi-raw) diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm index d7163dd3eb..95c68a5f33 100644 --- a/guix/scripts/system.scm +++ b/guix/scripts/system.scm @@ -1168,7 +1168,7 @@ (define %default-options (debug . 0) (verbosity . #f) ;default (validate-reconfigure . ,ensure-forward-reconfigure) - (image-type . efi-raw) + (image-type . mbr-raw) (image-size . guess) (install-bootloader? . #t) (label . #f) base-commit: c7e45139faa27b60f2c7d0a4bc140f9793d97d47 -- 2.41.0