Mountpoint madness: udisks and why I love FreeBSD the mostThis is not intended to be a flame post. Really!
As you probably know I use Linux, Kubuntu for what it matters (and it does matter!) on all my main machines (I mean pretty much every one on which I develop), and FreeBSD on servers (whenever it is possible) and dedicated machines. It is my choice, it not has to be the right choice, but it is a choice. Also you should know I’m not quite happy with Ubuntu and its family, but so far it works for me and I’m quite used to the Ubuntu approach.
Anyway, in order to see what is lying around, I tend to test here and there some distros, and so it turned out now I’ve a backup computer running Fedora.
Today I plugged in the Fedora machine my USB stick, and found it mounted at
/run/media/$USERNAME/$LABELinstead of what I was expecting, such as
how Kubuntu does.
udevrules in the middle? No way!
So I start searching here and there for a configuration file, or something
systemdrelated that could trigger that strange mount point abuse, but without any success. Until I discovered that there is another responsible:
udisks. Long (and not interesting) story short: a D-BUS daemon that enables device management from an User Interface like KDE, Gnome and you name your favourite.
What the fuck, I suspect FreeBSD is a lot more simpler here:
devd(5)(the corresponding partner of Linux
udev) and that’s all. After all, it is what is used even for FreeBSD jails!
However, what is even worst is that it seems
udiskshardcoded the mount point path and Ubuntu has patched it to move to a more reasonable place. Are we back in time and still hardcoding paths? After all, who am I to criticize some piece of software that I don’t know and I would not been able to write decently?
Now, let’s review the target mount points as they are described in the File System Hierarchy FHS version 3:
/mediais described as a place to mount removable media, like zip disks;
/mntis described as a temporary mount point for system administrator. I often use the example of mounting an ISO image to extract some programs into the base system;
/runis described as directory for containing variable run-time information, what it was
/var/runwhen I was young! Moreover, the documentation states that such directory should not be writable by non administrator users.
Therefore, for God’s sake, what is the point of making
/run/mediaa user-based mount point?
What is the point in having a mount point hardcoded?
udiskson the very same machine?
Seems sometimes Linux goes too far for what my poor brain can handle. And that brings again up why I do love FreeBSD the most: things tend to be always the same. Because it does not sound to me that these changes are innovations, rather they are, in my opinion, revolutions.
As a final disclaimer, I’m not an
udevguru, not even a
systemdone, not even a
devdexpert, but chances are I can set up
devdin less more time (and with less errors) than handling the former two correctly!