aboutsummaryrefslogtreecommitdiff
path: root/gnu/build/linux-boot.scm
diff options
context:
space:
mode:
authorTobias Geerinckx-Rice <me@tobias.gr>2021-06-05 20:09:49 +0200
committerTobias Geerinckx-Rice <me@tobias.gr>2021-06-16 12:13:40 +0200
commit9c28fdcae330e91667b4b3e1058025bef250e6dd (patch)
tree10a287fa388eb5431aaba025d7a8dc826610e24e /gnu/build/linux-boot.scm
parentfa0dc1229c0dc44a7358d183e54d9e02d1199e39 (diff)
downloadguix-9c28fdcae330e91667b4b3e1058025bef250e6dd.tar
guix-9c28fdcae330e91667b4b3e1058025bef250e6dd.tar.gz
gnu: Respect ‘rootdelay’ kernel command-line argument.
* gnu/build/linux-boot.scm (boot-system): Sleep for "rootdelay=SECONDS" when specified on the kernel command line.
Diffstat (limited to 'gnu/build/linux-boot.scm')
-rw-r--r--gnu/build/linux-boot.scm10
1 files changed, 10 insertions, 0 deletions
diff --git a/gnu/build/linux-boot.scm b/gnu/build/linux-boot.scm
index 7d1b3ee835..461df9ff46 100644
--- a/gnu/build/linux-boot.scm
+++ b/gnu/build/linux-boot.scm
@@ -585,6 +585,16 @@ upon error."
(unless (configure-qemu-networking)
(display "network interface is DOWN\n")))
+ ;; A big ugly hammer, to be used only for debugging and in desperate
+ ;; situations where no proper device synchonisation is possible.
+ (let ((root-delay (and=> (find-long-option "rootdelay" args)
+ string->number)))
+ (when root-delay
+ (format #t
+ "Pausing for rootdelay=~a seconds before mounting the root file system...\n"
+ root-delay)
+ (sleep root-delay)))
+
;; Prepare the real root file system under /root.
(unless (file-exists? "/root")
(mkdir "/root"))