Sample Header Ad - 728x90

Why can't I bind-mount "/" inside a user namespace?

14 votes
1 answer
1990 views
Why doesn't this work? $ unshare -rm mount --bind / /mnt mount: /mnt: wrong fs type, bad option, bad superblock on /, missing codepage or helper program, or other error. These work ok: $ unshare -rm mount --bind /tmp /mnt $ unshare -rm mount --bind /root /mnt $ --- $ uname -r # Linux kernel version 4.17.3-200.fc28.x86_64
Asked by sourcejedi (53232 rep)
Jul 18, 2018, 10:22 PM
Last activity: Jul 18, 2018, 10:31 PM