Partition of sd card won't do ext2

bigbdroid

Well-known member
Apr 3, 2011
64
1
0
Whenever I try to partition my sd card, all I get is ext3 on my sd-ext partition. I'm using xionia_cwma_12518.6 recovery and IHO CM7. And I was wondering if anyone knows how I can make my phone partition the sd card with an ext2 partition? I do not have a computer or access to one, so please no computer tips. I have searched, but the only references I can find are for adb_shell and computer usage. The adb commands might work if I had all of the commands.
 
If you are trying to use link2sd then an ext 3 will work fine. I used recovery to partition mine to ext 3 and have been running link2sd for months without a hitch.
 
Not trying to use any X2sd app. I want to install an app that needs ext2 partition and only ext2 partition.
 
in terminal
Code:
su
umount -l /dev/block/mmcblk0p1
mke2fs /dev/block/mmcblk0p1
will format your whole card to ext2 (assuming you haven't unmounted and remounted the card since booting the phone, the mmcblkXp1 increases by one every time you do that)

it's more complex to split the card into multiple partitions without a pc than to format the card.

edit: I should probably mention, this will destroy all data on your sd card. back it up on your pc if you're attached to anything.
 
Last edited:
  • Like
Reactions: bigbdroid
What about converting the ext3 partition to ext2? Could I use that script somehow to format my ext3 (/sd-ext) to ext2?
 
if it's already partitioned, yes.
Code:
su
umount -l /dev/block/mmcblk0p2
mke2fs -t ext2 /dev/block/mmcblk0p2
if you get an error about the umount, it's not mounted already, and it shouldn't matter.
remember, the blk0 only works if you haven't umounted the sd card since your last phone reboot. otherwise the 0 increases to some other number.

edit: I should probably mention, this will destroy all data on your sd-ext partition. back it up on your pc if you're attached to anything.
 
Last edited:
  • Like
Reactions: bigbdroid
Oops!

One small problem. When I try to look @ the partion Yaffs Explorer tells me that it has 4096M total, but. 0M free. How do I format it to make it usable? How do I remount the partition? And, how do I make it rw?
 
hm, mke2fs is supposed to format it.
to mount it:
Code:
su
mount -t ext2 /dev/block/mmcblk0p2 /sd-ext
that should mount it r/w by default, at /sd-ext
if it mounts without an error, and you can
Code:
ls /sd-ext/
without any errors,
then you can type (CAREFULLY) in terminal:
Code:
su
rm -rf /sd-ext/*
rm -rf deletes without asking you if it's ok to do so, be careful it's the right directory!
that will clear the partition of anything living there.
 
What about auto-mounting? Because right now I mount it manually everytime I reboot
 
you can use an init.d script to do things at boot. Mounting the sd-ext would definitely work there. make the script named 99mountext or something, so it does that last (unless 99 is already taken in init.d/ and then use the next lowere available number.)
xda has good info on init scripts, somewhere, I forget just where.