Quote:
Originally Posted by JASlinux
|
Generally no. The problem is that some filesystems will be mounted into directories in other mounted filesystems.
Hence they have to dismounted in reverse.
Normally the /etc/fstab would show that hierarchy - but if the /etc/fstab was converted to systemd mount entries - then that simple list doesn't exist.
The advantage of the simple list is that most administrators would put the list in the order to be mounted. Thus if device D was mounted in a directory in device C... then the D mount would follow the C mount.
This should also apply to any bind mounts (bind mounts provide cross filesystem connections as if a mount were done - which is good for use in chroot environments. So dismounting those in proper order would also be useful.
This ordering makes it easy read the /etc/fstab and proceed by dismounting the last mount first.
The ONLY dismount that would fail is for the root filesystem, as it is always in use.
Now, in the GUI case it is likely not trying to dismount EVERYTHING, but dismount only what the user has accessed (memory sticks, CD/DVD and possibly other external storage).
To find those you actually look elsewhere using the mount command to list the external devices and limit to those the user owns.