oneSIS gets around this problem by automatically converting
/etc/mtab to be a symbolic link to /proc/mounts. The
only negative effect is that userspace tools such as losetup
and mount -o loop do not append entries to
/proc/mounts, so mounted loopback filesystems do not appear
to the system to be mounted. The result is that loopback filesystems
can be mounted and unmounted, but the umount command does not
automatically free the
loopback device.
Usually a total of eight loopback filesystems can be mounted and
unmounted before mount complains: `mount: could not find any
free loop device'. The solution then is to manually detach the
device associated with each loop device with
losetup -d /dev/loop0; losetup -d /dev/loop1; ....
Alternatively, when /etc is deployed on a local disk, and
auto-mounted read-write from an initrd, oneSIS automatically creates
a real /etc/mtab to eliminate the problem with loopback
mounts. If the local /etc is ever mounted read-only again,
/etc/mtab is again
converted to be a symlink to /proc/mounts.
Note: This swapping to and from a real /etc/mtab only occurs on locally deployed /etc directories. The /etc/mtab of the master image is always a symlink to /proc/mounts.