system: Omit “root=” kernel argument when root device is “none”.
* gnu/system.scm (bootable-kernel-arguments): Fallback to tmpfs if root is "none". Change-Id: I35a656e71169dc786e5256d98a3c04c65043086d Signed-off-by: Ludovic Courtès <ludo@gnu.org>master
parent
27ee6f06d0
commit
3378c1a9c6
|
@ -15,6 +15,7 @@
|
||||||
;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
|
;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
|
||||||
;;; Copyright © 2021 raid5atemyhomework <raid5atemyhomework@protonmail.com>
|
;;; Copyright © 2021 raid5atemyhomework <raid5atemyhomework@protonmail.com>
|
||||||
;;; Copyright © 2023 Bruno Victal <mirai@makinata.eu>
|
;;; Copyright © 2023 Bruno Victal <mirai@makinata.eu>
|
||||||
|
;;; Copyright © 2024 Nicolas Graves <ngraves@ngraves.fr>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
;;;
|
;;;
|
||||||
|
@ -197,15 +198,18 @@ VERSION is the target version of the boot-parameters record."
|
||||||
;; compatibility when producing bootloader configurations for older
|
;; compatibility when producing bootloader configurations for older
|
||||||
;; generations.
|
;; generations.
|
||||||
(define version>0? (> version 0))
|
(define version>0? (> version 0))
|
||||||
(list (string-append (if version>0? "root=" "--root=")
|
(let ((root (file-system-device->string root-device
|
||||||
;; Note: Always use the DCE format because that's what
|
#:uuid-type 'dce)))
|
||||||
;; (gnu build linux-boot) expects for the 'root'
|
(append
|
||||||
;; kernel command-line option.
|
(if (string=? root "none")
|
||||||
(file-system-device->string root-device
|
'() ; Ignore the case where the root is "none" (typically tmpfs).
|
||||||
#:uuid-type 'dce))
|
;; Note: Always use the DCE format because that's what
|
||||||
#~(string-append (if #$version>0? "gnu.system=" "--system=") #$system)
|
;; (gnu build linux-boot) expects for the 'root'
|
||||||
#~(string-append (if #$version>0? "gnu.load=" "--load=")
|
;; kernel command-line option.
|
||||||
#$system "/boot")))
|
(list (string-append (if version>0? "root=" "--root=") root)))
|
||||||
|
(list #~(string-append (if #$version>0? "gnu.system=" "--system=") #$system)
|
||||||
|
#~(string-append (if #$version>0? "gnu.load=" "--load=")
|
||||||
|
#$system "/boot")))))
|
||||||
|
|
||||||
;; System-wide configuration.
|
;; System-wide configuration.
|
||||||
|
|
||||||
|
|
Reference in New Issue