From 9c28fdcae330e91667b4b3e1058025bef250e6dd Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Sat, 5 Jun 2021 20:09:49 +0200 Subject: [PATCH] =?UTF-8?q?gnu:=20Respect=20=E2=80=98rootdelay=E2=80=99=20?= =?UTF-8?q?kernel=20command-line=20argument.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/build/linux-boot.scm (boot-system): Sleep for "rootdelay=SECONDS" when specified on the kernel command line. --- gnu/build/linux-boot.scm | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/gnu/build/linux-boot.scm b/gnu/build/linux-boot.scm index 7d1b3ee835a..461df9ff46e 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"))