GNU bug report logs -
#40998
Guix System's initrd doesn't honor rootflags
Previous Next
Reported by: maxim.cournoyer <at> gmail.com
Date: Fri, 1 May 2020 13:54:01 UTC
Severity: normal
Tags: patch
Done: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
Message #52 received at 40998 <at> debbugs.gnu.org (full text, mbox):
Hi Ludovic,
Ludovic Courtès <ludo <at> gnu.org> writes:
> Hi,
>
> Maxim Cournoyer <maxim.cournoyer <at> gmail.com> skribis:
>
>> -(define (bootable-kernel-arguments system root-device)
>> - "Return a list of kernel arguments (gexps) to boot SYSTEM from ROOT-DEVICE."
>> - (list (string-append "--root="
>> +(define* (bootable-kernel-arguments system root-device version)
>> + "Return a list of kernel arguments (gexps) to boot SYSTEM from ROOT-DEVICE.
>> +VERSION is the target version of the boot-parameters record."
>> + ;; If the version is newer than 0, we use the new style initrd parameter
>> + ;; names, otherwise we use the legacy ones. This is to maintain backward
>> + ;; compatibility when producing bootloader configurations for older
>> + ;; generations.
>> + (define version>0? (> version 0))
>> + (list (string-append (if version>0? "root=" "--root=")
>> ;; Note: Always use the DCE format because that's what
>> - ;; (gnu build linux-boot) expects for the '--root'
>> + ;; (gnu build linux-boot) expects for the 'root'
>> ;; kernel command-line option.
>> (file-system-device->string root-device
>> #:uuid-type 'dce))
>> - #~(string-append "--system=" #$system)
>> - #~(string-append "--load=" #$system "/boot")))
>> + #~(string-append (if #$version>0? "gnu.system=" "--system=") #$system)
>> + #~(string-append (if #$version>0? "gnu.load=" "--load=")
>> + #$system "/boot")))
>
> This is the logic I was suggesting to move to ‘read-boot-parameters’.
>
> To do that, ‘read-boot-parameters’ would have to fill the
> ‘kernel-arguments’ field of <boot-parameters> such that it already
> contains --system/gnu.system and --load/gnu.load.
As mentioned in my previous reply, that'd only be possible if we no
longer cared about having the produced system directory
content-addressable, if I understood that comment in the docstring
referred earlier correctly.
Thanks,
Maxim
This bug report was last modified 3 years and 78 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.