From: Josselin Poiret via Bug reports for GNU Guix <bug-guix@gnu.org>
To: "Ludovic Courtès" <ludovic.courtes@inria.fr>,
"Josselin Poiret" <dev@jpoiret.xyz>
Cc: 64593@debbugs.gnu.org, "Yann Dupont" <yann.dupont@univ-nantes.fr>,
"Sergey Trofimov" <sarg@sarg.org.ru>,
"Christopher Baines" <mail@cbaines.net>,
"Josselin Poiret" <dev@jpoiret.xyz>,
"Ludovic Courtès" <ludo@gnu.org>,
"Mathieu Othacehe" <othacehe@gnu.org>,
"Ricardo Wurmus" <rekado@elephly.net>,
"Simon Tournier" <zimon.toutoune@gmail.com>,
"Tobias Geerinckx-Rice" <me@tobias.gr>
Subject: bug#64593: [PATCH] image: Add mbr-raw-image-type and use by default.
Date: Thu, 27 Jul 2023 18:35:08 +0200 [thread overview]
Message-ID: <e728bab29dce1766f3212daa8b3ac92d63a95170.1690475375.git.dev@jpoiret.xyz> (raw)
In-Reply-To: <87mszuplfj.fsf@inria.fr>
From: Josselin Poiret <dev@jpoiret.xyz>
* 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
next prev parent reply other threads:[~2023-07-27 17:07 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-13 9:33 bug#64593: ‘guix system image’ fails to create image while invoking ‘grub-bios-setup’ Ludovic Courtès
2023-07-16 11:08 ` Josselin Poiret via Bug reports for GNU Guix
2023-07-17 16:11 ` Ludovic Courtès
2023-07-27 16:35 ` Josselin Poiret via Bug reports for GNU Guix [this message]
2023-07-27 17:47 ` bug#64593: [PATCH] image: Add mbr-raw-image-type and use by default Nicolas Graves via Bug reports for GNU Guix
2023-08-07 7:39 ` bug#64593: ‘guix system image’ fails to create image while invoking ‘grub-bios-setup’ Ludovic Courtès
2023-07-18 18:34 ` Sergey Trofimov
2023-07-19 8:43 ` Josselin Poiret via Bug reports for GNU Guix
2023-08-07 7:35 ` Ludovic Courtès
2023-08-08 9:02 ` Josselin Poiret via Bug reports for GNU Guix
2023-08-25 16:33 ` Josselin Poiret via Bug reports for GNU Guix
2023-07-21 7:43 ` Yann Dupont
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=e728bab29dce1766f3212daa8b3ac92d63a95170.1690475375.git.dev@jpoiret.xyz \
--to=bug-guix@gnu.org \
--cc=64593@debbugs.gnu.org \
--cc=dev@jpoiret.xyz \
--cc=ludo@gnu.org \
--cc=ludovic.courtes@inria.fr \
--cc=mail@cbaines.net \
--cc=me@tobias.gr \
--cc=othacehe@gnu.org \
--cc=rekado@elephly.net \
--cc=sarg@sarg.org.ru \
--cc=yann.dupont@univ-nantes.fr \
--cc=zimon.toutoune@gmail.com \
/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.