summary refs log tree commit diff
path: root/gnu/build/linux-boot.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2014-11-20 22:43:47 +0100
committerLudovic Courtès <ludo@gnu.org>2014-11-20 22:43:47 +0100
commit4dfbdcbcb4ed4ec82f032f7eff9133a3d04d5a95 (patch)
treea22ac7b2df7bc31c5705a37b73e16ad18144bcff /gnu/build/linux-boot.scm
parenta1ca1b7a5014d24ec2d44121b62ac03ea2887c23 (diff)
downloadguix-4dfbdcbcb4ed4ec82f032f7eff9133a3d04d5a95.tar.gz
linux-boot: Don't catch exceptions thrown by 'mount-root-file-system'.
* gnu/build/linux-boot.scm (mount-root-file-system): Remove 'catch #t'
  around body.  This was unneeded and even inconvenient because this
  procedure is called from within 'call-with-error-handling' already.
Diffstat (limited to 'gnu/build/linux-boot.scm')
-rw-r--r--gnu/build/linux-boot.scm60
1 files changed, 27 insertions, 33 deletions
diff --git a/gnu/build/linux-boot.scm b/gnu/build/linux-boot.scm
index 001c52fa3d..ea1971ff9c 100644
--- a/gnu/build/linux-boot.scm
+++ b/gnu/build/linux-boot.scm
@@ -255,39 +255,33 @@ UNIONFS."
       (newline port)
       (close-port port)))
 
-  (catch #t
-    (lambda ()
-      (if volatile-root?
-          (begin
-            (mkdir-p "/real-root")
-            (mount root "/real-root" type MS_RDONLY)
-            (mkdir-p "/rw-root")
-            (mount "none" "/rw-root" "tmpfs")
-
-            ;; We want read-write /dev nodes.
-            (make-essential-device-nodes #:root "/rw-root")
-
-            ;; Make /root a union of the tmpfs and the actual root.  Use
-            ;; 'max_files' to set a high RLIMIT_NOFILE for the unionfs process
-            ;; itself.  Failing to do that, we quickly run out of file
-            ;; descriptors; see <http://bugs.gnu.org/17827>.
-            (unless (zero? (system* unionfs "-o"
-                                    "cow,allow_other,use_ino,suid,dev,max_files=65536"
-                                    "/rw-root=RW:/real-root=RO"
-                                    "/root"))
-              (error "unionfs failed"))
-
-            ;; Make sure unionfs remains alive till the end.  Because
-            ;; 'fuse_daemonize' doesn't tell the PID of the forked daemon, we
-            ;; have to resort to 'pidof' here.
-            (mark-as-not-killable (pidof unionfs)))
-          (begin
-            (check-file-system root type)
-            (mount root "/root" type))))
-    (lambda args
-      (format (current-error-port) "exception while mounting '~a': ~s~%"
-              root args)
-      (start-repl)))
+  (if volatile-root?
+      (begin
+        (mkdir-p "/real-root")
+        (mount root "/real-root" type MS_RDONLY)
+        (mkdir-p "/rw-root")
+        (mount "none" "/rw-root" "tmpfs")
+
+        ;; We want read-write /dev nodes.
+        (make-essential-device-nodes #:root "/rw-root")
+
+        ;; Make /root a union of the tmpfs and the actual root.  Use
+        ;; 'max_files' to set a high RLIMIT_NOFILE for the unionfs process
+        ;; itself.  Failing to do that, we quickly run out of file
+        ;; descriptors; see <http://bugs.gnu.org/17827>.
+        (unless (zero? (system* unionfs "-o"
+                                "cow,allow_other,use_ino,suid,dev,max_files=65536"
+                                "/rw-root=RW:/real-root=RO"
+                                "/root"))
+          (error "unionfs failed"))
+
+        ;; Make sure unionfs remains alive till the end.  Because
+        ;; 'fuse_daemonize' doesn't tell the PID of the forked daemon, we
+        ;; have to resort to 'pidof' here.
+        (mark-as-not-killable (pidof unionfs)))
+      (begin
+        (check-file-system root type)
+        (mount root "/root" type)))
 
   (copy-file "/proc/mounts" "/root/etc/mtab"))