From 9331ba5dd9dc2224b427d71f2ee56250463f4ef3 Mon Sep 17 00:00:00 2001 From: 宋文武 Date: Mon, 5 Jan 2015 22:07:03 +0800 Subject: linux-boot: Make /etc/mtab a symlink to /proc/self/mounts. Fixes . * gnu/build/linux-boot.scm (mount-root-file-system): Make /root/etc/mtab a symlink to /proc/self/mounts. * gnu/build/file-systems.scm (mount-file-system): Don't update /etc/mtab. * guix/build/syscalls.scm (mount, umount): Have #:update-mtab? default to #f. --- gnu/build/linux-boot.scm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'gnu/build/linux-boot.scm') diff --git a/gnu/build/linux-boot.scm b/gnu/build/linux-boot.scm index b2ed1a8b5..309698946 100644 --- a/gnu/build/linux-boot.scm +++ b/gnu/build/linux-boot.scm @@ -275,7 +275,10 @@ UNIONFS." (check-file-system root type) (mount root "/root" type))) - (copy-file "/proc/mounts" "/root/etc/mtab")) + ;; Make sure /root/etc/mtab is a symlink to /proc/self/mounts. + (when (file-exists? "/root/etc/mtab") + (delete-file "/root/etc/mtab")) + (symlink "/proc/self/mounts" "/root/etc/mtab")) (define (switch-root root) "Switch to ROOT as the root file system, in a way similar to what -- cgit v1.3