1

I upgraded my very old Debian to all-new Fedora 36, and I have some fundamental questions about the magic behind Fedora mount points (using Gnome, the default window manager and the Files app).

The case:

When I open the Files program I can see the "Computer" (the root filesystem) and my 2nd SSD (/dev/sdb1), called "SSD 2". When I click the "SSD 2" the program ask my password (with sudo provilege).

The partition is mounted on "/run/media/myuser/SSD 2" and all files and directories in "SSD 2" belongs to myuser:myuser.

What I need to know:

  1. From where the file manager got the volume's name to show?

  2. "/dev/sdb1" is mounted in "/run/media/myuser/SSD 2". Where is the configuration of that path? How to configure the file manager (or gnome, or fedora) to mount my "SSD 2" in another directory, like "/mnt/ssd2/" ?

  3. What is the command or how to mount that SSD like the Files program does? sudo mount /dev/sdb1 /run/media/myuser/SSD\ 2/ (or another directory) works, but all the drive contents belongs to root:root, as expected.

My /etc/fstab has only 3 entries: /, /boot and /home.

Thanks in advance for any insights.

1 Answer 1

3

All the mounting done from GUI (not only in GNOME, but also other desktop environments like KDE or Xfce) is done by UDisks, a system daemon for storage management. In GNOME some part of the "magic" is also resposibility of gvfs.

From where the file manager got the volume's name to show?

From the filesystem label. You can add a label to most filesystems (for example with e2fslabel for Ext4 or ntfslabel for NTFS), it's just a nice human readable identifier. If a filesystem has a label UDisks will use for the mount point, if it doesn't have one filesystem UUID will be used, so the mountpoint will look like /run/media/<user>/0dd6e6c1-a451-4a72-bdbd-0538a60c2028 for example.

"/dev/sdb1" is mounted in "/run/media/myuser/SSD 2". Where is the configuration of that path?

That is default the location for temporary mount points hardcoded in UDisks.

How to configure the file manager (or gnome, or fedora) to mount my "SSD 2" in another directory, like "/mnt/ssd2/" ?

If you want a different mount point, you need to put the device in fstab, UDisks will honor the mount point and mount options from there. You can use the noauto mount option if you don't want the device to be mounted automatically during boot and nofail can be also useful if you don't have the disk attached all the time. (You can manage fstab from GUI with GNOME Disks.)

What is the command or how to mount that SSD like the Files program does

UDisks has a commanline tool called udisksctl so to mount you a device you can use

udisksctl mount -b /dev/sdb1

and to unmount it later

udisksctl unmount -b /dev/sdb1

but all the drive contents belongs to root:root, as expected

I guess this a NTFS file system so in this case your mount command is missing the uid= and gid= mount options that tell the system who should own the files, UDisks does this by default.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .