mount-sdcard

Rating: 
5
Your rating: None Average: 5 (6 votes)

Enhanced mounting scripts for SD-cards

 
They provide the following enhancements compared to SailfishOS' original versions:

  • Start mounting (partitions on) SD-card via udisks at the earliest sensible time: Right after udisks2.service has started.
  • Unmount before udisks2 begins stopping, hence achieving a clean unmount.
  • Ensure, that AlienDalvik begins starting after mounting succeeded, to allow for android_storage on SD-card.
    Even more importantly (i.e., also relevant for devices without "android_storage on SD-card") this also ensures, that unmounting occurs only after AlienDalvik has completely stopped.
    Nevertheless, these configuration files are also applicable to devices without AlienDalvik installed.
  • Since v1.3.4 mount-sdcard uses Systemd EnvironmentFiles for additional mount options.
    These configuration files are designed to be adapted by a system administrator (i.e., you), so if you want to remove the noexec or add other mount options, see here for details.
  • Versions below 1.0-4: Inhibit stubbornly trying to mount block devices without a filesystem recognised by the kernel / udev.
    As Jolla resolved this in SailfishOS 3.0.1, this workaround is omitted in mount-sdcard 1.0-4 (and later versions), making v1.0-3 the last release installable on SailfishOS 2.2.0, 2.2.1 and 3.0.0.
  • Versions below 1.0: Create / try to rectify the "compatibility symlink" in order to allow older apps seamlessly accessing (partitions on) SD-cards at their new (since SailfishOS 2.2.0) mount point.

 
Notes:

  • These configuration files do not alter, replace or delete any extant files.
  • Minimal SailfishOS version supported by mount-sdcard is 2.2.0.
  • Since mount-sdcard 1.0-4 at least SailfishOS 3.0.1 is required.
  • Since mount-sdcard 1.1-1 at least SailfishOS 3.2.1 is required.
  • A reboot is needed for these configuration files to become active.
  • They are by-products of optimising the start-up timing, feature set and shut-down behavior of crypto-sdcard.
  • Support of partitions and whole devices (as Jolla's original versions do).
  • Support for (µ)SD-cards and USB-attached storage (if supported by device hardware and Operating System).
  • mount-sdcard's source files are hosted at Github.
  • For discussing its specific configuration files and RPM packaging, please use its issue tracker at Github.
  • Issues with this RPM package or the configuration files it installs shall also be filed at mount-sdcard's issue tracker at Github.
  • As this web-page at OpenRepos exists merely for distributing mount-sdcard packaged for SailfishOS, there is no need for issuing comments here.

 
License:
LGPL-2.1-only

Keywords:

Application versions: 
AttachmentSizeDate
File mount-sdcard-0.6-2.noarch.rpm7.98 KB26/01/2019 - 20:06
File mount-sdcard-1.0-3.noarch.rpm7.25 KB12/10/2019 - 16:56
File mount-sdcard-1.0-4.noarch.rpm6.93 KB26/10/2019 - 15:53
File mount-sdcard-1.2.3-16.noarch.rpm26.43 KB04/10/2020 - 16:23
File mount-sdcard-1.2.8-20.noarch.rpm26.49 KB16/10/2020 - 11:57
File mount-sdcard-1.3.1-22.noarch.rpm26.49 KB22/02/2021 - 17:52
File mount-sdcard-1.4.0-26.noarch.rpm26.73 KB07/03/2021 - 18:14
File mount-sdcard-1.4.3-1.sfos220.noarch.rpm27.09 KB15/03/2021 - 18:04
File mount-sdcard-1.4.3-1.sfos301.noarch.rpm26.77 KB15/03/2021 - 18:04
File mount-sdcard-1.4.3-1.sfos321.noarch.rpm26.76 KB15/03/2021 - 18:04
File mount-sdcard-1.5.0-1.sfos220.noarch.rpm27.1 KB17/03/2021 - 20:14
File mount-sdcard-1.5.0-1.sfos301.noarch.rpm26.78 KB17/03/2021 - 20:14
File mount-sdcard-1.5.0-1.sfos321.noarch.rpm26.77 KB17/03/2021 - 20:14
File mount-sdcard-1.6.1-1.sfos220.noarch.rpm28.44 KB11/04/2021 - 17:21
File mount-sdcard-1.6.1-1.sfos301.noarch.rpm28.3 KB11/04/2021 - 17:21
File mount-sdcard-1.6.1-1.sfos321.noarch.rpm28.3 KB11/04/2021 - 17:21
File mount-sdcard-1.6.1-1.sfos340.noarch.rpm28.27 KB11/04/2021 - 17:21

Comments

tad's picture

the latest release (1.3.4.25) bricks my device (Jolla C). Can't get past boot screen anymore

olf's picture

@tad, sorry, but are you sure, that this is related?  The changes in v1.3.4 compared to v1.3.3 are minimal and I cannot see that any of these changes could cause this.
Or did you not have v1.3.3 installed before (hence the flaw may already be in that version)?

Nevertheless, I retracted v1.3.4 to be cautious, and may rerelease it, when this is fully understood.

@tad, can you please use the recovery console, select "Shell" and uninstall mount-sdcard per pkcon remove mount-sdcard (or  rpm -e mount-sdcard), then reboot.  Please report back (here), if that made your device boot again; if not, mount-sdcard was not the cause.

tad's picture

@olf sorry for the missing context: I had v1.3.2 installed before that, so the upgrade was from 1.3.2 to v1.3.4, running on Sailfish OS 4.

I booted into recovery console and within the shell (and another chroot to /rootfs) I could remove mount-sdcard with rpm -e. After reboot the boot problem persisted but between the last working reboot and the first non-working reboot, mount-sdcard was literally the only package that I upgraded and I did not change any system settings in between.

 

olf's picture

@tad, sorry that I missed to mention the "chroot to /rootfs" before issuing an "rpm -e" at the recovery console's shell.
But as mount-sdcard is uninstalled now, and it does not alter or replace any extant files in the first place (hence your SFOS installation should be in a state now, as if mount-sdcard was never installed before), I do not believe that the update from v1.3.2 to v1.3.4 caused the "boot blocker" on your JollaC@SFOS4.0.1.

Also:

  • Meanwhile I tried to look thoroughly at all aspects (functionality, rebooting etc.) of mount-sdcard 1.3.4 on an XperiaXA2+@SFOS4.0.1 and an XperiaX@SFOS3.2.1: All seems to work fine.
  • Comparing the changes between mount-sdcard 1.3.2 and 1.3.4 also does not reveal anything obviously intrusive or "dangerous" (in general, mount-sdcard is past that stage for long).

Hence I am considering to re-release v1.3.4 unchanged, if no other user reports similar issues with it.
Thus, if anyone else does experience an issue with mount-sdcard 1.3.x, please report it at mount-sdcard's issue tracker ("ASAP" ;-) ).

SebMa's picture

@olf Hi, is this app able to mount an exfat formatted sdcard ?

olf's picture

Yes, mount-sdcard mounts every file system supported by the OS.

I.e., for exFAT one has to install exFAT file system support and shall also install the corresponding exFAT utils, because SailfishOS does not support exFAT out of the box.

Vieno's picture

@olf: Does your script still working with 3.0.3.8 as Jolla has changed the mounting trigger from init to systemd? I'm scared to run into problems. Thanks for your advice in advance.

olf's picture

Yes, I am generally aware of some change coming (but not its technical details or when) and most likely mount-sdcard 1.0 (and older versions) will cease to "work" when a significant change occurs, in the sense that mount-sdcard is not executed anymore (i.e., "does nothing" then). As I have not subscribed "Early Access (EA)", because that affects all devices registered under a Jolla account, I will have the chance to check and adapt mount-sdcard if necessary, when SFOS 3.0.3 GA is released.
But still all other aspects of my answer to the same question WRT upgrading to SailfishOS 3.0.1 hold true, thus there is no reason to be afraid or even "scared".

Vieno's picture

Thanks for your swift reply. I've had a problem with my phone already due to some careless updating on my side. And it tooked me three months to recover from that in my very limited spare time. Luckily my Jolla 1 was still working and still is. Therefore I wait till 3.0.3.8 is GA, which may still take some time due to some unpleasant issues Jolla discovered.

olf's picture

mount-sdcard works as usual after upgrading to SailfishOS 3.0.3.9 (the 3.0.3 version, which reached "general availability (GA)" status).

Just a quick check; no analysis yet, if anything changed at all WRT mounting unencrypted SD-cards or if mount-sdcard was just not affected.

olf's picture

Analysis: Nothing was changed WRT mounting unencrypted SD-cards and USB storage devices in SailfishOS 3.0.3.

Vieno's picture

Thats great news. Thanks for checking on it.

olf's picture

BTW, mount-sdcard is in "maintenance mode" since version 1.0, as it appears to be stable and feature complete for its users. That means there will be no new releases, unless bugs are reported (preferably at Github) or a new SailfishOS release breaks it.

Pemek's picture

For me it didn't. Later it turned out a fuse-exfat bug (I took it from different repo), so I reformatted sd to vfat + ext4 and now works flawlessly.

Pemek's picture

Does it work in 3.0.1.11?

olf's picture

I guess so, but haven't tried yet.
Why don't you try and report your experience here?

At worst (quite unlikely though), mounting the SD-card fails.
If you uninstall mount-sdcard then, the SFOS installation is exactly in the state it would be without ever having installed mount-sdcard (as it alters no system files), so there is no risk involved in trying.

olf's picture

Yes, it does.

MooCrumpus's picture

works fine, thank you very much!

Vieno's picture

The script hasn't mounted my ext4 SD card. God knows why. I hate to trouble shot.

olf's picture

So before installing mount-sdcard and after uninstalling it, SailfishOS is mounting your "ext4 SD card" fine?

Vieno's picture

No, for both cases. I was hoping to solve my mounting problem by installing your script. My wife has used the SD-card in a thumpdrive adapter at a printing service terminal. After that the phone was not able to mount the card again. On my laptop everything looks ok with the SD-card. I'm just lacking in time to dig into the problem and tried an easy attempt using your script.
I dont think your script has a bug. Something must have happened with the sd-card at the printing terminal which prevents mounting in the phone.
Maybe next week or in December I can spare some time to solve the problem (and maybe report relevant findings)

olf's picture

You may try reformatting it in your SFOS device, using this guide at TJC.