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

how long does SailfishX take to format to ext4?

asked 2019-05-17 13:33:26 +0300

RobNas gravatar image

How long does it normally take to format an SD card to ext4? I'm now busy with a 128GB card, formatting on pc to fat32 took about 1 minute. I'm now about 5 minutes busy, without any visible progress.

edit retag flag offensive close delete

Comments

Ext4 takes a lot longer than Fat32. So wait a few minutes.

leszek ( 2019-05-17 13:52:09 +0300 )edit

I waited about half an hour, without any visible progress. Now I restarted the phone and am retrying it. It probably still takes a lot of time ...

RobNas ( 2019-05-17 14:11:25 +0300 )edit

1 Answer

Sort by » oldest newest most voted
1

answered 2019-05-17 17:57:35 +0300

DrYak gravatar image

On most Linux machine, formatting a flash media also sends a "TRIM" / "DISCARD" command to be sent to the whole partition you're formatting (to make the space as clear / unused to the flash manager inside the card).

Depending on card models, it can take some time to process the command but it should still be in the minutes range, definitely not half an hour.

Alternative command from the command line (so terminal or SSH to the phone), you need to be root (so first use devel-su) :

mkfs.ext4 -L UserFirendlyName /dev/mmcblk1p1

where UserFirendlyName is the label you want to give to the partition. It will appear in the mount path : /run/media/nemo/UserFirendlyName

edit flag offensive delete publish link more

Comments

Tried to run that in terminal, with as result:
" mkfs.ext4: invalid blocks '/dev/mmcblk1p1' on device 'sd128gb' "

RobNas ( 2019-05-17 18:06:21 +0300 )edit

@RobNas Is the card plugged in correctly? Or is there a chance the card is broken?

Smar ( 2019-05-19 21:22:05 +0300 )edit

No, no chance. Reconnected and reformatted card on pc several times.

RobNas ( 2019-05-20 17:37:58 +0300 )edit

Actually, which of the Xperia are you using? X? XA? It happens that the exact version of the kernel (3.10.84) used by Sailfish X's Baseport 6 on Xperia X has a bug that causes some 128GB SD cards not to be correctly recognized and has trouble accessing the flash media. ( extra source )

The newer kernel version used in Sony's Android 7.0.1 Marshmallow (3.10.104-something-ish) and 8.1 Oreo (4.4.xxx) do not suffer from this bug. (So if eventually Jolla considers the huge task of back-porting the Baseport 8 from XA2 to X, once they finish working on XA2, this might fix the bug).

Sandisk (reportedly) and Transcend (personal experience) do not have such problems with the Xperia X. Some Samsung EVO (I think the older non plus one) got reported as problematic.

DrYak ( 2019-05-20 17:52:55 +0300 )edit

Another point for different help: Howto: microSD/SDHC/SDXC cards

Among other, is the card partitioned (is there a ~p1 partitition to begin with)?

If I run lsblk(as root, so devel-su) I get at the end of the long list:

mmcblk1           179:64   0 119.3G  0 disk 
|-mmcblk1p1       179:65   0   111G  0 part /run/media/nemo/Ulysse31
|-mmcblk1p2       179:66   0     4G  0 part 
`-mmcblk1p3       179:67   0     4G  0 part [SWAP]

(Notice that mmcblk1 is partitioned)

And blkid /dev/mmcblk1* (again, root):

/dev/mmcblk1: PTUUID="6081eb6c-cd84-5d49-93b0-ee35a8a29752" PTTYPE="gpt"
/dev/mmcblk1p1: LABEL="Ulysse31" UUID="f8c2502a-b267-438a-9591-9e84e28afb9a" UUID_SUB="57c7dfb5-7769-4496-af57-4bfb051e3a84" TYPE="btrfs" PARTLABEL="Ulysse31" PARTUUID="aa2023e0-ad4a-3146-b99c-0074c997293c"
/dev/mmcblk1p2: PARTLABEL="Reserved" PARTUUID="0151d384-ae54-6747-b850-7adb27053baa"
/dev/mmcblk1p3: LABEL="SDSwap" UUID="827efbf6-cf7b-4288-a61a-584d16004ae3" TYPE="swap" PARTLABEL="SdSwap" PARTUUID="8b5db7c6-4bb4-9041-8e19-330eda89bfc2"

Again, notice that mmcblk1 is partitioned (in my case gpt, you might have msdos), and that mmcblk1p1 is the partition with a filesystem on it (in my case, it's BTRFS - I like checksums and snapshots. Yours should be exFAT for a SDXC ( > 32GiB ), or maybe FAT32 with your windows format tools)

Another way to check it fdisk -l /dev/mmcblk1:

Disk /dev/mmcblk1: 119.3 GiB, 128043712512 bytes, 250085376 sectors
{...}
Disklabel type: gpt
Disk identifier: 6081EB6C-CD84-5D49-93B0-EE35A8A29752

Device             Start       End   Sectors  Size Type
/dev/mmcblk1p1     32768 232816639 232783872  111G Linux filesystem
/dev/mmcblk1p2 232816640 241205247   8388608    4G Linux reserved
/dev/mmcblk1p3 241205248 249593855   8388608    4G Linux swap
DrYak ( 2019-05-20 18:08:12 +0300 )edit
Login/Signup to Answer

Question tools

Follow
3 followers

Stats

Asked: 2019-05-17 13:33:26 +0300

Seen: 252 times

Last updated: May 17 '19