We have moved to a new Sailfish OS Forum. Please start new discussions there.
22

SDcard ext4 format function doesn't work

Tracked by Jolla (In release)

asked 2016-11-03 15:00:23 +0200

cemoi71 gravatar image

updated 2018-02-25 23:00:09 +0200

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.
Many thanks in advance.

edit retag flag offensive close delete

Comments

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?

avhakola ( 2016-11-03 16:31:35 +0200 )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.

cemoi71 ( 2016-11-03 16:49:06 +0200 )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!

sa1l0 ( 2016-11-03 16:51:18 +0200 )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.

sa1l0 ( 2016-11-03 16:56:56 +0200 )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.

cemoi71 ( 2016-11-03 18:36:11 +0200 )edit

4 Answers

Sort by » oldest newest most voted
5

answered 2016-11-03 16:42:34 +0200

lakutalo gravatar image

updated 2016-11-04 10:36:57 +0200

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.

edit flag offensive delete publish link more

Comments

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

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

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

lakutalo ( 2016-11-03 16:48:33 +0200 )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.

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

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

lakutalo ( 2016-11-03 16:55:10 +0200 )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"...

cemoi71 ( 2016-11-03 16:58:31 +0200 )edit
3

answered 2016-11-04 01:24:46 +0200

DarkTuring gravatar image

There is a much simpler way that worked for me:

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

  1. on laptop or desktop download https://members.sdcard.org/downloads/formatter_4/
  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.
edit flag offensive delete publish link more

Comments

7

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

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

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

Asmir ( 2016-11-04 08:32:06 +0200 )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)

cemoi71 ( 2016-11-04 10:32:48 +0200 )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.

DarkTuring ( 2016-11-08 09:39:02 +0200 )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...

cemoi71 ( 2016-11-08 13:43:12 +0200 )edit
1

answered 2018-03-12 10:30:06 +0200

msknight gravatar image

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.

edit flag offensive delete publish link 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...

cemoi71 ( 2018-03-12 13:40:09 +0200 )edit
0

answered 2017-03-27 15:33:03 +0200

ajisht2 gravatar image

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.

edit flag offensive delete publish link more

Comments

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...

cemoi71 ( 2017-03-28 00:21:22 +0200 )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 ---

ajisht2 ( 2017-03-28 01:53:44 +0200 )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 ...

cemoi71 ( 2017-03-28 12:49:50 +0200 )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..

ajisht2 ( 2017-03-28 13:41:27 +0200 )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?

cemoi71 ( 2017-03-28 22:50:49 +0200 )edit
Login/Signup to Answer

Question tools

Follow
7 followers

Stats

Asked: 2016-11-03 15:00:23 +0200

Seen: 3,870 times

Last updated: Mar 12 '18