Bug#224656: bad tmpfs support detection
In /sbin/init, it attempts to determine whether or not the kernel supports
tmpfs by looking in /proc/filesystems:
# Set up filesystem as root and pivot into it.
echo "Setting up filesystem, please wait ..."
mount -t proc proc proc
if grep -q tmpfs /proc/filesystems; then
mount -t tmpfs -o size=100M tmpfs mnt
mount -t shm shm mnt
This is a valid way to detect support for most filesystems, but since tmpfs
is used internally by the kernel, it is always present in some form, and always
appears in /proc/filesystems. This is true even if its configured off (and
therefore not mountable from userspace).
A better way may be to attempt the mount, and if it fails, try the shm mount.