mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
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 <rlaager@wiktel.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Eric Desrochers <eric.desrochers@canonical.com> Closes #4680 Closes #5029
This commit is contained in:
committed by
Brian Behlendorf
parent
25e2ab16be
commit
792517389f
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user