mirror of
https://codeberg.org/guix/guix.git
synced 2026-01-25 12:05:19 -06:00
system: Set "rootfstype" for tmpfs root file system.
This commit adds configuration for tmpfs root file system. Since there's no file system information in boot parameters, not all tmpfs cases are handled. * gnu/system.scm (bootable-kernel-arguments): Check root file system for tmpfs and set "rootfstype". Change-Id: Ib14f6a9e4040535b3412ca9efa7e9b65c1dc8b39
This commit is contained in:
parent
9763543703
commit
ce267b3765
1 changed files with 15 additions and 6 deletions
|
|
@ -208,12 +208,21 @@ VERSION is the target version of the boot-parameters record."
|
|||
(let ((root (file-system-device->string root-device
|
||||
#:uuid-type 'dce)))
|
||||
(append
|
||||
(if (string=? root "none")
|
||||
'() ; Ignore the case where the root is "none" (typically tmpfs).
|
||||
;; Note: Always use the DCE format because that's what
|
||||
;; (gnu build linux-boot) expects for the 'root'
|
||||
;; kernel command-line option.
|
||||
(list (string-append (if version>0? "root=" "--root=") root)))
|
||||
(cond
|
||||
((string=? root "tmpfs")
|
||||
;; Required when using tmpfs as root file system.
|
||||
;; TODO: Include file system information in boot parameters, so that we
|
||||
;; can detect tmpfs by file system type instead of device name here.
|
||||
'("rootfstype=tmpfs"))
|
||||
((string=? root "none")
|
||||
;; Ignore unhandled cases where the root is "none". This requires the
|
||||
;; user to set correct arguments.
|
||||
'())
|
||||
(else
|
||||
;; Note: Always use the DCE format because that's what
|
||||
;; (gnu build linux-boot) expects for the 'root'
|
||||
;; kernel command-line option.
|
||||
(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")))))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue