# SDcard ext4 format function doesn't work

Tracked by Jolla (In release)

Hello sailors,

i have a new card as 64gb, and wanted to reformat it.
Since Aurajoki it is possible to use this function under settings/storage/memory card/.
But it don't works with me.
If i go on this point of settings, i see that the card is not accessible because of exfat format ('til now is quite normal).
Then i pull on it and have options format and New directory
Then Under Format i have just a button delete all files. And doing it make nothing more. Null No format the card or other things.

I represented myself that i may reformat my card with different format that are possible to choose.
Format like ext4 or btrfs, as long as it's still possible to have access on it with mtp.

Have someone any experience on it with this function?
Is it a bug or an hidden feature?
What are the limitations of this function concretely. (all type of format are spared if sd>64gb? or just exfat?)

Edit: Manually done in CLI mode (trough ssh usb), i made:
cd /dev/disk/by-id/
ls -la
cd /dev/disk/by-uuid/
ls -la
To verify/recognise the memory card on the system (mmcblk1p1).

Then Inspiring from chemist tutorial here (use eventually devel-su before each commands if its not recognized or asked for root):
umount /dev/mmcblk1p1 - unmount the card
mkfs.ext4 /dev/mmcblk1p1 - format the card
mount /dev/mmcblk1p1 /media/sdcard - mount the card

Then the root of the sdcard is visible but not accessible.
We should give the mount point the correct owner (nemo) in developer mode.
chown nemo:nemo /opt/alien/media/sdcard -R

Should create some directories with devel-su:
chown -R nemo:nemo .directory/
chmod -R a=rwX .directory/

Works fine with MTP further. :-)

I ask me why then, why this Formatting function not present different kind of formatting systems...

Cheers

PS: Please give feedback if something don't work by the commands above.
Maybe some more commands are needed to reach the goal.
And that could help for any improvement of the interface and/or this topic.

edit retag close delete

1

Maybe the SDcard settings functions only play nice with FAT-filesystems and you have to use console or other device to format other filesystems?

( 2016-11-03 16:31:35 +0300 )edit
1

maybe. but if the gui display the possibility to use it, then at the basis it should works. or not because of a bug, or because of an unknown feature or case.

( 2016-11-03 16:49:06 +0300 )edit

You need ti try do this manually, in Terminal app with root rights. Terminal app like all others linux distros have built in commands like lsblk. with lsblk you can find your sdcard name you want work with. the next step is use command fdisk. Hope this helps!

( 2016-11-03 16:51:18 +0300 )edit
1

if using gui you dont have possibility to choose filesystem type from list, then gui capavilities is very limited, till one option/file type. as exfat does not officialy support more than 32gb, thats because you cannot format its error, if you want use 64gb, you need to use Terminal.

( 2016-11-03 16:56:56 +0300 )edit

surely i can do that, i think i can experiment until the end of month. What i expected, is that the gui present me different kind of format.
no one knows what it does... that's great.

( 2016-11-03 18:36:11 +0300 )edit

Sort by » oldest newest most voted

As you referred to exfat in one of your earlier versions of the question, exfat > 32GB is not officially supported. But you might get some clues from this thread and answer: https://together.jolla.com/question/56813/cannot-mount-sdxc-card/?answer=96772#post-id-96772

If you do not need exfat, you might consider formatting your µsd with ext4. You can do this directly on your phone using CLI. Hints and clues regarding formatting can be found here: https://together.jolla.com/question/40802/how-to-format-your-usd-card-to-share-space-with-android/?sort=votes&page=1 both for Jolla1 and JollaC, respectively.

more

thank you very much for your answer. you mean as workaround until it works, right?

( 2016-11-03 16:46:43 +0300 )edit

Sure, since a real solution can only be provided by Jolla. :)

( 2016-11-03 16:48:33 +0300 )edit
1

Sorry i must precise i don't want especially to have exfat. ext4 or btrfs fit to me, as long as the mtp still works with it.

( 2016-11-03 16:50:48 +0300 )edit

Well, then you will simply need to put another fs onto the µsd. MTP is another error-prone story.

( 2016-11-03 16:55:10 +0300 )edit

wow! i saw your 2nd link... and i stop to "that's not a beginner guide"...
Not that i'm a stupid or lazy guy, but i can't allowed me to take so much time to tinker , and take some risk to destroy something.
Motivation is to have something which rocks inthebox, that the gui present and should "provide"...

( 2016-11-03 16:58:31 +0300 )edit

There is a much simpler way that worked for me:

Remove external SD card assuming it is a removable sdcard?!

2. insert sdcard in computer and format ext4, this process for my 128GB card took about 6hours, so make sure the computer is plugged in and always on,
3. when done plug SD card into phone, reboot phone, select from settings storage, memory card, format, this should only take a couple minutes,
4. boom your done, i have a 128GB card running just fine.
more

7

6h for just a format sounds to me like you are doing something wrong? Like you first overwrite the whole card X times.

( 2016-11-04 03:07:51 +0300 )edit
1

Laptop or Desktop? Fiii... Our method is command line in terminal :)

( 2016-11-04 08:32:06 +0300 )edit
1

anyway, that's a concrete information that it work with sdcard with more than 32gb.
How it is done, is firstly not important.
But that is correct if it's possible to do the job directly on the own phone with cli. (if it works then jolla have to do more for finishing the function)

( 2016-11-04 10:32:48 +0300 )edit
1

@cemoi71 it would be nice if the above commands could be incorporated as a script and posted on open repos, maybe in addition a selection for ext4 or btrfs depending on whether Jolla 1 or Jolla C device is used.

( 2016-11-08 09:39:02 +0300 )edit

@DarkTuring i'm not for a third part solution fully separate from jolla store like openrepos.
i don't like openrepos, because it is not supported from jolla, and things which was done in openrepos, seems to come really rarely in store or in sfos.
But you're right that if jolla don't use it. Then it will be really helpful that at last here there is anyway to have a possibility like this.
That's just my opinion, my real answer is, i'm not a dev, and have no time to learn how i may do for this. I f i knew how to program, then it would be done relatively fast. The next step for me was to make a suggestion, to jolla and or other devs to do an improvement like this in an other thread....
If you are faster than me, then feel free to suggest it. that will be a great improvement i think.
Otherwise maemo with chemist started a dev contest. Someone may suggest an sdcard formatting tool...

( 2016-11-08 13:43:12 +0300 )edit

I don't have an answer, as such but... I was on the Jolla 1 on the latest software, backing up to a memory card which was FAT, (forget which version, I grabbed it out of a GpPro4 to do the job) and it didn't like it. Said it wanted ext4. Wouldn't even format it. Had to put it in a Linux workstation and reformat it... and then it would see it, but complained that it was write only... however the Jola 1 formatted it.

Put the card in a Sony Experia X running the latest Sailfish X and it took the backup, so I then reformatted the card and put it back in the gopro.

Today, I decided to back up the Sony, so grabbed a card and formatted it in the Linux machine before even putting it in this time. The Sony complained that it was write only, so I went to format it, but the format options under storage, only mention deleting the files and not actually formatting the card. The system kept complaining that it was write only, and refused to do a backup.

Eventually, because I'm at work and can't mess around with the command prompt on my mobile, while at my work desk (and my boss sits alongside me) I ripped the card out, put it in a Windows 10 machine, and formatted it to FAT32, hoping that the Experia would be able to then reformat it to ext4. Just out of curiosity, I attempted a backup to see what the error message would be.... and the phone backed up !!!

So... yes... looks like the SD format needs a bit of work.

more

many thanks for bringing your experience.
At last you use the FAT32 with a card with a specific capacity. FAT32 is limited for the capacity of the card.
Imagine you need a bigger one... maybe 128gb or 256gb, with FAT32???
From Microsoft side there is exfat (don't like it, it's closed, surely has patent or is bound to royalties).
BTRFS would allowed it, and ext4 as native (and opened :-) ).but...
But with sfos, how do we format it fearless with the gui? don'T know, we miss it...

( 2018-03-12 13:40:09 +0300 )edit

i couldn't format the card from settings>storage so i did it with windows PC. formated into exfat and upon insert it showed the card is not supported. the format option was available then. i tried to format. i waited untill next morning (almost 10 hours). nothing happened. then i tried ext4 format with linux pc. tried again in phone, but it showed 'No permission'.

As last resort, i formatted to FAT32 in windows pc. and now it works just fine. din't even ask to format on insertion. the file system is shown as VFAT.

Support for VFAT is very much appreciated.

more

hum, on the one hand, that's fine that you solved your problem.
On the other hand, i find sad that we had no chance to investigate a little bit on the reason why you had "no permission" by the formating in ext4. I would be curious about which right had the directory '/opt/alien/media/sdcard' with the command ls -l in the directory '/opt/alien/media/'. Maybe on this place the owner was not correct or simply the rights one... :-(
Thanks anyway for the report...

( 2017-03-28 00:21:22 +0300 )edit

seeing “No permission to media/sdcard/xxxx-xxxx” i checked the owner and permissions of the directory.

the owner was “system” and permission status was,

system rwx

nemo ---

others ---

( 2017-03-28 01:53:44 +0300 )edit

does it means that at this place the owner is system and group is nemo?
nemo should be the owner, and the group too. (there is an user nemo which belong the nemo group.

did you tried the command chown -R nemo:nemo your_path?
Maybe you'll need the command chmod -R ug=rwx your_path after ...

( 2017-03-28 12:49:50 +0300 )edit

you are right about the owner and group. System was owner and Nemo was group.

Am not too much into the command side since am not a pro. so i didnt risk to try the command.

this will help someone else, though..

( 2017-03-28 13:41:27 +0300 )edit

@ajisht2 the only thing that you may risk with these commands, is to still get no access on the directory.
And then you may still apply similar commands to have the last state that you have before...
But i won't force you to do it, if you don't want to.
I'll better recommend you to let appreciate the conversation to a friend of yours, who may understand the stuff, for having a 2nd opinion.

May i ask you how you have acces on the command line? though jolla in devel-mode? or with ssh?

( 2017-03-28 22:50:49 +0300 )edit