diff options
author | Ludovic Courtès <ludo@gnu.org> | 2014-01-31 01:40:02 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2014-01-31 01:40:02 +0100 |
commit | 83b9e6a1854d4fb86f0269afac33200dce996f06 (patch) | |
tree | af3967810c54960faf5e2a822fc4078b09c628be | |
parent | 882f034fa88361c703f382f08e158e15ce330c1d (diff) | |
download | guix-83b9e6a1854d4fb86f0269afac33200dce996f06.tar.gz |
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.
-rw-r--r-- | guix/build/linux-initrd.scm | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/guix/build/linux-initrd.scm b/guix/build/linux-initrd.scm index 039a60acf3..69cb58763f 100644 --- a/guix/build/linux-initrd.scm +++ b/guix/build/linux-initrd.scm @@ -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") |