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.
This commit is contained in:
Ludovic Courtès 2014-11-20 22:43:47 +01:00
parent a1ca1b7a50
commit 4dfbdcbcb4

View File

@ -255,39 +255,33 @@ UNIONFS."
(newline port) (newline port)
(close-port port))) (close-port port)))
(catch #t (if volatile-root?
(lambda () (begin
(if volatile-root? (mkdir-p "/real-root")
(begin (mount root "/real-root" type MS_RDONLY)
(mkdir-p "/real-root") (mkdir-p "/rw-root")
(mount root "/real-root" type MS_RDONLY) (mount "none" "/rw-root" "tmpfs")
(mkdir-p "/rw-root")
(mount "none" "/rw-root" "tmpfs")
;; We want read-write /dev nodes. ;; We want read-write /dev nodes.
(make-essential-device-nodes #:root "/rw-root") (make-essential-device-nodes #:root "/rw-root")
;; Make /root a union of the tmpfs and the actual root. Use ;; Make /root a union of the tmpfs and the actual root. Use
;; 'max_files' to set a high RLIMIT_NOFILE for the unionfs process ;; 'max_files' to set a high RLIMIT_NOFILE for the unionfs process
;; itself. Failing to do that, we quickly run out of file ;; itself. Failing to do that, we quickly run out of file
;; descriptors; see <http://bugs.gnu.org/17827>. ;; descriptors; see <http://bugs.gnu.org/17827>.
(unless (zero? (system* unionfs "-o" (unless (zero? (system* unionfs "-o"
"cow,allow_other,use_ino,suid,dev,max_files=65536" "cow,allow_other,use_ino,suid,dev,max_files=65536"
"/rw-root=RW:/real-root=RO" "/rw-root=RW:/real-root=RO"
"/root")) "/root"))
(error "unionfs failed")) (error "unionfs failed"))
;; Make sure unionfs remains alive till the end. Because ;; Make sure unionfs remains alive till the end. Because
;; 'fuse_daemonize' doesn't tell the PID of the forked daemon, we ;; 'fuse_daemonize' doesn't tell the PID of the forked daemon, we
;; have to resort to 'pidof' here. ;; have to resort to 'pidof' here.
(mark-as-not-killable (pidof unionfs))) (mark-as-not-killable (pidof unionfs)))
(begin (begin
(check-file-system root type) (check-file-system root type)
(mount root "/root" type)))) (mount root "/root" type)))
(lambda args
(format (current-error-port) "exception while mounting '~a': ~s~%"
root args)
(start-repl)))
(copy-file "/proc/mounts" "/root/etc/mtab")) (copy-file "/proc/mounts" "/root/etc/mtab"))