Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

[Tutorial/HOWTO] Convert Your External SD Card from FAT/exFAT to EXT4! (3 ways!)

OP JustArchi

12th October 2013, 07:58 PM   |  #1  
JustArchi's Avatar
OP Recognized Contributor / Recognized Developer
Flag Warsaw
Thanks Meter: 28,765
 
7,579 posts
Join Date:Joined: Mar 2013
Donate to Me
More
Hello guys.

I was looking for a similar guide to link to my friend but didn't find anything, so I decided to write my own.
Personally I didn't find any good guide regarding partitioning from android itself, so I think it's also more unique guide because you can easily make your own partition layout without using PC at all.

Why I should use EXT4 instead of FAT/exFAT?
1. We're running Android, Android is based on Linux. EXT4 is native linux-proposed filesystem, while FAT/exFAT is not.
2. All our internal partitions (/efs /data /system /cache /preload) use ext4, natively.
3. CM has poor exfat support, while fat32 is not recommended for big file systems (over 2 GB) because it doesn't work well with them, thus microsoft implemented exfat.
4. EXT4 has better stability and performance, especially on Android devices, compared to exfat and fat.

When you should not use ext4 over fat/exfat?
- When you for whatever reason use your external sd card in windows environment physically. Android works in MTP mode, you'll use your ext4 external sd card the same way as you use internal one under windows. But if you for whatever reason puts your external sd card f.e. in usb adapter connected with windows then it won't work. So yeah, if you keep your external sd card in your phone then you're fine.

Expert Way (Requires fdisk/mke2fs utilities (busybox), works always):
1. Launch any terminal from Android environment (f.e. Android Terminal Emulator or adb shell through PC)
2. Make sure you have root (su command)
3. Make sure you have all required utilities. Type fdisk --help and mke2fs --help, both commands should print usage. If you get "command not found" then you don't have required utilities. Either install Busybox or CM-Based ROM with native busybox support (tested on ArchiDroid 2.X)
4. Unmount your external sd card (umount /storage/sdcard1)
5. Launch fdisk partitioning program on your external sd card (fdisk /dev/block/mmcblk1)
6. Destroy partition table (o), create new partition (n), make sure it's primary (p) and first one (1).
7. You can check if you're satisfied with your partition layout (p). When you're done exit and save changes (w)
8. Create ext4 filesystem on your partition (mke2fs -t ext4 /dev/block/mmcblk1p1)
9. Reboot

Android should automatically detect and mount external sd card in ext4 after reboot.

Here you can find a short movie which shows going through expert way recorded by me


Intermediate Way (Requires USB Adapter and some patience, should work like a charm):
1. You'd need USB Adapter or any device which can read micro sd cards on PC
2. Open any linux-supported partitioning program (f.e. partition magic, gparted, parted), it needs to support ext4.
3. Delete all partitions from your external SD Card (typically, one fat/exfat) and create one ext4 partition.
4. In case you'd also want hardswap create 2 partitions, one primary ext4 one and second primary swap one.

Newbie Way (Requires PhilZ Touch Recovery, may not work):
1. Launch PhilZ Touch Recovery
2. Select "Mounts & Storage" => "format /external_sd"
3. Select "ext4" as a filesystem
4. Please note that it can take some time. This way you should get running ext4 filesystem, but personally I didn't test this method, as I prefer more advanced ones .

This guide is more or less universal but I'm using sgs3 external sd card paths so I want to make sure nobody bricks other phones . Personally I suggest using expert way, as it's probably the easiest one.

Hit thanks if it helped, I hope it did .
Last edited by JustArchi; 12th October 2013 at 08:05 PM.
The Following 39 Users Say Thank You to JustArchi For This Useful Post: [ View ]
20th October 2013, 07:28 PM   |  #2  
cba1986's Avatar
Senior Member
Flag Somewhere in Buenos Aires
Thanks Meter: 494
 
2,029 posts
Join Date:Joined: Aug 2010
More
@JustArchi thanks for the tutorial. Now for the sake of sdcard wearing. I would like to disable Journaling. How do you do that?

EDIT: also i noticed after formatting the externalsd card there is 3 GB occupied by nothing (?) This is normal?
Last edited by cba1986; 20th October 2013 at 07:36 PM.
20th October 2013, 08:32 PM   |  #3  
JustArchi's Avatar
OP Recognized Contributor / Recognized Developer
Flag Warsaw
Thanks Meter: 28,765
 
7,579 posts
Join Date:Joined: Mar 2013
Donate to Me
More
Quote:
Originally Posted by cba1986

@JustArchi thanks for the tutorial. Now for the sake of sdcard wearing. I would like to disable Journaling. How do you do that?

EDIT: also i noticed after formatting the externalsd card there is 3 GB occupied by nothing (?) This is normal?

tune2fs -O ^has_journal /dev/block/mmcblk1p1 should do the trick. You can put it in init.d if needed.

Also no, you should get full size of your sdcard. Are you sure that you've firstly destroyed partition table (o) and then created new full-size partition (n), as showed in the video?

You can use fdisk also to get information about your external sd card and find why is it smaller than it should be.
The Following User Says Thank You to JustArchi For This Useful Post: [ View ]
21st October 2013, 04:31 PM   |  #4  
Junior Member
Flag Abu Dhabi
Thanks Meter: 3
 
16 posts
Join Date:Joined: Oct 2010
More
HI, My 64gb is two partitioned one hardswap and other primary.
Will I lose data on both partitions if I delete partition and format to EXT4?
21st October 2013, 04:46 PM   |  #5  
Member
Thanks Meter: 21
 
69 posts
Join Date:Joined: Apr 2010
More
Quote:
Originally Posted by golti

HI, My 64gb is two partitioned one hardswap and other primary.
Will I lose data on both partitions if I delete partition and format to EXT4?

You will lose data contained in the partition you are formatting. If you leave the other partitions untouched, you won't lose their data.
21st October 2013, 05:10 PM   |  #6  
JustArchi's Avatar
OP Recognized Contributor / Recognized Developer
Flag Warsaw
Thanks Meter: 28,765
 
7,579 posts
Join Date:Joined: Mar 2013
Donate to Me
More
Quote:
Originally Posted by golti

HI, My 64gb is two partitioned one hardswap and other primary.
Will I lose data on both partitions if I delete partition and format to EXT4?

Just don't use (o), as it will destroy everything. Use an option to delete selected partitions (d, if I remember correctly) and create them through n.
22nd October 2013, 10:32 AM   |  #7  
Junior Member
Thanks Meter: 0
 
2 posts
Join Date:Joined: Feb 2012
Post System Data
Hi, thanks for te help, but now a have a 1 gb lost by system data or 0.8gb if i disable the journaling, that is right??? Thanks
23rd October 2013, 06:28 PM   |  #8  
JustArchi's Avatar
OP Recognized Contributor / Recognized Developer
Flag Warsaw
Thanks Meter: 28,765
 
7,579 posts
Join Date:Joined: Mar 2013
Donate to Me
More
Quote:
Originally Posted by vazio

Hi, thanks for te help, but now a have a 1 gb lost by system data or 0.8gb if i disable the journaling, that is right??? Thanks

It depends on your rom and also if you created ext4 properly. I've formatted my 2 GB SD Card to EXT4 and I got 1,80 GB free (yes with journaling). This is because 5%-10% is reserved for "super blocks". Read more -> http://en.wikipedia.org/wiki/Ext4
13th January 2014, 06:26 PM   |  #9  
Junior Member
Flag peterborough
Thanks Meter: 1
 
7 posts
Join Date:Joined: Jan 2013
More
problem using expert method
Hi Guys,

I am new fairly new to rooting and using terminal emulators.

I have a rooted samsung galaxy note 2 with superSU, busybox and shell terminal emulator. I verified fdisk and mke2fs
(fdisk --help and mke2fs --help) but then when I tried the command
"umount /storage/extSdCard"
I get the error message "Operation not permitted"

Can anyone tell me why this might be?



Thanks

/storage/extSdCard is the path to the external sdcard on my device.
Attached Thumbnails
Click image for larger version

Name:	Screenshot_2014-01-13-12-17-41.png
Views:	505
Size:	116.7 KB
ID:	2513137  
13th January 2014, 06:37 PM   |  #10  
JustArchi's Avatar
OP Recognized Contributor / Recognized Developer
Flag Warsaw
Thanks Meter: 28,765
 
7,579 posts
Join Date:Joined: Mar 2013
Donate to Me
More
Quote:
Originally Posted by Hottot2

Hi Guys,

I am new fairly new to rooting and using terminal emulators.

I have a rooted samsung galaxy note 2 with superSU, busybox and shell terminal emulator. I verified fdisk and mke2fs
(fdisk --help and mke2fs --help) but then when I tried the command
"umount /storage/extSdCard"
I get the error message "Operation not permitted"

Can anyone tell me why this might be?



Thanks

/storage/extSdCard is the path to the external sdcard on my device.

Did you login as root before? (su)

The Following User Says Thank You to JustArchi For This Useful Post: [ View ]
Post Reply Subscribe to Thread

Tags
ext4, external, partitioning, sd card, swap
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes