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.
This commit is contained in:
parent
2f0556ae5e
commit
5c3eb14e07
|
@ -229,8 +229,11 @@ the following:
|
||||||
• 'any', in which case SPEC can be anything.
|
• 'any', in which case SPEC can be anything.
|
||||||
"
|
"
|
||||||
(define max-trials
|
(define max-trials
|
||||||
;; Number of times we retry partition label resolution.
|
;; Number of times we retry partition label resolution, 1 second per
|
||||||
7)
|
;; 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
|
(define canonical-title
|
||||||
;; The realm of canonicalization.
|
;; The realm of canonicalization.
|
||||||
|
@ -254,6 +257,8 @@ the following:
|
||||||
(if (> count max-trials)
|
(if (> count max-trials)
|
||||||
(error "failed to resolve partition label" spec)
|
(error "failed to resolve partition label" spec)
|
||||||
(begin
|
(begin
|
||||||
|
(format #t "waiting for partition '~a' to appear...~%"
|
||||||
|
spec)
|
||||||
(sleep 1)
|
(sleep 1)
|
||||||
(loop (+ 1 count))))))))
|
(loop (+ 1 count))))))))
|
||||||
;; TODO: Add support for UUIDs.
|
;; TODO: Add support for UUIDs.
|
||||||
|
|
Loading…
Reference in New Issue