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
File mount-sdcard-1.7.2-1.sfos220.noarch.rpm29.15 KB27/05/2021 - 15:10
File mount-sdcard-1.7.2-1.sfos301.noarch.rpm29.01 KB27/05/2021 - 15:10
File mount-sdcard-1.7.2-1.sfos321.noarch.rpm29 KB27/05/2021 - 15:10
File mount-sdcard-1.7.2-1.sfos340.noarch.rpm28.98 KB27/05/2021 - 15:10
File mount-sdcard-1.8.0-1.sfos220.noarch.rpm29.16 KB01/06/2021 - 19:20
File mount-sdcard-1.8.0-1.sfos301.noarch.rpm29.03 KB01/06/2021 - 19:20
File mount-sdcard-1.8.0-1.sfos321.noarch.rpm29.03 KB01/06/2021 - 19:20
File mount-sdcard-1.8.0-1.sfos340.noarch.rpm29 KB01/06/2021 - 19:20
File mount-sdcard-1.8.1-1.sfos220.noarch.rpm29.15 KB12/06/2021 - 16:38
File mount-sdcard-1.8.1-1.sfos301.noarch.rpm29.02 KB12/06/2021 - 16:38
File mount-sdcard-1.8.1-1.sfos321.noarch.rpm29.02 KB12/06/2021 - 16:38
File mount-sdcard-1.8.1-1.sfos340.noarch.rpm29 KB12/06/2021 - 16:38

Comments

levone1's picture

I've recently done a clean flash of latest available version (4.0), for the sake of testing various things, and when I installed mount-sdcard yesterday (latest), after reboot, rhe problem appeared. Si I uninstalled it and rebooted, and it was back to normal.

olf's picture

As denoted, the reason is the specific community device adaptation for the Xperia XZ2 & XZ3 series.

P.S. / edit (2021-06-01):
mount-sdcard 1.8.0 handles the different (compared to all devices supported by Jolla) mapping of the device-internal, fixed mass storage on some community device adaptations (Xperia XZ[23]{c}, FxTec Pro¹ etc.) well.

levone1's picture

Replied on TMO - sorry for confusion. ..

levone1's picture

Olf - could you take a look at this - https://forum.sailfishos.org/t/strange-storage-issue/6252 ... I think I traced it to mount-sdcard app.

olf's picture

Oh, thanks for denoting.  So uninstalling mount-sdcard resolves that?
If so, please open an issue at github with (at least) the information requested below. 

BTW, it was tricky for me to gather the environment precisely: "An XZ2c 8314, with Rinigus' SFOS-adaption, and updated per OTA from 3.4.0 to 4.0.1.  But these effects did not start until about a week ago…".

Did you install or update mount-sdcard at that point of time?

I assume you are using mount-sdcard 1.6.1 (as v1.7.2 was released yesterday and you experience these issues for weeks), right?

Side note: I am glad about bug reports on SFOS 4.x.y, but I have it only running on a single testing device (XA2), my other SFOS devices are all still on SFOS 3.   With some more information I may be able to retrace your issue on this XA2, if it is really related to mount-sdcard.

levone1's picture

You mentioned posting "information below", but not sure what info you need. .. Current state is Xperia XZ2 Compact, clean flash 4.0.1.48, no modifications. Storage is mounted normally until installing mount-sdcard, then the issue apears.
Also, one thing I was interested in installing it for is the info that says it will enable sd card access on Android, but not working. I do get a popup "allow access?" but still no file management functions are successful.
Thanks

olf's picture

Thanks, I became confused by the info you provided at FSO.
Solely looking at your description here provides a much clearer picture.

Based on this information, I created mount-sdcard issue #41.
It would be very helpful, if you answer the "open question" ("Which version have you tested?") and carry out a little initial analysis (a single ls command), there.

I suspect that things may be different on this community port compared to an SFOS installation on an officially supported device.

levone1's picture

ok - left responses... Thanks

olf's picture

Thank you @levone.
Your command line output shows that the mapping of partition on internal eMMC on this community port of SailfishOS is quite different to all officially supported devices.

I will continue to update mount-sdcard issue #41, and hopefully come to a solution without detrimental effects on the devices supported by Jolla (because that would be no acceptable solution for me).

olf's picture

mount-sdcard 1.8.0 is handling your community device adaptation well, see here for details.

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?

Pages