Mount USB drives as /run/media/user/LABEL instead of /run/media/user/UUID?

I have a bunch of USB thumb drives, each of which descriptively labelled. Sometimes I want to copy from one to another, but with f36, using the FILES or Dolphin, I see them mounted on /run/media//UUID. This is singularly unhelpful because I have to make sure I have the right src and dest devices for the copy if I don’t want to wipe out what I am trying to save. I cannot find any way to get the programs to display the disk labels instead of a UUID. And the UUIDs shown do not match any UUIDs that MacOS displays for these devices, which makes it harder to grok.

Any ideas how I can either get the mount points to use the label (messing with fstab won’t do because I’m not always going to remember to put the thumb drives in the same USB slot on my machine, which has about 6 USB slots) ???

Or else get the “application” programs to display the labels?

Thx for any hints.

Mount USB drives as /run/media/user/LABEL

It takes the UUID because you did not set a label?

You can set one with gparted.
When in gparted you have to select the specific drive. If not visible “Refresh Devices” in the Gparted menu.

Unmount the usb drive and select under “Partition” > Label File System to enter a Label of your choice.

Afterwards you just have to “Apply all Operations” while clicking on the green tick icon.

As noted, the mounts are done by file system label not device label. However, that is also dependent upon the type of file system on the device as to whether it can be labeled properly. If unlabeled then UUID is selected.

If you were to insert the devices, one at a time, and label the file system appropriately, then an entry into fstab would work for mounting them anywhere on the system at an appropriate mount point, or udev should mount them by LABEL instead of UUID under /run/media/user/LABEL.

This can easily be done by gparted as noted above or from the command line with tune2fs (for ext[234] file systems)

Thanks, JeffV and Ilikelinux. But the volumes are labelled. After much debugging, I’ve figured out that f36 can cope with W95 FAT32 (type 0xb) but NOT with W95 FAT32 with LBA extensions (type 0xc). BTW, it calls both “vfat” in a bunch of the tools, like “properties” on Dolphin. I had to use lsblk with an option that showed PARTTYPE to see what was happeing here.
Unfortunately, fatlabel(8) also copes only with type 0xb and not type 0xc. I haven’t yet got a solution… Not real keen on reformatting all my old drives as I’d have to back them up somewhere - how tedious.

Strange.

I have a USB memory device with a FAT32 with LBA PARTTYPE=0xc, and it works fine including using the label to name the mount point.

[vek@newbox ~]$ lsblk -o PARTTYPE,MOUNTPOINTS -f /dev/sda1
PARTTYPE MOUNTPOINTS
0xc      /run/media/vek/LEXAR1
[vek@newbox ~]$ 
1 Like

Hmm, that is strange. I bit the bullet and reformatted all my old type Oxc thumb drives after backing them up, then re-populating them, and that solved the problem. What a pain. I realize that flash isn’t good for long-term storage but these thumb drives serve a good purpose…
Thanks for your note. I have no idea why my F36 could not deal with 0xc-type labels, It does, after all, mount the volumes (with an 8-byte uuid, which comes from where? it is not the looong uuid on the volume) and reads/writes them.

| Villy Kruse vekruse
November 17 |

  • | - |

Strange.

I have a USB memory device with a FAT32 with LBA PARTTYPE=0xc, and it works fine including using the label to name the mount point.

[vek@newbox ~]$ lsblk -o PARTTYPE,MOUNTPOINTS -f /dev/sda1
PARTTYPE MOUNTPOINTS
0xc      /run/media/vek/LEXAR1
[vek@newbox ~]$ 

Could it have something to with

COMPATIBILITY and BUGS
       For  historic  reasons  FAT  label is stored in two different loca‐
       tions: in the boot sector and as a special volume  label  entry  in
       the root directory.  MS-DOS 5.00, MS-DOS 6.22, MS-DOS 7.10, Windows
       98, Windows XP and also Windows 10 read FAT  label  only  from  the
       root  directory.  Absence of the volume label in the root directory
       is interpreted as empty or none label, even if boot sector contains
       some valid label.

This was found when running man fatlabel.

1 Like

Ah, perhaps that explains it, yes. Thank you!!!