diff mbox series

[bug#48880] gnu: Respect ‘rootdelay’ kernel command-line argument.

Message ID 20210606190430.28191-1-me@tobias.gr
State Accepted
Headers show
Series [bug#48880] gnu: Respect ‘rootdelay’ kernel command-line argument. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

Tobias Geerinckx-Rice June 6, 2021, 7:04 p.m. UTC
* gnu/build/linux-boot.scm (boot-system): Sleep for "rootdelay=SECONDS"
when specified on the kernel command line.
---

 gnu/build/linux-boot.scm | 8 ++++++++
 1 file changed, 8 insertions(+)

Comments

Tobias Geerinckx-Rice June 16, 2021, 10:48 a.m. UTC | #1
Pushed as 9c28fdcae330e91667b4b3e1058025bef250e6dd.

Too late to help 
<https://logs.guix.gnu.org/guix/2021-06-05.log#193653>, but oh 
well.
diff mbox series

Patch

diff --git a/gnu/build/linux-boot.scm b/gnu/build/linux-boot.scm
index 37c0dcb265..e1014c7efe 100644
--- a/gnu/build/linux-boot.scm
+++ b/gnu/build/linux-boot.scm
@@ -594,6 +594,14 @@  upon error."
           (unless (configure-qemu-networking)
             (display "network interface is DOWN\n")))
 
+        (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"))