aboutsummaryrefslogtreecommitdiff
path: root/guix
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2014-08-28 09:20:40 +0200
committerLudovic Courtès <ludo@gnu.org>2014-08-28 09:21:21 +0200
commit5c3eb14e072de2549e89073b002ac072fd4b35dc (patch)
treeda217c0abf9f58ee079493939bd0c5939f407a01 /guix
parent2f0556ae5e9a920d39647910b7350e34d300bf35 (diff)
downloadguix-5c3eb14e072de2549e89073b002ac072fd4b35dc.tar
guix-5c3eb14e072de2549e89073b002ac072fd4b35dc.tar.gz
linux-initrd: Wait a bit longer for partitions to appear.
Reported by Sveltana on #guix. * guix/build/linux-initrd.scm (canonicalize-device-spec): Increase MAX-TRIALS. Add "waiting for partition" 'format' call.
Diffstat (limited to 'guix')
-rw-r--r--guix/build/linux-initrd.scm9
1 files changed, 7 insertions, 2 deletions
diff --git a/guix/build/linux-initrd.scm b/guix/build/linux-initrd.scm
index bce289987b..d37da9a6ff 100644
--- a/guix/build/linux-initrd.scm
+++ b/guix/build/linux-initrd.scm
@@ -229,8 +229,11 @@ the following:
• 'any', in which case SPEC can be anything.
"
(define max-trials
- ;; Number of times we retry partition label resolution.
- 7)
+ ;; Number of times we retry partition label resolution, 1 second per
+ ;; trial. Note: somebody reported a delay of 16 seconds (!) before their
+ ;; USB key would be detected by the kernel, so we must wait for at least
+ ;; this long.
+ 20)
(define canonical-title
;; The realm of canonicalization.
@@ -254,6 +257,8 @@ the following:
(if (> count max-trials)
(error "failed to resolve partition label" spec)
(begin
+ (format #t "waiting for partition '~a' to appear...~%"
+ spec)
(sleep 1)
(loop (+ 1 count))))))))
;; TODO: Add support for UUIDs.