GNU bug report logs - #26339
[PATCH 00/18] wip: Support non grub bootloaders.

Previous Next

Package: guix-patches;

Reported by: Mathieu Othacehe <m.othacehe <at> gmail.com>

Date: Sun, 2 Apr 2017 13:51:01 UTC

Severity: important

Tags: patch

Done: Mathieu Othacehe <m.othacehe <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Danny Milosavljevic <dannym <at> scratchpost.org>
To: Mathieu Othacehe <m.othacehe <at> gmail.com>
Cc: 26339 <at> debbugs.gnu.org, guix-devel <guix-devel <at> gnu.org>
Subject: bug#26339: bootloader and kernel arguments "--root", "--system", "--load"
Date: Sat, 15 Apr 2017 21:50:38 +0200
Ok, I'm in the process of reverting the patches to grub.

------

Problem analysis:

- (profile-boot-parameters ...) doesn't pick up the correct kernel-arguments.  It's reading them from a parameters file for the system generation back then, for example from /gnu/store/x8ymiksnhfyvjdi8ms38ysc4yr92lyk9-system/parameters, which contains:

(boot-parameters
  (version 0)
  (label "GNU with Linux-Libre 4.5.1 (beta)")
  (root-device "/dev/sda1")
  (kernel "/gnu/store/h977riqrp7c3w2v0mcpp48ldcapy09gx-linux-libre-4.5.1")
  (kernel-arguments ("crashkernel=256M" "modprobe.blacklist=pcspkr,snd_pcsp" "quiet" "acpi_osi=Linux" "clocksource=acpi_pm"))
  (initrd (string-append "/gnu/store/8w1abpwlhnilibiamcp6j01rhjh9k5ix-base-initrd" "/initrd")))

, which indeed doesn't contain the correct kernel arguments for it to boot.

Why not?  Shouldn't we just store the correct arguments in there eventually?

Those kernel arguments should include (in the front):

linux-arguments
        let root = (boot-parameters-root-device params) or #f
        let root-device = (if (bytevector? root) (uuid->string root) root)
        let system = "/gnu/store/x8ymiksnhfyvjdi8ms38ysc4yr92lyk9-system" in
        "--root=<root-device>"
        "--system=<system>"
        "--load=<system>/boot"
.

Or is it something grub-specific?

Or is it because we don't know system's own hash value in order to be able to write it there?

Would it be good to (later) replace the kernel-arguments accessor by a procedure that also takes system and root and prepends them on-the-fly?

i.e.

(define (boot-parameters-all-kernel-arguments params system root)
  (cons
    (string-append "--root=" root)
    (cons
      (string-append "--system=" system)
      ... load etc
      (boot-parameters-kernel-arguments params))))

... and only use this one, never boot-parameters-kernel-arguments anywhere else?




This bug report was last modified 7 years and 209 days ago.

Previous Next


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