On Debian, and likely its derivatives, the script which handles unmounts before halt/reboot is
For me, the script does not
umount any of the filesystems you have listed apart from
tmpfs. The reason is given in the following comment:
# Make sure tmpfs file systems are umounted before turning off
# swap, to avoid running out of memory if the tmpfs filesystems
# use a lot of space.
Given the maturity of these scripts, I guess this is best practice, although it might be a good idea to investigate what other distros do.
It is also possible that the
reboot commands actually require some of the above mount to work (most likely
/proc, but also
/dev) and the command may fail without them.
To add a little more on this, the next script called after
umountfs, before the actual
halt script itself is
umountroot. Contrary to what the name suggests, the script actually remounts root readonly. Note the actual syntax for this:
mount $MOUNT_FORCE_OPT -n -o remount,ro -t dummytype dummydev / 2>/dev/null \
|| mount $MOUNT_FORCE_OPT -n -o remount,ro dummydev / 2>/dev/null \
|| mount $MOUNT_FORCE_OPT -n -o remount,ro /
Seemingly just doing a straight
mount -no remount,ro / can fail if there are other mount points bound to root. See this bug for a full discussion of this. The
MOUNT_FORCE_OPT is only set for FreeBSD, so this is not necessary for Linux.