From unknown Fri Jun 20 07:16:50 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#40997 <40997@debbugs.gnu.org> To: bug#40997 <40997@debbugs.gnu.org> Subject: Status: [raid] The bootloader can only be installed to a single drive Reply-To: bug#40997 <40997@debbugs.gnu.org> Date: Fri, 20 Jun 2025 14:16:50 +0000 retitle 40997 [raid] The bootloader can only be installed to a single drive reassign 40997 guix submitter 40997 maxim.cournoyer@gmail.com severity 40997 normal tag 40997 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Fri May 01 09:46:01 2020 Received: (at submit) by debbugs.gnu.org; 1 May 2020 13:46:01 +0000 Received: from localhost ([127.0.0.1]:48463 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jUVzN-0007io-0j for submit@debbugs.gnu.org; Fri, 01 May 2020 09:46:01 -0400 Received: from lists.gnu.org ([209.51.188.17]:58828) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jUVzC-0007iQ-Sm for submit@debbugs.gnu.org; Fri, 01 May 2020 09:45:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57696) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jUVyw-0007ee-Pa for bug-guix@gnu.org; Fri, 01 May 2020 09:45:50 -0400 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jUVyR-0001NG-F9 for bug-guix@gnu.org; Fri, 01 May 2020 09:45:34 -0400 Received: from mail-qv1-xf35.google.com ([2607:f8b0:4864:20::f35]:42777) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jUVyR-0001MR-09 for bug-guix@gnu.org; Fri, 01 May 2020 09:45:03 -0400 Received: by mail-qv1-xf35.google.com with SMTP id v18so4727581qvx.9 for ; Fri, 01 May 2020 06:45:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version; bh=m3K5+TUvZiXEgjUZJ2secxj3Lhcb3h1d5eEI/SDqIrM=; b=Wj0ERE1mevQz3OJvShheHFow5VC4NrkYdMw6da2ZWk8Qy18xtltjXryPgd52MVhAnt BKNtXXlzJg4ONDm+CR3y1Qj6PugilqMdy0Mv3lY+ByfzNMyOoHyZ2fLfLjliJyJm2B9A Ley+iJieQqaQroZQABNMcOMMVoJy6lAOY0upVXJMma50IDUWTez7ApfrShAhjN0BKyDi hXymuMxWJxFXLD5HqdFrzIreHI2WCRgNpI3ILCwUhl9Tj4hreWeDzyvEPD2H7YOkbscy 7z/gVNNeGmgLnl8OpAW3OatRj/mWGTq1bvIPchbPK6Lg+7y/G8l6n3qIfKWOMOnmXCNe mrgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=m3K5+TUvZiXEgjUZJ2secxj3Lhcb3h1d5eEI/SDqIrM=; b=hGC+0nBltGYJ42lmF9tj/+OqxJxJXEhhuBaPK24IRCHeeENxmDu0srAGk1ejQ6hOCM Vu8cxgs851CstD+0gQcZbDyRZkkyLXib+0LWYlUvCBNlTcoKnwrSyLKYilLXAVYJxn36 o3pJMWOwKAerj6xdAoDXzO5M84wnpghFdF9faYbf4IOHHBG9eCRparNeFWkBG/yEvRzD 090QREuU7NKcC4mEbNJ5MdT8qEWUwhkWa2EsnaeIQKQUk+mQvyY5SJ/u8Ccvc1xHqw2v dl+Q9cLvP49dHW5Ilsx/7MbbEvqTXICKlW59WntSw2qg5kHQWaCmOiFAGgFFrog7PRyq d+Xg== X-Gm-Message-State: AGi0PuZfKEERkZXhDOty49+5x7OtcW80F3RPHrXuaCvNAWsCcGRJgWlF 3wxqJsnWJR5Vuw5FgPrsFApwm8+T X-Google-Smtp-Source: APiQypLd1jCntNLt/0xpz24rO5FaUmrzQdSpe2ChggAocyyO6pOgs+Z2rKGMzcs/+ECLZIaQt9g+uw== X-Received: by 2002:a0c:e786:: with SMTP id x6mr4196709qvn.11.1588340701486; Fri, 01 May 2020 06:45:01 -0700 (PDT) Received: from hurd (dsl-153-87.b2b2c.ca. [66.158.153.87]) by smtp.gmail.com with ESMTPSA id r51sm2647845qtk.89.2020.05.01.06.45.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 May 2020 06:45:01 -0700 (PDT) From: maxim.cournoyer@gmail.com X-Google-Original-From: maxim@hurd.i-did-not-set--mail-host-address--so-tickle-me To: bug-guix Subject: [raid] The bootloader can only be installed to a single drive Date: Fri, 01 May 2020 09:45:00 -0400 Message-ID: <87wo5vkbvn.fsf@hurd.i-did-not-set--mail-host-address--so-tickle-me> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::f35; envelope-from=maxim.cournoyer@gmail.com; helo=mail-qv1-xf35.google.com X-detected-operating-system: by eggs.gnu.org: Error: [-] PROGRAM ABORT : Malformed IPv6 address (bad octet value). Location : parse_addr6(), p0f-client.c:67 X-Received-From: 2607:f8b0:4864:20::f35 X-Spam-Score: -0.3 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Using Guix System, the bootloader declaration doesn't currently seem to support being installed to multiple drives: --8<---------------cut here---------------start------------->8--- (bootloader (bootloader-configuration (bootloader grub-bootloader) (target "/dev/sda") (terminal-outputs '(console)))) --8<---------------cut here---------------end--------------->8--- I suggest to change it so that target can be passed a list like --8<---------------cut here---------------start------------->8--- (bootloader (bootloader-configuration (bootloader grub-bootloader) (target '("/dev/sda" "/dev/sdb")) (terminal-outputs '(console)))) --8<---------------cut here---------------end--------------->8--- This is useful when trying to boot a degraded RAID array. Maxim From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 08 00:25:13 2021 Received: (at 40997) by debbugs.gnu.org; 8 Aug 2021 04:25:13 +0000 Received: from localhost ([127.0.0.1]:53466 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mCaN5-0004CO-Ew for submit@debbugs.gnu.org; Sun, 08 Aug 2021 00:25:13 -0400 Received: from mail-qv1-f49.google.com ([209.85.219.49]:41954) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mCaN1-0004C4-U6 for 40997@debbugs.gnu.org; Sun, 08 Aug 2021 00:25:09 -0400 Received: by mail-qv1-f49.google.com with SMTP id g6so7281152qvj.8 for <40997@debbugs.gnu.org>; Sat, 07 Aug 2021 21:25:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:references:date:in-reply-to:message-id:user-agent :mime-version; bh=pnSmfIKoXXYLTPeNIrr0dmIVxlF/TjK/T5riRPj5qBc=; b=jUFA+YDY42zQ/9xoVU3sFISL9ca24h5IZq48VadAQHzYstA0WiYL7a6KaxpaN/Fn7S 19q9IKEufBhpWaTr/hVzVed5klzbNUW2ZZSg0yJqPAsQ+u8a9gSEKKvYjUE/oPoqJ+Im K6a5RjVdk0bq/KqWiH1l/jIQfEY3h8XnZwBLDflg2qWguGPp+b6Hz/Ift1+lBY46DI6X 3qCSeSIfU3as2QMqPgJBpyZh7ckrowUIuTN+7667SF3ULtWqr6Kh0BTBPiB9PyTxvMR2 EBD3/clNpHrAriF53RYt4qdupHd1QGHI3yrr/T93gSqVK5x9J/qPNJ505cYt7wlo6tBX 0Wmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=pnSmfIKoXXYLTPeNIrr0dmIVxlF/TjK/T5riRPj5qBc=; b=nn5qZM7fp6mtUWGzrXG7sAwAe0gE9ESzduM0hJ9Z4KzYO1UiMHrCo3ixLo9ajQjT65 PZIEnlSAlV6wZQZuv8jFuEkVefVQrtxYrjwlizSuz9SmnjsadTE8/jWycNWS6UY1YeKf /n13qIZFoIgHI7TNhoWttcp6gF5vj12YdmN9F9kaYyfOd9Ce6HSWPw2ed8OchvdQ8QE1 inV3Xuaf8tlwVQp/Otv9O3My2PjmZX7N5MgdAoc84Hon8KzZk+zuCQEL9d3BMI/+f+Y4 uZx8Iihyqhao29C7VwCtEUNbHgnOWaxDmJzvUGOS+KXJv9vCPkBpW+ClEk6Gwsr12nNG B7VA== X-Gm-Message-State: AOAM5338r6rQJyc5wKC1LVuD8NkV+BmbzzQSemz+UhUDlduz0WnSV6mA 9yWXyS92Jd89HxQyvDvVD3tZrPJcJak6lA== X-Google-Smtp-Source: ABdhPJyTfPbHB+KxnwgJwSLQ21eOrye5/gLSnXqHcXnpyU/tVt2LlinODnbDwFOjkm66TSS8rmwgEg== X-Received: by 2002:ad4:5d61:: with SMTP id fn1mr18517202qvb.32.1628396702459; Sat, 07 Aug 2021 21:25:02 -0700 (PDT) Received: from hurd (dsl-10-131-144.b2b2c.ca. [72.10.131.144]) by smtp.gmail.com with ESMTPSA id g23sm4308589qtq.9.2021.08.07.21.25.01 for <40997@debbugs.gnu.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 07 Aug 2021 21:25:01 -0700 (PDT) From: Maxim Cournoyer To: 40997@debbugs.gnu.org Subject: Re: bug#40997: [raid] The bootloader can only be installed to a single drive References: <87wo5vkbvn.fsf@hurd.i-did-not-set--mail-host-address--so-tickle-me> Date: Sun, 08 Aug 2021 00:25:01 -0400 In-Reply-To: <87wo5vkbvn.fsf@hurd.i-did-not-set--mail-host-address--so-tickle-me> (maxim cournoyer's message of "Fri, 01 May 2020 09:45:00 -0400") Message-ID: <877dgw36n6.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 40997 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain Hello, maxim.cournoyer@gmail.com writes: > Using Guix System, the bootloader declaration doesn't currently seem to > support being installed to multiple drives: > > (bootloader (bootloader-configuration > (bootloader grub-bootloader) > (target "/dev/sda") > (terminal-outputs '(console)))) > --8<---------------cut here---------------end--------------->8--- > > I suggest to change it so that target can be passed a list like > > (bootloader (bootloader-configuration > (bootloader grub-bootloader) > (target '("/dev/sda" "/dev/sdb")) > (terminal-outputs '(console)))) > --8<---------------cut here---------------end--------------->8--- > > This is useful when trying to boot a degraded RAID array. The following patches do exactly this (target becomes the plural targets). I tested it on my system, disconnecting the first drive of my RAID1 array, and could at least boot to GRUB fine (although full boot failed due to https://issues.guix.gnu.org/40999). Booting a VM using an image generated from the bare-bones.tmpl template also worked fine. --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: attachment; filename=0001-gnu-bootloader-Support-multiple-targets.patch Content-Transfer-Encoding: quoted-printable >From a14403fdabbe987cb94a75977e7e62a0e0954e6b Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Fri, 6 Aug 2021 16:33:02 -0400 Subject: [PATCH 1/2] gnu: bootloader: Support multiple targets. Fixes . * gnu/bootloader.scm (): New 'targets' field. (%bootloader-configuration-target): New procedure. (bootloader-configuration-target): Add deprecation warning. (bootloader-configuration-targets): New procedure. * guix/scripts/system.scm (install): Access targets via bootloader-configuration-targets. (perform-action)[bootloader-target]: Remove unused argument and update doc. Access targets via bootloader-configuration-targets and fix indentation. (process-action): Access targets via bootloader-configuration-targets. Do not provide the unused BOOTLOADER-TARGET argument when applying `perform-action'. * guix/scripts/system/reconfigure.scm (install-bootloader-program): Rename DEVICE argument to DEVICES. Adjust doc and comment. Apply `installer' and `disk-installer' for every DEVICES. (install-bootloader): Access targets via bootloader-configuration-targets a= nd rename variable from DEVICE to DEVICES. * gnu/tests/install.scm: Adjust accordingly. * tests/guix-system.sh: Likewise. * gnu/tests/reconfigure.scm (run-install-bootloader-test): Adjust the DEVIC= ES argument so that it is a list. * doc/guix.texi: Update doc. --- doc/guix.texi | 91 +++++++++++++++-------------- gnu/bootloader.scm | 22 ++++++- gnu/tests/install.scm | 26 ++++----- gnu/tests/reconfigure.scm | 2 +- guix/scripts/system.scm | 20 +++---- guix/scripts/system/reconfigure.scm | 22 ++++--- tests/guix-system.sh | 6 +- 7 files changed, 108 insertions(+), 81 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index a826171f34..a9309d4d0c 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -2567,14 +2567,15 @@ in particular: =20 @itemize @item -Make sure the @code{bootloader-configuration} form refers to the target -you want to install GRUB on. It should mention @code{grub-bootloader} if -you are installing GRUB in the legacy way, or @code{grub-efi-bootloader} -for newer UEFI systems. For legacy systems, the @code{target} field -names a device, like @code{/dev/sda}; for UEFI systems it names a path -to a mounted EFI partition, like @code{/boot/efi}; do make sure the path is -currently mounted and a @code{file-system} entry is specified in your -configuration. +Make sure the @code{bootloader-configuration} form refers to the targets +you want to install GRUB on. It should mention @code{grub-bootloader} +if you are installing GRUB in the legacy way, or +@code{grub-efi-bootloader} for newer UEFI systems. For legacy systems, +the @code{targets} field contain the names of the devices, like +@code{(list "/dev/sda")}; for UEFI systems it names the paths to mounted +EFI partitions, like @code{(list "/boot/efi")}; do make sure the paths +are currently mounted and a @code{file-system} entry is specified in +your configuration. =20 @item Be sure that your file system labels match the value of their respective @@ -13478,7 +13479,7 @@ the @code{bootloader} field should contain somethin= g along these lines: @lisp (bootloader-configuration (bootloader grub-efi-bootloader) - (target "/boot/efi")) + (targets '("/boot/efi"))) @end lisp =20 @xref{Bootloader Configuration}, for more information on the available @@ -14693,7 +14694,7 @@ configuration would look like: (keyboard-layout (keyboard-layout "tr")) ;for the console (bootloader (bootloader-configuration (bootloader grub-efi-bootloader) - (target "/boot/efi") + (targets '("/boot/efi")) (keyboard-layout keyboard-layout))) ;for GRUB (services (cons (set-xorg-configuration (xorg-configuration ;for Xorg @@ -33098,11 +33099,11 @@ in ``legacy'' BIOS mode. through TFTP@. In combination with an NFS root file system this allows yo= u to build a diskless Guix system. =20 -The installation of the @code{grub-efi-netboot-bootloader} generates the c= ontent -of the TFTP root directory at @code{target} -(@pxref{Bootloader Configuration, @code{target}}), to be served by a TFTP = server. - You may want to mount your TFTP server directory onto @code{target} to mo= ve the -required files to the TFTP server automatically. +The installation of the @code{grub-efi-netboot-bootloader} generates the +content of the TFTP root directory at @code{targets} (@pxref{Bootloader +Configuration, @code{targets}}), to be served by a TFTP server. You may +want to mount your TFTP server directories onto the @code{targets} to +move the required files to the TFTP server automatically. =20 If you plan to use an NFS root file system as well (actually if you mount = the store from an NFS share), then the TFTP server needs to serve the file @@ -33113,22 +33114,25 @@ files from the store will be accessed by GRUB thr= ough TFTP with their normal store path, for example as @file{tftp://tftp-server/gnu/store/=E2=80=A6-initrd/initrd.cpio.gz}. =20 -Two symlinks are created to make this possible. The first symlink is -@code{target}@file{/efi/Guix/boot/grub/grub.cfg} pointing to -@file{../../../boot/grub/grub.cfg}, -where @code{target} may be @file{/boot}. In this case the link is not lea= ving -the served TFTP root directory, but otherwise it does. The second link is -@code{target}@file{/gnu/store} and points to @file{../gnu/store}. This li= nk -is leaving the served TFTP root directory. - -The assumption behind all this is that you have an NFS server exporting th= e root -file system for your Guix system, and additionally a TFTP server exporting= your -@code{target} directory=E2=80=94usually @file{/boot}=E2=80=94from that sam= e root file system for -your Guix system. In this constellation the symlinks will work. - -For other constellations you will have to program your own bootloader inst= aller, -which then takes care to make necessary files from the store accessible th= rough -TFTP, for example by copying them into the TFTP root directory at @code{ta= rget}. +Two symlinks are created to make this possible. For each target in the +@code{targets} field, the first symlink is +@samp{target}@file{/efi/Guix/boot/grub/grub.cfg} pointing to +@file{../../../boot/grub/grub.cfg}, where @samp{target} may be +@file{/boot}. In this case the link is not leaving the served TFTP root +directory, but otherwise it does. The second link is +@samp{target}@file{/gnu/store} and points to @file{../gnu/store}. This +link is leaving the served TFTP root directory. + +The assumption behind all this is that you have an NFS server exporting +the root file system for your Guix system, and additionally a TFTP +server exporting your @code{targets} directories=E2=80=94usually a single +@file{/boot}=E2=80=94from that same root file system for your Guix system.= In +this constellation the symlinks will work. + +For other constellations you will have to program your own bootloader +installer, which then takes care to make necessary files from the store +accessible through TFTP, for example by copying them into the TFTP root +directory to your @code{targets}. =20 It is important to note that symlinks pointing outside the TFTP root direc= tory may need to be allowed in the configuration of your TFTP server. Further = the @@ -33140,18 +33144,19 @@ NFS servers, you also need a properly configured = DHCP server to make the booting over netboot possible. For all this we can currently only recommend you t= o look for instructions about @acronym{PXE, Preboot eXecution Environment}. =20 -@item @code{target} -This is a string denoting the target onto which to install the +@item @code{targets} +This is a list of strings denoting the targets onto which to install the bootloader. =20 -The interpretation depends on the bootloader in question. For -@code{grub-bootloader}, for example, it should be a device name understood= by -the bootloader @command{installer} command, such as @code{/dev/sda} or -@code{(hd0)} (@pxref{Invoking grub-install,,, grub, GNU GRUB Manual}). For -@code{grub-efi-bootloader}, it should be the mount point of the EFI file -system, usually @file{/boot/efi}. For @code{grub-efi-netboot-bootloader}, -@code{target} should be the mount point corresponding to the TFTP root -directory of your TFTP server. +The interpretation of targets depends on the bootloader in question. +For @code{grub-bootloader}, for example, they should be device names +understood by the bootloader @command{installer} command, such as +@code{/dev/sda} or @code{(hd0)} (@pxref{Invoking grub-install,,, grub, +GNU GRUB Manual}). For @code{grub-efi-bootloader}, they should be mount +points of the EFI file system, usually @file{/boot/efi}. For +@code{grub-efi-netboot-bootloader}, @code{targets} should be the mount +points corresponding to TFTP root directories served by your TFTP +server. =20 @item @code{menu-entries} (default: @code{()}) A possibly empty list of @code{menu-entry} objects (see below), denoting @@ -33567,7 +33572,7 @@ files, packages, and so on. It also creates other = essential files needed for the system to operate correctly---e.g., the @file{/etc}, @file{/var}, and @file{/run} directories, and the @file{/bin/sh} file. =20 -This command also installs bootloader on the target specified in +This command also installs bootloader on the targets specified in @file{my-os-config}, unless the @option{--no-bootloader} option was passed. =20 @@ -33963,7 +33968,7 @@ evaluates to. As an example, @var{file} might cont= ain a definition like this: (timezone "Etc/UTC") (bootloader (bootloader-configuration (bootloader grub-bootloader) - (target "/dev/vda") + (targets '("/dev/vda")) (terminal-outputs '(console)))) (file-systems (cons (file-system (mount-point "/") diff --git a/gnu/bootloader.scm b/gnu/bootloader.scm index 6d7352ddd2..98807a4810 100644 --- a/gnu/bootloader.scm +++ b/gnu/bootloader.scm @@ -55,7 +55,8 @@ bootloader-configuration bootloader-configuration? bootloader-configuration-bootloader - bootloader-configuration-target + bootloader-configuration-target ;deprecated + bootloader-configuration-targets bootloader-configuration-menu-entries bootloader-configuration-default-entry bootloader-configuration-timeout @@ -183,7 +184,9 @@ record." bootloader-configuration make-bootloader-configuration bootloader-configuration? (bootloader bootloader-configuration-bootloader) ; - (target bootloader-configuration-target ;string + (targets %bootloader-configuration-targets ;list of strings + (default #f)) + (target %bootloader-configuration-target ;deprecated (default #f)) (menu-entries bootloader-configuration-menu-entries ;list of (default '())) @@ -204,6 +207,21 @@ record." (serial-speed bootloader-configuration-serial-speed ;integer | #f (default #f))) =20 +;;; Deprecated. +(define (bootloader-configuration-target config) + (warning (G_ "the 'target' field is deprecated, please use 'targets' \ +instead~%")) + (%bootloader-configuration-target config)) + +(define (bootloader-configuration-targets config) + (or (%bootloader-configuration-targets config) + ;; TODO: Remove after the deprecated 'target' field is removed. + (list (bootloader-configuration-target config)) + ;; XXX: At least the GRUB installer (see (gnu bootloader grub)) has = this + ;; peculiar behavior of installing fonts and GRUB modules when DEVIC= E is #f, + ;; hence the default value of '(#f) rather than '(). + (list #f))) + ;;; ;;; Bootloaders. diff --git a/gnu/tests/install.scm b/gnu/tests/install.scm index 80604361e0..d7fafd210c 100644 --- a/gnu/tests/install.scm +++ b/gnu/tests/install.scm @@ -4,7 +4,7 @@ ;;; Copyright =C2=A9 2020 Mathieu Othacehe ;;; Copyright =C2=A9 2020 Danny Milosavljevic ;;; Copyright =C2=A9 2020 Jan (janneke) Nieuwenhuizen -;;; Copyright =C2=A9 2020 Maxim Cournoyer +;;; Copyright =C2=A9 2020, 2021 Maxim Cournoyer ;;; ;;; This file is part of GNU Guix. ;;; @@ -97,7 +97,7 @@ =20 (bootloader (bootloader-configuration (bootloader grub-bootloader) - (target "/dev/vdb"))) + (targets (list "/dev/vdb")))) (kernel-arguments '("console=3DttyS0")) (file-systems (cons (file-system (device (file-system-label "my-root")) @@ -135,7 +135,7 @@ =20 (bootloader (bootloader-configuration (bootloader extlinux-bootloader-gpt) - (target "/dev/vdb"))) + (targets (list "/dev/vdb")))) (kernel-arguments '("console=3DttyS0")) (file-systems (cons (file-system (device (file-system-label "my-root")) @@ -418,7 +418,7 @@ per %test-installed-os, this test is expensive in terms= of CPU and storage.") =20 (bootloader (bootloader-configuration (bootloader grub-bootloader) - (target "/dev/vda"))) + (targets (list "/dev/vda")))) (kernel-arguments '("console=3DttyS0")) (file-systems (cons (file-system (device (file-system-label "my-root")) @@ -549,7 +549,7 @@ partition. In particular, home directories must be cor= rectly created (see =20 (bootloader (bootloader-configuration (bootloader grub-bootloader) - (target "/dev/vdb"))) + (targets (list "/dev/vdb")))) (kernel-arguments '("console=3DttyS0")) (file-systems (cons* (file-system (device (file-system-label "root-fs")) @@ -626,7 +626,7 @@ where /gnu lives on a separate partition.") =20 (bootloader (bootloader-configuration (bootloader grub-bootloader) - (target "/dev/vdb"))) + (targets (list "/dev/vdb")))) (kernel-arguments '("console=3DttyS0")) =20 ;; Add a kernel module for RAID-1 (aka. "mirror"). @@ -842,7 +842,7 @@ build (current-guix) and then store a couple of full sy= stem images.") =20 (bootloader (bootloader-configuration (bootloader grub-bootloader) - (target "/dev/vdb"))) + (targets (list "/dev/vdb")))) (kernel-arguments '("console=3DttyS0")) =20 (mapped-devices (list (mapped-device @@ -929,7 +929,7 @@ reboot\n") =20 (bootloader (bootloader-configuration (bootloader grub-bootloader) - (target "/dev/vdb"))) + (targets (list "/dev/vdb")))) =20 (mapped-devices (list (mapped-device (source @@ -1029,7 +1029,7 @@ store a couple of full system images.") =20 (bootloader (bootloader-configuration (bootloader grub-bootloader) - (target "/dev/vdb"))) + (targets (list "/dev/vdb")))) (kernel-arguments '("console=3DttyS0")) (file-systems (cons (file-system (device (file-system-label "my-root")) @@ -1103,7 +1103,7 @@ build (current-guix) and then store a couple of full = system images.") =20 (bootloader (bootloader-configuration (bootloader grub-bootloader) - (target "/dev/vdb"))) + (targets (list "/dev/vdb")))) (kernel-arguments '("console=3DttyS0")) =20 (file-systems (cons (file-system @@ -1171,7 +1171,7 @@ RAID-0 (stripe) root partition.") (locale "en_US.UTF-8") (bootloader (bootloader-configuration (bootloader grub-bootloader) - (target "/dev/vdb"))) + (targets (list "/dev/vdb")))) (kernel-arguments '("console=3DttyS0")) (file-systems (cons* (file-system (device (file-system-label "btrfs-pool")) @@ -1264,7 +1264,7 @@ build (current-guix) and then store a couple of full = system images.") =20 (bootloader (bootloader-configuration (bootloader grub-bootloader) - (target "/dev/vdb"))) + (targets (list "/dev/vdb")))) (kernel-arguments '("console=3DttyS0")) (file-systems (cons (file-system (device (file-system-label "my-root")) @@ -1337,7 +1337,7 @@ build (current-guix) and then store a couple of full = system images.") =20 (bootloader (bootloader-configuration (bootloader grub-bootloader) - (target "/dev/vdb"))) + (targets (list "/dev/vdb")))) (kernel-arguments '("console=3DttyS0")) (file-systems (cons (file-system (device (file-system-label "my-root")) diff --git a/gnu/tests/reconfigure.scm b/gnu/tests/reconfigure.scm index 52beeef447..001b5d185a 100644 --- a/gnu/tests/reconfigure.scm +++ b/gnu/tests/reconfigure.scm @@ -261,7 +261,7 @@ bootloader's configuration file." ;; would attempt to write directly to the virtual disk if the ;; installation script were run. (test - (install-bootloader-program #f #f #f bootcfg bootcfg-file #f "/"))))) + (install-bootloader-program #f #f #f bootcfg bootcfg-file '(#f) "/")= )))) =20 =20 (define %test-switch-to-system diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm index 40401d7e03..83bbefd3dc 100644 --- a/guix/scripts/system.scm +++ b/guix/scripts/system.scm @@ -253,7 +253,7 @@ the ownership of '~a' may be incorrect!~%") #:target target) (return (info (G_ "bootloader successfully installed on '~a'~%") - (bootloader-configuration-target bootloader)))))))) + (bootloader-configuration-targets bootloader)))))))) =20 ;;; @@ -768,14 +768,13 @@ and TARGET arguments." skip-safety-checks? install-bootloader? dry-run? derivations-only? - use-substitutes? bootloader-target target + use-substitutes? target full-boot? container-shared-network? (mappings '()) (gc-root #f)) "Perform ACTION for IMAGE. INSTALL-BOOTLOADER? specifies whether to ins= tall -bootloader; BOOTLOADER-TAGET is the target for the bootloader; TARGET is t= he -target root directory. +bootloader; TARGET is the target root directory. =20 FULL-BOOT? is used for the 'vm' action; it determines whether to boot directly to the kernel or to the bootloader. CONTAINER-SHARED-NETWOR= K? @@ -856,13 +855,13 @@ static checks." #:target (or target "/")) (return (info (G_ "bootloader successfully installed on '~a'~%") - (bootloader-configuration-target bootloader)))) + (bootloader-configuration-targets bootloader)))) (with-shepherd-error-handling - (upgrade-shepherd-services local-eval os) - (return (format #t (G_ "\ + (upgrade-shepherd-services local-eval os) + (return (format #t (G_ "\ To complete the upgrade, run 'herd restart SERVICE' to stop, upgrade, and restart each service that was not automatically restarted.\n"= ))) - (return (format #t (G_ "\ + (return (format #t (G_ "\ Run 'herd status' to view the list of services on your system.\n")))))) ((init) (newline) @@ -1218,9 +1217,9 @@ resulting from command-line parsing." (target-file (match args ((first second) second) (_ #f))) - (bootloader-target + (bootloader-targets (and bootloader? - (bootloader-configuration-target + (bootloader-configuration-targets (operating-system-bootloader os))))) =20 (define (graph-backend) @@ -1269,7 +1268,6 @@ resulting from command-line parsing." opts) #:install-bootloader? bootloader? #:target target-file - #:bootloader-target bootloader-target #:gc-root (assoc-ref opts 'gc-root))))) #:target target #:system system))) diff --git a/guix/scripts/system/reconfigure.scm b/guix/scripts/system/reco= nfigure.scm index 49da6ecb16..bf23fb06af 100644 --- a/guix/scripts/system/reconfigure.scm +++ b/guix/scripts/system/reconfigure.scm @@ -207,10 +207,10 @@ services as defined by OS." =20 (define (install-bootloader-program installer disk-installer bootloader-package bootcfg - bootcfg-file device target) + bootcfg-file devices target) "Return an executable store item that, upon being evaluated, will install -BOOTCFG to BOOTCFG-FILE, a target file name, on DEVICE, a file system devi= ce, -at TARGET, a mount point, and subsequently run INSTALLER from +BOOTCFG to BOOTCFG-FILE, a target file name, on DEVICES, a list of file sy= stem +devices, at TARGET, a mount point, and subsequently run INSTALLER from BOOTLOADER-PACKAGE." (program-file "install-bootloader.scm" @@ -254,11 +254,17 @@ BOOTLOADER-PACKAGE." ;; The bootloader might not support installation on a ;; mounted directory using the BOOTLOADER-INSTALLER ;; procedure. In that case, fallback to installing the - ;; bootloader directly on DEVICE using the + ;; bootloader directly on DEVICES using the ;; BOOTLOADER-DISK-IMAGE-INSTALLER procedure. (if #$installer - (#$installer #$bootloader-package #$device #$target) - (#$disk-installer #$bootloader-package 0 #$device))) + (for-each (lambda (device) + (#$installer #$bootloader-package device + #$target)) + '#$devices) + (for-each (lambda (device) + (#$disk-installer #$bootloader-package + 0 device)) + '#$devices))) (lambda args (delete-file new-gc-root) (match args @@ -284,7 +290,7 @@ additional configurations specified by MENU-ENTRIES can= be selected." (disk-installer (and run-installer? (bootloader-disk-image-installer bootloader)= )) (package (bootloader-package bootloader)) - (device (bootloader-configuration-target configuration)) + (devices (bootloader-configuration-targets configuration)) (bootcfg-file (bootloader-configuration-file bootloader))) (eval #~(parameterize ((current-warning-port (%make-void-port "w"))) (primitive-load #$(install-bootloader-program installer @@ -292,7 +298,7 @@ additional configurations specified by MENU-ENTRIES can= be selected." package bootcfg bootcfg-file - device + devices target)))))) =20 diff --git a/tests/guix-system.sh b/tests/guix-system.sh index 7e992e7bdb..6aab1f380a 100644 --- a/tests/guix-system.sh +++ b/tests/guix-system.sh @@ -115,7 +115,7 @@ cat > "$tmpfile" <From b237a30bda70818866885451ae999aa4be9038a9 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Sat, 7 Aug 2021 15:07:47 -0400 Subject: [PATCH 2/2] Migrate to the new 'targets' field of bootloader-configuration. The old 'target' field is deprecated; adjust the sources to use the new 'targets' one instead. * doc/guix-cookbook.texi: Replace by 'targets'. * gnu/bootloader/grub.scm: Likewise. * gnu/installer/parted.scm: Likewise. * gnu/machine/digital-ocean.scm: Likewise. * gnu/system/examples/asus-c201.tmpl: Likewise * gnu/system/examples/bare-bones.tmpl: Likewise * gnu/system/examples/bare-hurd.tmpl: Likewise * gnu/system/examples/beaglebone-black.tmpl: Likewise * gnu/system/examples/desktop.tmpl: Likewise * gnu/system/examples/docker-image.tmpl: Likewise * gnu/system/examples/lightweight-desktop.tmpl: Likewise * gnu/system/examples/vm-image.tmpl: Likewise * gnu/system/examples/yggdrasil.tmpl: Likewise * gnu/system/hurd.scm: Likewise * gnu/system/images/hurd.scm: Likewise * gnu/system/images/novena.scm: Likewise * gnu/system/images/pine64.scm: Likewise * gnu/system/images/pinebook-pro.scm: Likewise * gnu/system/images/rock64.scm: Likewise * gnu/system/install.scm: Likewise * gnu/system/vm.scm: Likewise * gnu/tests.scm: Likewise * gnu/tests/ganeti.scm: Likewise * gnu/tests/install.scm: Likewise * gnu/tests/nfs.scm: Likewise * gnu/tests/telephony.scm: Likewise * tests/boot-parameters.scm: Likewise * tests/system.scm: Likewise --- doc/guix-cookbook.texi | 2 +- gnu/bootloader/grub.scm | 5 +++-- gnu/installer/parted.scm | 4 ++-- gnu/machine/digital-ocean.scm | 2 +- gnu/system/examples/asus-c201.tmpl | 2 +- gnu/system/examples/bare-bones.tmpl | 2 +- gnu/system/examples/bare-hurd.tmpl | 2 +- gnu/system/examples/beaglebone-black.tmpl | 2 +- gnu/system/examples/desktop.tmpl | 2 +- gnu/system/examples/docker-image.tmpl | 2 +- gnu/system/examples/lightweight-desktop.tmpl | 2 +- gnu/system/examples/vm-image.tmpl | 2 +- gnu/system/examples/yggdrasil.tmpl | 2 +- gnu/system/hurd.scm | 2 +- gnu/system/images/hurd.scm | 2 +- gnu/system/images/novena.scm | 2 +- gnu/system/images/pine64.scm | 2 +- gnu/system/images/pinebook-pro.scm | 2 +- gnu/system/images/rock64.scm | 2 +- gnu/system/install.scm | 6 +++--- gnu/system/vm.scm | 2 +- gnu/tests.scm | 2 +- gnu/tests/ganeti.scm | 2 +- gnu/tests/install.scm | 4 ++-- gnu/tests/nfs.scm | 2 +- gnu/tests/telephony.scm | 2 +- tests/boot-parameters.scm | 2 +- tests/system.scm | 4 ++-- 28 files changed, 35 insertions(+), 34 deletions(-) diff --git a/doc/guix-cookbook.texi b/doc/guix-cookbook.texi index 2e627ecc51..3cb5b59e69 100644 --- a/doc/guix-cookbook.texi +++ b/doc/guix-cookbook.texi @@ -1718,7 +1718,7 @@ operating-system dedicated to the @b{Pine A64 LTS} bo= ard. (locale "en_US.utf8") (bootloader (bootloader-configuration (bootloader u-boot-pine64-lts-bootloader) - (target "/dev/vda"))) + (targets '("/dev/vda")))) (initrd-modules '()) (kernel linux-libre-arm64-generic) (file-systems (cons (file-system diff --git a/gnu/bootloader/grub.scm b/gnu/bootloader/grub.scm index ce146aba3c..d8e888ff40 100644 --- a/gnu/bootloader/grub.scm +++ b/gnu/bootloader/grub.scm @@ -647,11 +647,12 @@ below the directory TARGET for the system whose root = is mounted at MOUNT-POINT. MOUNT-POINT is the last argument in 'guix system init /etc/config.scm mnt/= point' or '/' for other 'guix system' commands. =20 -TARGET is the target argument given to the bootloader-configuration in +Where TARGET comes from the targets argument given to the +bootloader-configuration in: =20 (operating-system (bootloader (bootloader-configuration - (target \"/boot\") + (targets '(\"/boot\")) =E2=80=A6)) =E2=80=A6) =20 diff --git a/gnu/installer/parted.scm b/gnu/installer/parted.scm index 1f9cec1d11..c000b1dec2 100644 --- a/gnu/installer/parted.scm +++ b/gnu/installer/parted.scm @@ -1356,9 +1356,9 @@ from (gnu system mapped-devices) and return it." `((bootloader-configuration ,@(if (efi-installation?) `((bootloader grub-efi-bootloader) - (target ,(default-esp-mount-point))) + (targets (list ,(default-esp-mount-point)))) `((bootloader grub-bootloader) - (target ,root-partition-disk))) + (targets (list ,root-partition-disk)))) =20 ;; XXX: Assume we defined the 'keyboard-layout' field of ;; right above. diff --git a/gnu/machine/digital-ocean.scm b/gnu/machine/digital-ocean.scm index d97c300d18..90b66a54d9 100644 --- a/gnu/machine/digital-ocean.scm +++ b/gnu/machine/digital-ocean.scm @@ -235,7 +235,7 @@ cat > /etc/bootstrap-config.scm << EOF (timezone \"Etc/UTC\") (bootloader (bootloader-configuration (bootloader grub-bootloader) - (target \"/dev/vda\") + (targets '(\"/dev/vda\")) (terminal-outputs '(console)))) (file-systems (cons (file-system (mount-point \"/\") diff --git a/gnu/system/examples/asus-c201.tmpl b/gnu/system/examples/asus-= c201.tmpl index c08f85367f..6b6aa706fa 100644 --- a/gnu/system/examples/asus-c201.tmpl +++ b/gnu/system/examples/asus-c201.tmpl @@ -14,7 +14,7 @@ ;; "my-root" is the label of the target root file system. (bootloader (bootloader-configuration (bootloader depthcharge-bootloader) - (target "/dev/mmcblk0p1"))) + (targets '("/dev/mmcblk0p1")))) =20 ;; The ASUS C201PA requires a very particular kernel to boot, ;; as well as the following arguments. diff --git a/gnu/system/examples/bare-bones.tmpl b/gnu/system/examples/bare= -bones.tmpl index 1035ab1d60..387e4b12ba 100644 --- a/gnu/system/examples/bare-bones.tmpl +++ b/gnu/system/examples/bare-bones.tmpl @@ -15,7 +15,7 @@ ;; root file system. (bootloader (bootloader-configuration (bootloader grub-bootloader) - (target "/dev/sdX"))) + (targets '("/dev/sdX")))) (file-systems (cons (file-system (device (file-system-label "my-root")) (mount-point "/") diff --git a/gnu/system/examples/bare-hurd.tmpl b/gnu/system/examples/bare-= hurd.tmpl index 135ed23cb6..f0dd0cf742 100644 --- a/gnu/system/examples/bare-hurd.tmpl +++ b/gnu/system/examples/bare-hurd.tmpl @@ -32,7 +32,7 @@ (inherit %hurd-default-operating-system) (bootloader (bootloader-configuration (bootloader grub-minimal-bootloader) - (target "/dev/sdX"))) + (targets '("/dev/sdX")))) (file-systems (cons (file-system (device (file-system-label "my-root")) (mount-point "/") diff --git a/gnu/system/examples/beaglebone-black.tmpl b/gnu/system/example= s/beaglebone-black.tmpl index def05e807d..90dab62062 100644 --- a/gnu/system/examples/beaglebone-black.tmpl +++ b/gnu/system/examples/beaglebone-black.tmpl @@ -14,7 +14,7 @@ ;; the label of the target root file system. (bootloader (bootloader-configuration (bootloader u-boot-beaglebone-black-bootloader) - (target "/dev/mmcblk1"))) + (targets '("/dev/mmcblk1")))) =20 ;; This module is required to mount the SD card. (initrd-modules (cons "omap_hsmmc" %base-initrd-modules)) diff --git a/gnu/system/examples/desktop.tmpl b/gnu/system/examples/desktop= .tmpl index 716b9feb8d..c928008c92 100644 --- a/gnu/system/examples/desktop.tmpl +++ b/gnu/system/examples/desktop.tmpl @@ -19,7 +19,7 @@ ;; Partition mounted on /boot/efi. (bootloader (bootloader-configuration (bootloader grub-efi-bootloader) - (target "/boot/efi") + (targets '("/boot/efi")) (keyboard-layout keyboard-layout))) =20 ;; Specify a mapped device for the encrypted root partition. diff --git a/gnu/system/examples/docker-image.tmpl b/gnu/system/examples/do= cker-image.tmpl index ca633cc838..bdc6afa6f0 100644 --- a/gnu/system/examples/docker-image.tmpl +++ b/gnu/system/examples/docker-image.tmpl @@ -35,7 +35,7 @@ ;; This will be ignored. (bootloader (bootloader-configuration (bootloader grub-bootloader) - (target "does-not-matter"))) + (targets '("does-not-matter")))) ;; This will be ignored, too. (file-systems (list (file-system (device "does-not-matter") diff --git a/gnu/system/examples/lightweight-desktop.tmpl b/gnu/system/exam= ples/lightweight-desktop.tmpl index d5a63dc457..d4330ecc8e 100644 --- a/gnu/system/examples/lightweight-desktop.tmpl +++ b/gnu/system/examples/lightweight-desktop.tmpl @@ -16,7 +16,7 @@ ;; Partition mounted on /boot/efi. (bootloader (bootloader-configuration (bootloader grub-efi-bootloader) - (target "/boot/efi"))) + (targets '("/boot/efi")))) =20 ;; Assume the target root file system is labelled "my-root", ;; and the EFI System Partition has UUID 1234-ABCD. diff --git a/gnu/system/examples/vm-image.tmpl b/gnu/system/examples/vm-ima= ge.tmpl index 697019e877..a59d91587b 100644 --- a/gnu/system/examples/vm-image.tmpl +++ b/gnu/system/examples/vm-image.tmpl @@ -51,7 +51,7 @@ accounts.\x1b[0m ;; Adjust as needed. (bootloader (bootloader-configuration (bootloader grub-bootloader) - (target "/dev/vda") + (targets '("/dev/vda")) (terminal-outputs '(console)))) (file-systems (cons (file-system (mount-point "/") diff --git a/gnu/system/examples/yggdrasil.tmpl b/gnu/system/examples/yggdr= asil.tmpl index be80bf4de9..4d34f49b54 100644 --- a/gnu/system/examples/yggdrasil.tmpl +++ b/gnu/system/examples/yggdrasil.tmpl @@ -15,7 +15,7 @@ ;; root file system. (bootloader (bootloader-configuration (bootloader grub-bootloader) - (target "/dev/sdX"))) + (targets '("/dev/sdX")))) (file-systems (cons (file-system (device (file-system-label "my-root")) (mount-point "/") diff --git a/gnu/system/hurd.scm b/gnu/system/hurd.scm index 8f3a27834b..685d16eac2 100644 --- a/gnu/system/hurd.scm +++ b/gnu/system/hurd.scm @@ -108,7 +108,7 @@ (hurd hurd) (bootloader (bootloader-configuration (bootloader grub-minimal-bootloader) - (target "/dev/vda"))) + (targets '("/dev/vda")))) (initrd #f) (initrd-modules (lambda _ '())) (firmware '()) diff --git a/gnu/system/images/hurd.scm b/gnu/system/images/hurd.scm index eac5b7f7e6..fc2dbe3209 100644 --- a/gnu/system/images/hurd.scm +++ b/gnu/system/images/hurd.scm @@ -42,7 +42,7 @@ (inherit %hurd-default-operating-system) (bootloader (bootloader-configuration (bootloader grub-minimal-bootloader) - (target "/dev/sdX"))) + (targets '("/dev/sdX")))) (file-systems (cons (file-system (device (file-system-label "my-root")) (mount-point "/") diff --git a/gnu/system/images/novena.scm b/gnu/system/images/novena.scm index 1cd724ff88..63227af509 100644 --- a/gnu/system/images/novena.scm +++ b/gnu/system/images/novena.scm @@ -39,7 +39,7 @@ (locale "en_US.utf8") (bootloader (bootloader-configuration (bootloader u-boot-novena-bootloader) - (target "/dev/vda"))) + (targets '("/dev/vda")))) (initrd-modules '("sdhci-esdhc-imx" "ahci_imx" "i2c-dev")) ;(kernel linux-libre-arm-generic) (kernel-arguments '("console=3Dttymxc1,115200")) diff --git a/gnu/system/images/pine64.scm b/gnu/system/images/pine64.scm index 613acd5cfd..808c71295f 100644 --- a/gnu/system/images/pine64.scm +++ b/gnu/system/images/pine64.scm @@ -38,7 +38,7 @@ (locale "en_US.utf8") (bootloader (bootloader-configuration (bootloader u-boot-pine64-lts-bootloader) - (target "/dev/vda"))) + (targets '("/dev/vda")))) (initrd-modules '()) (kernel linux-libre-arm64-generic) (file-systems (cons (file-system diff --git a/gnu/system/images/pinebook-pro.scm b/gnu/system/images/pineboo= k-pro.scm index b56a7ea409..991c86aa9f 100644 --- a/gnu/system/images/pinebook-pro.scm +++ b/gnu/system/images/pinebook-pro.scm @@ -38,7 +38,7 @@ (locale "en_US.utf8") (bootloader (bootloader-configuration (bootloader u-boot-pinebook-pro-rk3399-bootloader) - (target "/dev/vda"))) + (targets '("/dev/vda")))) (initrd-modules '()) (kernel linux-libre-arm64-generic) (file-systems (cons (file-system diff --git a/gnu/system/images/rock64.scm b/gnu/system/images/rock64.scm index 3f193e8528..68d3742adc 100644 --- a/gnu/system/images/rock64.scm +++ b/gnu/system/images/rock64.scm @@ -39,7 +39,7 @@ (locale "en_US.utf8") (bootloader (bootloader-configuration (bootloader u-boot-rock64-rk3328-bootloader) - (target "/dev/sda"))) + (targets '("/dev/sda")))) (initrd-modules '()) (kernel linux-libre-arm64-generic) (file-systems (cons (file-system diff --git a/gnu/system/install.scm b/gnu/system/install.scm index 7fa5c15324..f96e18ba63 100644 --- a/gnu/system/install.scm +++ b/gnu/system/install.scm @@ -453,7 +453,7 @@ Access documentation at any time by pressing Alt-F2.\x1= b[0m (name-service-switch %mdns-host-lookup-nss) (bootloader (bootloader-configuration (bootloader grub-bootloader) - (target "/dev/sda"))) + (targets '("/dev/sda")))) (label (string-append "GNU Guix installation " (package-version guix))) =20 @@ -528,7 +528,7 @@ operating-system's kernel-arguments (\"console=3DttyS0\= " or similar)." (bootloader (bootloader-configuration (bootloader (bootloader (inherit u-boot-bootloader) (package (make-u-boot-package board triplet)= ))) - (target bootloader-target))))) + (targets (list bootloader-target)))))) =20 (define* (embedded-installation-os bootloader bootloader-target tty #:key (extra-modules '())) @@ -540,7 +540,7 @@ The bootloader BOOTLOADER is installed to BOOTLOADER-TA= RGET." (inherit installation-os) (bootloader (bootloader-configuration (bootloader bootloader) - (target bootloader-target))) + (targets (list bootloader-target)))) (kernel linux-libre) (kernel-arguments (cons (string-append "console=3D" tty) diff --git a/gnu/system/vm.scm b/gnu/system/vm.scm index 3390f5a88f..a532be2dad 100644 --- a/gnu/system/vm.scm +++ b/gnu/system/vm.scm @@ -630,7 +630,7 @@ environment with the store shared with the host. MAPPI= NGS is a list of (bootloader (bootloader-configuration (inherit (operating-system-bootloader os)) (bootloader grub-bootloader) - (target "/dev/vda"))) + (targets '("/dev/vda")))) =20 (initrd (lambda (file-systems . rest) (apply (operating-system-initrd os) diff --git a/gnu/tests.scm b/gnu/tests.scm index eb636873a2..85f38ae8c9 100644 --- a/gnu/tests.scm +++ b/gnu/tests.scm @@ -222,7 +222,7 @@ the system under test." =20 (bootloader (bootloader-configuration (bootloader grub-bootloader) - (target "/dev/sdX"))) + (targets '("/dev/sdX")))) (file-systems (cons (file-system (device (file-system-label "my-root")) (mount-point "/") diff --git a/gnu/tests/ganeti.scm b/gnu/tests/ganeti.scm index 19c26b86dd..b64a332dde 100644 --- a/gnu/tests/ganeti.scm +++ b/gnu/tests/ganeti.scm @@ -38,7 +38,7 @@ =20 (bootloader (bootloader-configuration (bootloader grub-bootloader) - (target "/dev/vda"))) + (targets '("/dev/vda")))) (file-systems (cons (file-system (device (file-system-label "my-root")) (mount-point "/") diff --git a/gnu/tests/install.scm b/gnu/tests/install.scm index d7fafd210c..130a4f76b0 100644 --- a/gnu/tests/install.scm +++ b/gnu/tests/install.scm @@ -494,7 +494,7 @@ reboot\n") =20 (bootloader (bootloader-configuration (bootloader grub-bootloader) - (target "/dev/vdb"))) + (targets '("/dev/vdb")))) (kernel-arguments '("console=3DttyS0")) (file-systems (cons* (file-system (device (file-system-label "my-root")) @@ -709,7 +709,7 @@ by 'mdadm'.") =20 (bootloader (bootloader-configuration (bootloader grub-bootloader) - (target "/dev/vdb"))) + (targets '("/dev/vdb")))) =20 ;; Note: Do not pass "console=3DttyS0" so we can use our passphrase pr= ompt ;; detection logic in 'enter-luks-passphrase'. diff --git a/gnu/tests/nfs.scm b/gnu/tests/nfs.scm index 9b2b785176..a0c091eadb 100644 --- a/gnu/tests/nfs.scm +++ b/gnu/tests/nfs.scm @@ -50,7 +50,7 @@ =20 (bootloader (bootloader-configuration (bootloader grub-bootloader) - (target "/dev/sdX"))) + (targets '("/dev/sdX")))) (file-systems %base-file-systems) (users %base-user-accounts) (packages (cons* diff --git a/gnu/tests/telephony.scm b/gnu/tests/telephony.scm index 1155a9dbc2..aeb6500c47 100644 --- a/gnu/tests/telephony.scm +++ b/gnu/tests/telephony.scm @@ -74,7 +74,7 @@ =20 (bootloader (bootloader-configuration (bootloader grub-bootloader) - (target "/dev/sdX"))) + (targets '("/dev/sdX")))) (file-systems (cons (file-system (device (file-system-label "my-root")) (mount-point "/") diff --git a/tests/boot-parameters.scm b/tests/boot-parameters.scm index 3deae564c4..b2799d0596 100644 --- a/tests/boot-parameters.scm +++ b/tests/boot-parameters.scm @@ -81,7 +81,7 @@ =20 (bootloader (bootloader-configuration (bootloader grub-bootloader) - (target "/dev/sda"))) + (targets '("/dev/sda")))) (file-systems (cons* (file-system (device %default-root-device) (mount-point %root-path) diff --git a/tests/system.scm b/tests/system.scm index 9416b950e6..019c720e65 100644 --- a/tests/system.scm +++ b/tests/system.scm @@ -39,7 +39,7 @@ (locale "en_US.utf8") (bootloader (bootloader-configuration (bootloader grub-bootloader) - (target "/dev/sdX"))) + (targets '("/dev/sdX")))) (file-systems (cons %root-fs %base-file-systems)) =20 (users %base-user-accounts))) @@ -56,7 +56,7 @@ (locale "en_US.utf8") (bootloader (bootloader-configuration (bootloader grub-bootloader) - (target "/dev/sdX"))) + (targets '("/dev/sdX")))) (mapped-devices (list %luks-device)) (file-systems (cons (file-system (inherit %root-fs) --=20 2.32.0 --=-=-= Content-Type: text/plain Thanks, Maxim --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 09 11:07:45 2021 Received: (at control) by debbugs.gnu.org; 9 Aug 2021 15:07:45 +0000 Received: from localhost ([127.0.0.1]:57494 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mD6sT-0002Gg-Mu for submit@debbugs.gnu.org; Mon, 09 Aug 2021 11:07:45 -0400 Received: from mail-qt1-f175.google.com ([209.85.160.175]:42545) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mD6sS-0002GU-0j for control@debbugs.gnu.org; Mon, 09 Aug 2021 11:07:44 -0400 Received: by mail-qt1-f175.google.com with SMTP id t16so2405254qta.9 for ; Mon, 09 Aug 2021 08:07:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:message-id:to:from:subject; bh=sOTwop6JohfakLYWbCa3yq6fZZ1ErL8N9KN8bt1mksw=; b=jfxEcbBHtvhsTVqU+uMglTt0CvrTyuyjGDc9XOF4u3hi9ovcyeuU6QUJZNQuwXnXHu uHMOU1fZfbBe0qXzRi8sLz6W6O5fYdGv7m5mcKdjRVayvXt9ZMucqLiV/pnBHLaRJO4s MeTBGfmnDwj+zRrBjFaSZ+Ue4EM1KWukuGOL6O6rD6sig903xMioUI3zqLAA+QGsLsqN hzMvI5iIf3sUszwIqOaquw4b5tlVf7vZsyYLGYcxcMFEZtb1tXkzErBq3UoZjTAqXsdM RpPNS9MCY27ZjSLuIjCOnFKijQUP8cJGrcFwaI78cSbSZdaEx9YNoowwh5i2rYJkosGe Y54w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:message-id:to:from:subject; bh=sOTwop6JohfakLYWbCa3yq6fZZ1ErL8N9KN8bt1mksw=; b=G8ByAccxOFQrZ5Tc/qaHySYyYXHMbnjjUZaDdBujv1zuUdrAbm2kIImk/vjk6cAnmw Gng4en+6GKsG8mF56rV1ZdWgWgWCfjDs85Kr0z3Iy6EeiRtPs38Do8H8HVESZV/RICjl dfkxUp8gpojOwkJ0dRHUu5SuwHw2ve9ywRWNMjhKOZEccxpNMNYUZpi7Jw6tpcLzvXo8 cSQlZW4xhFH1f5L0IRw1jnTBaOpM7WeOrsKNdTBck7qdECyk29rcNvivy2NOp+oluXvf 3Vj6ow88pXpu1WUMLxLbmBjy6Z5C2ZDrHIEVEXzf2U8EstM7QZDFwAPEwbMOTjnz26J7 ccFQ== X-Gm-Message-State: AOAM533LgVjF/DtbOGGfeysiY2TBZ+p18wwA6MHHs7HO+sXYC8GSIBfT O1jpkyEj1c7KVTqGGgAZ4MT8e1fX6tjmlQ== X-Google-Smtp-Source: ABdhPJxKJTgFjodPOZDsX2gAzQ60ZGaw9AsoMT5fUAPV/35bK4rCVFf2LMkB67A5u5KpTx1UcSsD/w== X-Received: by 2002:ac8:7d52:: with SMTP id h18mr20098141qtb.179.1628521658312; Mon, 09 Aug 2021 08:07:38 -0700 (PDT) Received: from hurd (dsl-155-134.b2b2c.ca. [66.158.155.134]) by smtp.gmail.com with ESMTPSA id u3sm4187164qke.95.2021.08.09.08.07.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Aug 2021 08:07:37 -0700 (PDT) Date: Mon, 09 Aug 2021 11:07:37 -0400 Message-Id: <87sfzi1wsm.fsf@gmail.com> To: control@debbugs.gnu.org From: Maxim Cournoyer Subject: control message for bug #40997 X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) tags 40997 + patch quit From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 29 01:19:36 2021 Received: (at 40997-done) by debbugs.gnu.org; 29 Aug 2021 05:19:36 +0000 Received: from localhost ([127.0.0.1]:55288 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mKDEF-0004Sp-Tt for submit@debbugs.gnu.org; Sun, 29 Aug 2021 01:19:36 -0400 Received: from mail-qk1-f179.google.com ([209.85.222.179]:42705) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mKDED-0004Sa-AC for 40997-done@debbugs.gnu.org; Sun, 29 Aug 2021 01:19:34 -0400 Received: by mail-qk1-f179.google.com with SMTP id t4so11957584qkb.9 for <40997-done@debbugs.gnu.org>; Sat, 28 Aug 2021 22:19:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:references:date:in-reply-to:message-id:user-agent :mime-version; bh=EwzBhijJdQ0pANiG6qF3y5/mIE15k3IPENn3IuhMCsY=; b=my/meIwGOk1TjlcFkDbGxX2HPP9EIgJHdzHlJazaxRD7G10CXt8mHSdGEQWmmTX8BS 9CRCwMjHZlQEEgr9JpIpfN9OSeW+PpC3yrV7wHBcFxEPyGhWIlddbnH/k4kmbxFaf34d A86OrXq4B8JC8ICcSgsMSrfrn1E/YoKBSzPRSRPmLx21QeAI6Xyh4tOxGXl0FaYf+Xpz ltcYUM8LRtaJkiFfAMOGLwZOlSRMHiyvNyz9pKkdTaWAmwr35ElS3/oHZ0xSw/gjNqcU d8dp9Y47eAaIfUcjMYgFLzaCBBNHazL0ngs0CHLq6fNqunegPRLo4JDgDk6vA21H9w2H RRFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=EwzBhijJdQ0pANiG6qF3y5/mIE15k3IPENn3IuhMCsY=; b=Ov96eXtT+4rnC2Nvx4EtwIC8JqEtdp8L0BQ24esto3KVwfiW+VTbvSa2h+j5Zys5G3 btXEvyq+CLhmtUZsqL+NpgWtpIA6eH7bvnioCOHY2FIHYSurVOzGxhKe7H0JP0tcBFrD gPoLpjbZSBb+JOIw//yRWWw+HMJhPTRI8k3ehE/YRsCmJ2ySV1jzLoeC2gujHXbjb3K8 EeJoVBnLAQOrHtrIxkvNH0SQGfaajtfKena8faQK9jTDV4R+DPYSRYasZrPnYXzGGL9n 46JP4GE0lN7z+RFXwDGdqmyKYxkXI4bsVJuFfxXOcP5I99R5E8RtvXzmmxpucqGBV6Zz XLhw== X-Gm-Message-State: AOAM530nv7SxqeMnw34HfRPLUXyejx/dO4fDmgVz3pYpSwdencVZguDM ACSoKAbTBpSYU3L8Pk3u9AeDtazBhOc= X-Google-Smtp-Source: ABdhPJxSUwOKOIgeVf8bA1sKAfyQJEAkq4WfEfzp/GypHXfjDXOosl/DC2PL95dRtfGorHLoDgyKeg== X-Received: by 2002:a37:b3c6:: with SMTP id c189mr16383846qkf.343.1630214367494; Sat, 28 Aug 2021 22:19:27 -0700 (PDT) Received: from hurd (dsl-205-151-56-126.b2b2c.ca. [205.151.56.126]) by smtp.gmail.com with ESMTPSA id c7sm6605044qtv.9.2021.08.28.22.19.26 for <40997-done@debbugs.gnu.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 28 Aug 2021 22:19:27 -0700 (PDT) From: Maxim Cournoyer To: 40997-done@debbugs.gnu.org Subject: Re: bug#40997: [raid] The bootloader can only be installed to a single drive References: <87wo5vkbvn.fsf@hurd.i-did-not-set--mail-host-address--so-tickle-me> <877dgw36n6.fsf@gmail.com> Date: Sun, 29 Aug 2021 01:19:26 -0400 In-Reply-To: <877dgw36n6.fsf@gmail.com> (Maxim Cournoyer's message of "Sun, 08 Aug 2021 00:25:01 -0400") Message-ID: <87v93orfoh.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 40997-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello, Maxim Cournoyer writes: > Hello, > > maxim.cournoyer@gmail.com writes: > >> Using Guix System, the bootloader declaration doesn't currently seem to >> support being installed to multiple drives: >> >> (bootloader (bootloader-configuration >> (bootloader grub-bootloader) >> (target "/dev/sda") >> (terminal-outputs '(console)))) >> --8<---------------cut here---------------end--------------->8--- >> >> I suggest to change it so that target can be passed a list like >> >> (bootloader (bootloader-configuration >> (bootloader grub-bootloader) >> (target '("/dev/sda" "/dev/sdb")) >> (terminal-outputs '(console)))) >> --8<---------------cut here---------------end--------------->8--- >> >> This is useful when trying to boot a degraded RAID array. > > The following patches do exactly this (target becomes the plural > targets). I tested it on my system, disconnecting the first drive of my > RAID1 array, and could at least boot to GRUB fine (although full boot > failed due to https://issues.guix.gnu.org/40999). > > Booting a VM using an image generated from the bare-bones.tmpl template > also worked fine. Pushed with commit 2ca982ff41270288913ad6b7d5d9e1cad87b06d9. Closing! Maxim From unknown Fri Jun 20 07:16:50 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 26 Sep 2021 11:24:06 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 06 11:36:33 2024 Received: (at control) by debbugs.gnu.org; 6 Dec 2024 16:36:33 +0000 Received: from localhost ([127.0.0.1]:44045 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tJbJh-00022D-36 for submit@debbugs.gnu.org; Fri, 06 Dec 2024 11:36:33 -0500 Received: from mail-qk1-f194.google.com ([209.85.222.194]:58502) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tJbJe-000221-A6 for control@debbugs.gnu.org; Fri, 06 Dec 2024 11:36:31 -0500 Received: by mail-qk1-f194.google.com with SMTP id af79cd13be357-7b666215645so120903685a.0 for ; Fri, 06 Dec 2024 08:36:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1733502922; x=1734107722; darn=debbugs.gnu.org; h=mime-version:message-id:date:subject:to:from:from:to:cc:subject :date:message-id:reply-to; bh=Kj4GNd1XrqEepgf7g6UqYdfStOGSe3XiWzwv4bZOsKA=; b=QjSL4ChOrNogB7YEhnHlnYTOnzeB8YwJMlCXBqG3mjQhNGzTtemdXebvCRVmmy9vSB R1z2iggmTjZVvrg9UXYr+xbp6vWaGALub73bpm7DXzq7+FaaDCUt2VNt01OtKspHFSc5 SbYMzRRLDVdlJ7RZ7yc5ndSWBaH5ZMl0x9RgVVV1U2SIJvSTqpLP75X18FOK7ieXVbYD y/93DJJotK2XqGskzN72FnNAXQOTDllinHzSOe/svF7hD5kQ7by9BzShX//eWDOALjAu s06mKw+UqLjGreggb6qz6GXmUZLy8Vyu0HXFR8plvuo2H/Yp5LFmG76jtDdBF4tt9nMY 2ZVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733502922; x=1734107722; h=mime-version:message-id:date:subject:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=Kj4GNd1XrqEepgf7g6UqYdfStOGSe3XiWzwv4bZOsKA=; b=Q5fSVR5VcdZ4piJYJxI2SVLQF7euq3MnX8BfqxMAu0B7cxzJ9PXS0IldFEp5TSOgml fQkzFtuaCmhpPlUFCi9rk6qJ53sU14XIAii9/VRgQ107ghMivwPseE1XHT/oV7xXXjTa tkVpO6jNgbTOvgY92TLkO/Wu/iErz9rLGoBv4dghLdnGLlOhFwiawGsXfANSANawqD8z aH9BPsqFtqN4WScyQ8G1PEeLlSVcE2yBuwaWHiRxtXDWq0YwL3nIJLAkOhuj/OQooOfz pv/XKf4p4i3nuNaYcEjTQJcljFYhKLEE5LJwVOp00P+QDmtxzOHVjxv8yVH7L5QnRqn1 PxJA== X-Gm-Message-State: AOJu0Yxb+vSPkhat+lPouwj4+li5ErZqRysS47WRjZWaZyMWiDm/SpIw R+RhAALMpHF1s1hbj9cSQbrQZOOVu7aD0ciEOP04OzteMoBCsGS3wvC6yyBE X-Gm-Gg: ASbGncuyalFl+V3nsiisuvK/WQqAx4w02z6BlCuTWedLRO8QCk8J7CBrHVOsZN4XTj1 93ocMO65HnO5upDrq51KGJFxOM5lD+dh79ssiiuY0g6q7UgKHV1/b1u3vuAXsKjf6seJ+7E/BPJ aYzisNrMc4BLLZV3Pe0k+q9LiQykYNGEwFcF2RR1Cr5UkCU+aNwqQUBASWCc5wqpoiTQSdBoyZU i4xL25h9f/Qf7mlhu3sMXSrSuB2P2qiNvooZdhG8z05bA== X-Google-Smtp-Source: AGHT+IFvUViFtOJ8J5MIoz3MjQKJqT9azYnKYuQDnhW0sFQ74unk3RDdK8o+h2uN3kaErI0ZcHoJbg== X-Received: by 2002:a05:620a:4512:b0:7b6:73c9:8604 with SMTP id af79cd13be357-7b6bcaede2amr521009285a.31.1733502922216; Fri, 06 Dec 2024 08:35:22 -0800 (PST) Received: from gnus ([70.26.179.129]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-4672978dd14sm22606931cf.54.2024.12.06.08.35.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Dec 2024 08:35:21 -0800 (PST) From: "Suhail Singh" To: control@debbugs.gnu.org Subject: control message for bug #40997 Date: Fri, 06 Dec 2024 11:35:11 -0500 Message-ID: <871pyk3h34.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) user guix unarchive 40997 usertag 40997 - test-tag archive 40997 quit