From 83b9e6a1854d4fb86f0269afac33200dce996f06 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Fri, 31 Jan 2014 01:40:02 +0100 Subject: 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. --- guix/build/linux-initrd.scm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'guix/build') 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 @@ (define (resolve file) (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") -- cgit v1.2.3