gnu: linux-initrd: Start a REPL when the root could not be mounted.

* guix/build/linux-initrd.scm (boot-system): Catch errors when mounting
  ROOT and call 'start-repl' upon error.
This commit is contained in:
Ludovic Courtès 2014-01-31 01:40:02 +01:00
parent 882f034fa8
commit 83b9e6a185

@ -217,7 +217,13 @@ the new root."
(unless (file-exists? "/root")
(mkdir "/root"))
(if root
(mount root "/root" "ext3")
(catch #t
(lambda ()
(mount root "/root" "ext3"))
(lambda args
(format (current-error-port) "exception while mounting '~a': ~s~%"
root args)
(start-repl)))
(mount "none" "/root" "tmpfs"))
(mount-essential-file-systems #:root "/root")