How to format Internal SDCard to EXT4?

Search This thread

Phk

Senior Member
Hi there,

I've tried to follow other "tutorials" (for another Android phones) to format my internal SD Card to ext4, but with no success.

My method was:
- Connect phone to Linux PC
- Enable USB Storage on Phone (the drive appears in Linux)
- dmesg | tail (to see new device and partition name, for example, /dev/sdb1)
- mkfs.ext4 /dev/sdb1
- Unmount partition in Linux
- Stop USB Storage on Phone
- Unplug Cable

And the result is.......... The phone formats the Internal SD again to vfat!!!

Why does this happen? Any ideas?
How can i surpass this? I have Latest stock rom (rooted).

Getting lost here... :\

Cheers,
Phk
 

nerotix

Senior Member
Mar 19, 2011
2,663
701
Utrecht
1. Download Minitool Partition Wizard
2. Connect phone with USB mass storage
3. Open Minitool Partition en right click on the SD Card and choose format.
4. Choose file system EXT4 and 32KB cluster size
5. When you did all that, you click the "Apply" button in the top left corner.
6. Wait for it to finish and voila!

Hope this helps!
 

punshkin

Senior Member
Jan 6, 2010
1,021
257
sorry for this question, but why do you want to do that? is it so that you can use the whole 16gb for apps and store media on your external SD only?
 

MyrddinLXXIIX

Member
Jun 1, 2011
13
5
sorry for this question, but why do you want to do that? is it so that you can use the whole 16gb for apps and store media on your external SD only?

Obviously to use HD-Video on the phone.

Files often exceed 4 Gigabyte, and for that filesystems like ntfs, exfat or ext4 are needed.

Going to give it a try soon, thanks nerotix!
 

cheekystew

Senior Member
Jul 19, 2010
225
14
barrow in furness
1. Download Minitool Partition Wizard
2. Connect phone with USB mass storage
3. Open Minitool Partition en right click on the SD Card and choose format.
4. Choose file system EXT4 and 32KB cluster size
5. When you did all that, you click the "Apply" button in the top left corner.
6. Wait for it to finish and voila!

Is there a way of doing this through windows? Also would it be worth doing it to my 16gb external SD. Thanx in advance


Hope this helps!



Sent from my GT-I9100 using XDA Premium App
 

sgstwo

Senior Member
May 12, 2011
67
9
You will need to patch some files for that to work. It's not bothered me enough that I want to fix it. If you restart your phone, it will reformat your internal SD-card to vfat, even if it's already ext4-formatted.
 

dyallo

Senior Member
Oct 2, 2010
331
29
I'm also interested in this.
Really, it will change back to the original file system?
Which files would we have to patch to prevent this?
 

Phk

Senior Member
Guys please post only after testing. This is important to avoid deadlocks.....

Facts:
#1 - Current SGS2 Stock roms have rootfs and datafs formatted in EXT4 so they do support it
#2 - they force sd format to vfat so that is probably what needs patching.

Question is :
A - WHICH system app do we need to patch
B - Does the SD mount correctly as ext4 ?

Cheers and thanks
Phk


Sent from my GT-I9100 using XDA App.... at 220km/h on a jet train :p
 
  • Like
Reactions: slind

MyrddinLXXIIX

Member
Jun 1, 2011
13
5
Guys please post only after testing. This is important to avoid deadlocks.....

Facts:
#1 - Current SGS2 Stock roms have rootfs and datafs formatted in EXT4 so they do support it
#2 - they force sd format to vfat so that is probably what needs patching.

Question is :
A - WHICH system app do we need to patch

That is the million dollar question indeed.

B - Does the SD mount correctly as ext4 ?

No, it does not.
Tried both a microSD inside and another SD external via USB-OTG.
The OS 'catches' the 'faulty' ext4 cards and prevents mounting, which should work perfectly allright seeing Fact #1.

PS: The minitool mentioned above does not allow cluster sizes of 32 KB, only 1, 2 and 4 (checked this with an 8 GB mSDHC and 16 GB SDHC).
 
Last edited:

sgstwo

Senior Member
May 12, 2011
67
9
As far as I can remember:

/init.rc:
Code:
exec apply_system_policy /dev/block/mmcblk0p11 vfat

and /init which only seems to support FAT mounted SD-cards.
 

nerotix

Senior Member
Mar 19, 2011
2,663
701
Utrecht
That is the million dollar question indeed.



No, it does not.
Tried both a microSD inside and another SD external via USB-OTG.
The OS 'catches' the 'faulty' ext4 cards and prevents mounting, which should work perfectly allright seeing Fact #1.

PS: The minitool mentioned above does not allow cluster sizes of 32 KB, only 1, 2 and 4 (checked this with an 8 GB mSDHC and 16 GB SDHC).

yes it does allow 32KB and even 64KB, either u got an old version of the program or a crappy SD card:p
 

sgstwo

Senior Member
May 12, 2011
67
9
Oh great.. Guess what.. /init.rc gets renewed at boot

rootfs is readonly, i've mounted it RW, edited init.rc, commented the vfat line, formatted the SD, and then reboot.

When the device booted, SD was clean and mounted with VFAT again :(

Suggestions?

/init and /init.rc are part of zImage (the kernel). You must extract the initramfs, update the file, and write the changes back. You will probably get a yellow triangle (non-Samsung kernel message) if you manage to boot it.
 
  • Like
Reactions: Phk

Phk

Senior Member
Nope!

I PM'd Chainfire asking for help on rebuild initramfs, but he didn't care.
I saw on his CFRoot post that he built a toolchain for recompiling the initramfs, so his stuff would be pretty useful in this case....

.. come on chain, clear us out.. Or include this in your next kernel, whatever.. :\ SUCKS.
 

nightranger73

Senior Member
Oct 20, 2010
979
263
50
Reggio Emilia
OPPO Find X3 Neo
Nope!

I PM'd Chainfire asking for help on rebuild initramfs, but he didn't care.
I saw on his CFRoot post that he built a toolchain for recompiling the initramfs, so his stuff would be pretty useful in this case....

.. come on chain, clear us out.. Or include this in your next kernel, whatever.. :\ SUCKS.

http://bit.ly/jRSCxJ

Was that hard? You know how many projects he's carrying on? Why he'd have to waste his time for such a simple thing that a Google search can do?

Please if you think I've been too rude re-read the forum rules prior to answer this post... if you've ever done it...

Sent from my Galaxy SII

If you find this post usefull please press the "Thanks" button
 
Last edited:
  • Like
Reactions: m33mt33n and mf_417

Top Liked Posts

  • There are no posts matching your filters.
  • 9
    1. Download Minitool Partition Wizard
    2. Connect phone with USB mass storage
    3. Open Minitool Partition en right click on the SD Card and choose format.
    4. Choose file system EXT4 and 32KB cluster size
    5. When you did all that, you click the "Apply" button in the top left corner.
    6. Wait for it to finish and voila!

    Hope this helps!
    2
    Nope!

    I PM'd Chainfire asking for help on rebuild initramfs, but he didn't care.
    I saw on his CFRoot post that he built a toolchain for recompiling the initramfs, so his stuff would be pretty useful in this case....

    .. come on chain, clear us out.. Or include this in your next kernel, whatever.. :\ SUCKS.

    http://bit.ly/jRSCxJ

    Was that hard? You know how many projects he's carrying on? Why he'd have to waste his time for such a simple thing that a Google search can do?

    Please if you think I've been too rude re-read the forum rules prior to answer this post... if you've ever done it...

    Sent from my Galaxy SII

    If you find this post usefull please press the "Thanks" button
    2
    http://bit.ly/jRSCxJ

    Was that hard?

    Sent from my Galaxy SII

    If you find this post usefull please press the "Thanks" button

    Well you are a Genius, Sir.

    Please look at the Link you gave me. And tell me if you really contributed to these forums. Or was it only an opportunity for the LMGTFY joke?
    Here: http://xdaforums.com/showthread.php?t=786051
    For me, what you gave me was a joke, it doesn't even make sense.

    Anyway, the reason why i've PMd Chainfire is because he said, and i quote:
    How ?
    I wrote my own toolchain to ease patching of initramfs, and that is what all this is based on. Took me a few days to get it to this state. If this works right, however, next time it will probably take me a few hours tops

    So if Chainfire HIMSELF puts things this way, I'm sorry, but LMGTFY won't just be enough.

    Yes i found your post offensive.
    Yes I've read it originally before you edited it, when it was only a joke.
    Yes i understand this forum and i'm not contributing right now, so, please care to continue the Flames through PM.

    Let's stick to the main topic now.

    ------------------------------------------------------

    Ok, so rebuilding the initramfs is the main task now.
    I'm still gathering info about how to rebuild it, but i've had a lot of work recently (releasing a Market App as a part-time hobby).

    Anyway, I promise i'll contribute to this Thread, and as soon as i found some progress for this, I'll post it here in the form of a Tutorial.

    About the MKV format, that's not my issue, although it represents a perfect example.

    My issue is running linux ARM builds in SGS2, which have a ".img" file that is a lot of GB long.

    cheers
    1
    Guys please post only after testing. This is important to avoid deadlocks.....

    Facts:
    #1 - Current SGS2 Stock roms have rootfs and datafs formatted in EXT4 so they do support it
    #2 - they force sd format to vfat so that is probably what needs patching.

    Question is :
    A - WHICH system app do we need to patch
    B - Does the SD mount correctly as ext4 ?

    Cheers and thanks
    Phk


    Sent from my GT-I9100 using XDA App.... at 220km/h on a jet train :p
    1
    Oh great.. Guess what.. /init.rc gets renewed at boot

    rootfs is readonly, i've mounted it RW, edited init.rc, commented the vfat line, formatted the SD, and then reboot.

    When the device booted, SD was clean and mounted with VFAT again :(

    Suggestions?

    /init and /init.rc are part of zImage (the kernel). You must extract the initramfs, update the file, and write the changes back. You will probably get a yellow triangle (non-Samsung kernel message) if you manage to boot it.