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

  • Open
  • quality assurance status badge
Details
2 participants
  • Felix Lechner
  • William
Owner
unassigned
Submitted by
William
Severity
normal
W
W
William wrote on 6 Mar 18:16 +0100
(address . bug-guix@gnu.org)
20240306181647.7af71dc3@fedora.email
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.

F
F
Felix Lechner wrote on 7 Mar 01:09 +0100
[PATCH] Find GRUB root devices for chainloading entries.
(address . 69588@debbugs.gnu.org)
1123579eb1c40f3ffadadb5599215280a8f8823e.1709770160.git.felix.lechner@lease-up.com
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:


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

Toggle diff (17 lines)
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
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 69588@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 69588
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch