aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/initramfs
diff options
context:
space:
mode:
authorslashdd <[email protected]>2016-09-20 13:07:58 -0400
committerBrian Behlendorf <[email protected]>2016-09-20 10:07:58 -0700
commit792517389fad5c495a2738b61c2e9c65dedaaa9a (patch)
tree5eef2ac0ecc1db47b3f11ec4ba12a97b6427e1b7 /contrib/initramfs
parent25e2ab16be74cb37934e6736a1dc10fd50a00c56 (diff)
Change /etc/mtab to /proc/self/mounts
Fix misleading error message: "The /dev/zfs device is missing and must be created.", if /etc/mtab is missing. Reviewed-by: Richard Laager <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Eric Desrochers <[email protected]> Closes #4680 Closes #5029
Diffstat (limited to 'contrib/initramfs')
-rw-r--r--contrib/initramfs/scripts/zfs7
1 files changed, 3 insertions, 4 deletions
diff --git a/contrib/initramfs/scripts/zfs b/contrib/initramfs/scripts/zfs
index 6a78a46d2..250dc5717 100644
--- a/contrib/initramfs/scripts/zfs
+++ b/contrib/initramfs/scripts/zfs
@@ -288,9 +288,8 @@ load_module_initrd()
wait_for_dev
fi
- # zpool import refuse to import without a valid mtab
- [ ! -f /proc/mounts ] && mount proc /proc
- [ ! -f /etc/mtab ] && cat /proc/mounts > /etc/mtab
+ # zpool import refuse to import without a valid /proc/self/mounts
+ [ ! -f /proc/self/mounts ] && mount proc /proc
# Load the module
load_module "zfs" || return 1
@@ -919,7 +918,7 @@ mountroot()
#
# but the MOUNTPOINT prefix is preserved on descendent filesystem
# after the pivot into the regular root, which later breaks things
- # like `zfs mount -a` and the /etc/mtab refresh.
+ # like `zfs mount -a` and the /proc/self/mounts refresh.
#
# * Mount additional filesystems required
# Such as /usr, /var, /usr/local etc.