[4.1.0.23] Nickname of the SD card not used in the card filesystem path anymore

REPRODUCIBILITY (% or how often): 100%
BUILD ID = OS VERSION (Settings > About product): 4.1.0.23
HARDWARE (XA2, Xperia 10…): XA2
UI LANGUAGE: DE
REGRESSION: (compared to previous public release: Yes, No, ?): no

DESCRIPTION:

Sd card is no more mounted into /media/sdcard/cardname but in /media/sdcard/cardhashname.
This is fatal if people have stuff which rely on the cardname.

PRECONDITIONS:

Mounted card

STEPS TO REPRODUCE:

  1. Mount a card (with a known name)
  2. ls `/media/sdcard/known_name

EXPECTED RESULT:

directory is shown

ACTUAL RESULT:

file not found.

ADDITIONAL INFORMATION:

Would it be possible to define the path of the card once and never ever again? This mount path moved minimum 5 times on SFOS living. With all due respect: that sucks! You never know if e.g. your backup concept works, all tricks to outsource data from /home/username (by moving to sd card and link) may also break the system. This is more necessary for enterprise environments with e. g. automatical backup concepts.

18 Likes

Thanks for reporting. I will file a bug on this. Indeed, /media/sdcard shows the long and difficult UID code now, instead of the label/nickname given when formating the card.

1 Like

Already mentioned a resulting effect here: [4.0.1.48] Most of android apps stopped working after update

And it is also confirmed by Jolla: https://irclogs.sailfishos.org/logs/%23sailfishos/%23sailfishos.2021-05-14.log.html

As you mentioned, it is quite frustrating to see this changing again and again, breaking stuff.

5 Likes

Is there a way to modify a/some file manually to change the mounted SD card path to be the same it was before.

Tried to figure it out, but I only found instructions to have SD card available for alien dalvik/android.

I need my old SD card path for native software.

1 Like

Sounds like a job for a udev rule and/or systemd path file. Wait for UUID to appear, make symlink using nickname when it does.

1 Like

Huge pain in the hole, killed my beautiful syncthing/sailfish integration.

Changing sdcard mount path every second update sucks a lot. The same goes for connmann settings.

3 Likes

Sound like

relative to SailfishOS 3.4.0 (as it appeared in 4.0.1 AFAIU).

This broke my back routine. I fixed my scripts but I would like to have both paths/symlink.

So.
Half a year and two releases later:
Will we see a fix sometime?

@jovirkku asking you directly but please feel free to forward/raise inside Jolla. Or could you share some insights, please?

3 Likes

@jovirkku, any news WRT this regression since SailfishOS 4.1.0?

1 Like

It is possible to force using partition labels using the following snippet in file /etc/udev/rules.d/99-udisknames.rules:

SUBSYSTEM=="block", ENV{PARTNAME}!="", ENV{UDISKS_NAME}="$env{PARTNAME}"
2 Likes

@DrYak Doesn’t work for me I’m afraid. It still shows the long name. In the other thread - Name of SD Card I showed the various names for the card and I see that in there I don’t have a partition name. I have LABEL and PARTLABEL. Is that the reason that it shows up under ls /media/sdcard/ as the long name still?

Damn, indeed, behaviour has changed in recent versions of udisk2. (It’s still passed as a suggestion for the GUI, but not for the mount-point.

The last-ditch work-around I’ve fallen back to (and this one I’ve just tested, it’s still working with the latest 4.4.0.64 on 10iii):

File /etc/systemd/system/run-media-nemo-Ulysse31.mount ( ← that’s basically the mount path as in Where= below, but with dashes - instead of slashes /):

[Unit]
Description=SD card

[Mount]
What=/dev/disk/by-uuid/f8c2502a-b267-438a-9591-9e84e28afb9a
Where=/run/media/nemo/Ulysse31
Type=btrfs
Options=defaults

[Install]
WantedBy=multi-user.target

This forces a specific UUID to be mounted as a specific path.

Then you:

udiskctl unmount -b /dev/mmcblk0p1
systemctl enable --now /etc/systemd/system/run-media-nemo-Ulysse31

This will work for your “usual” card(s) or USB-C stick(s) for which you make a custom .mount systemd unit, but of course any unknown new SD card or USB-C stick will be mounted by UUID again.

Normally, blkid's LABEL == ùdevd/udisk2`'s PARTNAME.

  • LABEL is the partition name as used by blkid (the thing that you assign when formatting a filesystem, e.g. with mkfs.ext4 -L FunnyName or the Windows FAT32 formatter).
  • PARTLABEL is the name that some partionning systems can give to entries in the partition table. e.g. GPT-partitionned stick can have a PARTLABEL. MS-DOS partitionned one don’t have this.
  • PARTNAME is the partition name, but udisk2 uses a different way to LABEL by blkid.
  • UDISKS_NAME nowadays is only used by udisk when suggesting name for GUI’s filemanager, it’s not used for mount-points anymore.
1 Like

Yep. That works for me once I’d fixed the mount type. D’oh!

Many thanks.

1 Like

The main issue is not to find temporary solution but that there is no consistent, stable sdcard mounting scheme/script, i.e /mnt/sdcard1 or /media/sdcard1 mounting point regardless of that mounted by system. Just like it is provided for alien dalvik.

Just had to install a new Phone as I broke my Xperia 10 and now the user is renamed which broke restoring backups and the SD card isn’t mounted so that I and at least one app can find it.
Ok, I found it as I know my way around Linux but first time in the “File Browser” I searched a little until I swiped left and discovered it in “Places” “Storage devices”.

Too bad that ownKeepass can’t find the SD card. I guess, have to write a udev rule to fix this.

@jolla this wasn’t the experience I expected after smooth sailing on the 2 previous Phones!

1 Like