help-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Unable to chain-load Debian


From: William
Subject: Re: Unable to chain-load Debian
Date: Wed, 6 Mar 2024 18:55:01 +0100

On Wed, 06 Mar 2024 22:38:50 +1100
Carlo Zancanaro <carlo@zancanaro.id.au> wrote:

> Hi William,
> 
> I don't know anything about Grub chainloading, but I had a quick look
> and I think I have a vague idea what's going on.
> 
> The menu entry is put together by this code in
> gnu/bootloader/grub.scm:
> 
> --8<---------------cut here---------------start------------->8---
>         #~(format port "
> menuentry ~s {
>   ~a
>   chainloader ~a
> }~%"
>                   #$label
>                   #$(grub-root-search device chain-loader)
>                   #$chain-loader)
> --8<---------------cut here---------------end--------------->8---
> 
> Where "label", "device" and "chain-loader" are bound to their values
> from the provided menu-entry record.
> 
> This calls grub-root-search to emit a grub "search" command. This
> function has the following:
> 
> --8<---------------cut here---------------start------------->8---
> (define (grub-root-search device file)
>   ...
>   (if (and (string? file) (not (string-prefix? "/" file)))
>       ""
>       ...))
> --8<---------------cut here---------------end--------------->8---
> 
> In your config, chain-loader is "+1", so when this is passed in as
> "file" the conditions both pass: it is a string, and it does not start
> with a "/". Thus, the root-search returns the empty string, which is
> dutifully inserted into your grub.cfg file.
> 
> I think this is a bug. Unfortunately I'm not familiar enough with this
> code to know how to fix it.
> 
> Carlo

Hello Carlo.

It is indeed a bug, I've already reported this
issue:

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

Thanks for your help.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]