summaryrefslogtreecommitdiff
path: root/gnu/system.scm
diff options
context:
space:
mode:
authorHilton Chain <hako@ultrarare.space>2025-05-14 21:35:31 +0800
committerHilton Chain <hako@ultrarare.space>2025-05-24 08:57:11 +0800
commitce267b3765ef1a6177971aa0042deaeec750ea97 (patch)
tree89aeb540e88c85faa6e3d81fa5d5d72a2f2d8f2a /gnu/system.scm
parent976354370340b29fdfac2d4129b27fd12fa30b49 (diff)
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
Diffstat (limited to 'gnu/system.scm')
-rw-r--r--gnu/system.scm21
1 files changed, 15 insertions, 6 deletions
diff --git a/gnu/system.scm b/gnu/system.scm
index 2beca4b6d08..a4e70f164a4 100644
--- a/gnu/system.scm
+++ b/gnu/system.scm
@@ -208,12 +208,21 @@ VERSION is the target version of the boot-parameters record."
208 (let ((root (file-system-device->string root-device 208 (let ((root (file-system-device->string root-device
209 #:uuid-type 'dce))) 209 #:uuid-type 'dce)))
210 (append 210 (append
211 (if (string=? root "none") 211 (cond
212 '() ; Ignore the case where the root is "none" (typically tmpfs). 212 ((string=? root "tmpfs")
213 ;; Note: Always use the DCE format because that's what 213 ;; Required when using tmpfs as root file system.
214 ;; (gnu build linux-boot) expects for the 'root' 214 ;; TODO: Include file system information in boot parameters, so that we
215 ;; kernel command-line option. 215 ;; can detect tmpfs by file system type instead of device name here.
216 (list (string-append (if version>0? "root=" "--root=") root))) 216 '("rootfstype=tmpfs"))
217 ((string=? root "none")
218 ;; Ignore unhandled cases where the root is "none". This requires the
219 ;; user to set correct arguments.
220 '())
221 (else
222 ;; Note: Always use the DCE format because that's what
223 ;; (gnu build linux-boot) expects for the 'root'
224 ;; kernel command-line option.
225 (list (string-append (if version>0? "root=" "--root=") root))))
217 (list #~(string-append (if #$version>0? "gnu.system=" "--system=") #$system) 226 (list #~(string-append (if #$version>0? "gnu.system=" "--system=") #$system)
218 #~(string-append (if #$version>0? "gnu.load=" "--load=") 227 #~(string-append (if #$version>0? "gnu.load=" "--load=")
219 #$system "/boot"))))) 228 #$system "/boot")))))