Ask / Submit
1

SD Card not recognized anymore [answered]

asked 2015-07-25 00:22:05 +0300

RoestVrijStaal gravatar image

updated 2016-08-17 14:39:45 +0300

jiit gravatar image

Hi,

I pulled out my SD card but forgot my Jolla was still on.

After putting the SD card in, the media appears in the File Manager but no files are given.

I tried rebooting my Jolla several times, with and without the sd card in, but no effect.

How to fix?

edit retag flag offensive reopen delete

The question has been closed for the following reason "the question is answered, an answer was accepted" by lakutalo
close date 2015-07-25 23:52:39.070174

Comments

1

Self-Update:

I've fixed it by my own by taking the sdcard out (of course when Jolla was turned off this time). Booted up Jolla again and removed the folder named with the sdcard-identifier in /media/

Manually rebooting the Jolla with the sdcard pulling in (turn off phone - insert sdcard - turning phone on) created the mountpoint-folder again and the files on the sdcard are accessable and writeable again.

However I wonder if I polluted any config file (like fstab) now because I removed the mountpoint-folder.

RoestVrijStaal ( 2015-07-25 19:58:57 +0300 )edit

okay, so your case the problem wasn't on the FAT partition itself but the mount point where it get attached onto the nain BTRFS partition. (left hanging with wrong rights).

(just for security, if I were you, I would eun a btrfs scrub on it)

no risk of polluting a configuration file: there is none, everything is dynamically detected and mounted by the 'mount-sd' script

DrYak ( 2015-07-27 02:26:56 +0300 )edit

3 Answers

Sort by » oldest newest most voted
1

answered 2015-07-25 02:42:10 +0300

DrYak gravatar image

Looks like your FAT32 partition on the SD is corrupted.

The best would be to try fixing it.

Under linux, use fsck.vfat while running as root. Exemple on the Jolla :

devel-su fsck.vfat -a -f /dev/mmcblk1p1

Example on a Linux desktop (E.g.: ubuntu, systemrescuecd, etc.), assuming that you use an USB card reader and the SD card shows up as the second device (you can check this by runing lspci) :

sudo /sbin/fsck.vfat -a -f /dev/sdb1

Under Windows, I think the corresponding command is CHKDSK but I'm not sure about the options. You could also do it with the mouse by something like right-clicking on the drive with the SD card, asking for the properties, "*tools" tab and start a check.

(Avoid searching for bad sectors. Nowadays this kind of things is handled by the drive firmware (both flash like your case and spinning drives), thus it's useless and will only uselessly put stress on the wear leveling).

If you've reformatted the drive as something else than the FAT32 that came with it, you should use the proper tools to check it (e.g.: fsck.ext4). Exceptions are BTRFS (btrfs check --repair instead of fsck) and NTFS (ntfsfix)

edit flag offensive delete publish link more

Comments

1

Thanks for the reply.

I've checked it under windows with chkdsk /x /f (/r is possible, but for a 32GB-flash drive it's better to use that when chkdsk mentions errors when parameter /f is given, also I didn't know that firmware is [i]that[/i] smart nowadays. I guess it depends on the vendor ).

For me it didn't solve the problem because chkdsk told me the sd card is ok. So there were no apps writing nor reading on the sd card when it got pulled out. It would help for other readers here

RoestVrijStaal ( 2015-07-25 19:54:22 +0300 )edit
1

answered 2015-07-25 04:58:12 +0300

iKeivs gravatar image

You must wait for a while, Because the phone is checking it, and performing necessary background actions. Duration is deppending on card size, class and used space.

Also DrYak's idea could fix the problem

edit flag offensive delete publish link more

Comments

The default partition format on SD cards are FAT32 (and FAT16 for smaller ones) (on SDXC it's exFAT which requires an extra after market package on Jolla due to patent licensing issue).

The kernel driver for FAT doesn't perform any check at mount time (because there are no journal or anything else present to help check). The mount script (mount-sd.sh) also doesn't perform any check neither (it only tells the indexers that there are new media source to index). A FAT partition is either broken gets mounted.

So waiting shouldn't in theory help anything with a FAT partition.

That's different with EXT4 : it has a journal so replaying it on mount should help reaching the last known-good state of the partition. So waiting until the driver finishes replay the journal helps.

That's different too with BTRFS : with that partition format, most of the checking and error handling is done on the fly by the kernel (because in addition of a journal, it has checksum, configurable level of redundancy, etc.) Checking tools are actually either special triggers that ask the driver to preform checking (btrfs scrub) or a small special tool for when a partition is broken beyond the point where the driver can salvage (btrfs check - it's main purpose is to perform some basic check and hopefully bring a partition in a mountable state again).

DrYak ( 2015-07-25 09:43:08 +0300 )edit
1

Thanks for the reply. The sdcard in question is 32GB, class 10 (but nowadays that's more a marketing term like "extra virgin" on bottles olive oil).

It could be the case since the scanner of Gallery have to go through thousands of files which include metadata in various encodings.

At least as someone who used an Android phone before I'm aware that Android's Mediascanner works slow (or even worse, choke on an corrupted file). But -as far as I understood it- at SailFishOS such a scan would only get performed by opening the Gallery app.

RoestVrijStaal ( 2015-07-25 20:36:07 +0300 )edit

@RoestVrijStaal you made my day :D extra virgin on olive oils :D

iKeivs ( 2015-07-26 12:16:52 +0300 )edit
1

answered 2015-07-25 20:31:50 +0300

RoestVrijStaal gravatar image

updated 2015-07-25 20:37:28 +0300

I've fixed it by my own by taking the sdcard out (of course when Jolla was turned off this time). Booted up Jolla again and removed the folder named with the sdcard-identifier in /media/

Manually rebooting the Jolla with the sdcard pulling in (turn off phone - insert sdcard - turning phone on) created the mountpoint-folder again and the files on the sdcard are accessable and writeable again.

However I wonder if I polluted any config file (like fstab) now because I removed the mountpoint-folder.

Offtopic: is there a checkbox somewhere to flag your question/post/topic as solved?

edit flag offensive delete publish link more

Comments

1

You can always mark the correct answer by using the check button below the two vote buttons of the answer. To close a question as solved simply click on solved below your question and mark it as answered.

lakutalo ( 2015-07-25 21:12:51 +0300 )edit

Question tools

Follow
1 follower

Stats

Asked: 2015-07-25 00:22:05 +0300

Seen: 759 times

Last updated: Jul 25 '15