Hi,
attached to this message, you will find a patch that addresses an issue that raise under the following conditions:
- You have a diskless system that boots from the network (using something like root=nfs:... in its command line)
- The exported file system on which the system will boot is actually a FUSE file system (then you had to put a fsid in /etc/exports/
Then, you will experience /proc and /sys being empty (not really umounted), followed closely by /dev. The system then becomes unusable.
I searched and tried several things to prevent this issue to happen. Only one worked (all credits go to that guy: http://swik.net/zfs-fuse/linux+root+filesystem+on+zfs-fuse).
I modified the system-config-netboot initscript to get it on diskless clients and it indeed work. Since those tools are deprecated coming with RHEL6, I've ported this solution to dracut.
I don't really know where from this issue comes. I even don't know if that's a proper fix, or just a hackfix. This is open to discussion.
Moreover, I've not been able to test yet that fix on non-diskless system (if there are un-measured side effects).
With my best regards,
P. Schweitzer
diff --git a/modules.d/99base/init b/modules.d/99base/init
index b666d3e..4cdd2c2 100755
--- a/modules.d/99base/init
+++ b/modules.d/99base/init
@@ -452,6 +452,16 @@ SWITCH_ROOT=$(command -v switch_root)
PATH=$OLDPATH
export PATH
+# Make special mount points persistant over switch root
+mount --make-rshared /dev
+mount --bind /dev "$NEWROOT/dev"
+
+mount --make-rshared /sys
+mount --bind /sys "$NEWROOT/sys"
+
+mount --make-rshared /proc
+mount --bind /proc "$NEWROOT/proc"
+
if [ -f /etc/capsdrop ]; then
. /etc/capsdrop
info "Calling $INIT with capabilities $CAPS_INIT_DROP dropped."