GNU bug report logs - #69588
(chain-loader) declaration will write invalid string on grub.cfg if "+1" is specified instead of an EFI file path.

Previous Next

Package: guix;

Reported by: William <willbilly <at> fedora.email>

Date: Wed, 6 Mar 2024 17:37:01 UTC

Severity: normal

To reply to this bug, email your comments to 69588 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#69588; Package guix. (Wed, 06 Mar 2024 17:37:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to William <willbilly <at> fedora.email>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Wed, 06 Mar 2024 17:37:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: William <willbilly <at> fedora.email>
To: bug-guix <at> gnu.org
Subject: (chain-loader) declaration will write invalid string on grub.cfg if
 "+1" is specified instead of an EFI file path.
Date: Wed, 6 Mar 2024 18:16:47 +0100
The current (chain-loader) declaration seems to only work properly when
booting in EFI mode[1], as that way you have to specify a file path to
chainload an operating system that's not compatible with GRUB such as
Windows, but this solution will not work properly when using "+1" for
the old MBR/msdos partition table that required bootstrapping, not a
filesystem path, as explained in GRUB's documentation[2].

I've asked about this issue on the guix-help mail list and someone
pointed out where the problem is on the source file[3], it's only a
matter of submitting a patch to fix it so it parses properly when the
(chain-loader) declaration has "+1" for bootstrapping instead of a path.

[1]: https://guix.gnu.org/manual/en/guix.html#chain-loader
[2]: https://www.gnu.org/software/grub/manual/grub/grub.html#chainloader
[3]: https://lists.gnu.org/archive/html/help-guix/2024-03/msg00032.html




Information forwarded to bug-guix <at> gnu.org:
bug#69588; Package guix. (Thu, 07 Mar 2024 00:10:02 GMT) Full text and rfc822 format available.

Message #8 received at 69588 <at> debbugs.gnu.org (full text, mbox):

From: Felix Lechner <felix.lechner <at> lease-up.com>
To: 69588 <at> debbugs.gnu.org
Cc: Carlo Zancanaro <carlo <at> zancanaro.id.au>, William <willbilly <at> fedora.email>,
 Felix Lechner <felix.lechner <at> lease-up.com>
Subject: [PATCH] Find GRUB root devices for chainloading entries.
Date: Wed,  6 Mar 2024 16:09:20 -0800
Maybe this would work? It should help grub-root-search to return a meaningful
search expression but may have unintended side effects.

This patch is untested.

More information may be available here:

  https://issues.guix.gnu.org/issue/69588

Change-Id: I7b97a141b0d0d462d8afdd8c69f0ceb9a2d2da0b
---
 gnu/bootloader/grub.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gnu/bootloader/grub.scm b/gnu/bootloader/grub.scm
index 2723eda5f4..1a229675da 100644
--- a/gnu/bootloader/grub.scm
+++ b/gnu/bootloader/grub.scm
@@ -433,7 +433,7 @@ (define* (make-grub-configuration grub config entries
   chainloader ~a
 }~%"
                   #$label
-                  #$(grub-root-search device chain-loader)
+                  #$(grub-root-search device #f)
                   #$chain-loader)))))
 
   (define (crypto-devices)

base-commit: b4107ca3ad8bb8a6b8e669c298be2f14ff0237da
-- 
2.41.0





This bug report was last modified 58 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.