Can I format my Ext3 partition without removing my card? - G1 Q&A, Help & Troubleshooting

Hi, just wondering if it is possible for me to format my ext partition on my SD without actually connecting it to my PC, I have looked around and have no clue of what command I can enter into the recovery terminal to do this, any help is appreciated lads, cheers.

Next Time ask question to Q&A section.
turn phone off and boot into recovery via home+red key
go to console and type in
# mount -o rw /dev/block/mmcblk0p2 /system/sd
# cd /system/sd
# rm -rf /system/sd/*
# reboot recovery

someones gonna be suspended lol.......enter parted from 1.4 cyanongen recovery
parted dev/block/mmcblk0 (hit eneter)
print (hit enter)
rm 2 (hit enter)
hopefully rm2 is ur ext3
then type
mkpartfs primary ext2 xxxx xxxx
xxxx= your last numbers from rm 1 example 3453 3901
the size of your ext3 befor you rm 2.
after initializeing this type
quit(enter)
now type
upgrade_fs (hit enter)

Only if you know magic!
Post in the Q&A, its there for a reason (the Q stands for Questions, like the one you have, and A stands for answers, like the ones you'll get for posting in the right section)

Daley87 said:
Hi, just wondering if it is possible for me to format my ext partition on my SD without actually connecting it to my PC, I have looked around and have no clue of what command I can enter into the recovery terminal to do this, any help is appreciated lads, cheers.
Click to expand...
Click to collapse
Someone may have a better way, but this is pretty much straight forward info (From Recovery Console):
STEP 1: Hit "Enter"
STEP 2: type '# parted /dev/block/mmcblk0'
In parted:
STEP 3: type 'rm 2'
STEP 4: type 'mkpartfs primary ext2 xxxxx xxxxx' (your partion size range "xxxxx xxxxx")
In terminal:
STEP 5: type 'upgrade_fs'
STEP 6: type 'reboot recovery'
That'll create a completely new ext3 partition.

bigslanki/jugg2000, you don't need to delete the old partition to go that method, just
Code:
parted dev/block/mmcblk0
mkfs 2 ext2
y
Actually I know that doesn't work because of a bug in parted, you have to do:
Code:
parted dev/block/mmcblk0
mkfs
y
2
ext2
but it's the same.

Sorry about asking here lads, completely forgot we have a Q&A section because my bookmark takes me straight here to the dev section, cheers for the replies though, much appreciated.

Daley87 said:
Sorry about asking here lads, completely forgot we have a Q&A section because my bookmark takes me straight here to the dev section, cheers for the replies though, much appreciated.
Click to expand...
Click to collapse
Here's now I normally wipe my EXT3
Code:
mount /system/sd
rm -rf /system/sd/*
Quick and easy.

this is quick, easy, painless, and will make sure nothing is left on the partition.
in recovery console
Code:
mke2fs -j /dev/block/mmcblk0p2

I hate to ask, but rather than create a new thread.... why would one format their Ext3 partition?
If you do format it, I suppose you could create Ext 4 at that point.... Any advantages of Ext3 vs. Ext4. I looked at Wiki but it confused the bejesus out of me.

s15274n said:
I hate to ask, but rather than create a new thread.... why would one format their Ext3 partition?
If you do format it, I suppose you could create Ext 4 at that point.... Any advantages of Ext3 vs. Ext4. I looked at Wiki but it confused the bejesus out of me.
Click to expand...
Click to collapse
to remove all of the files off of it, like if you are going from a hero rom to an AOSP rom, also from what i have heard there are no huge differences in ext4 that would be of significant benefit for your phone or sdcard. i have had an ext3 and ext4 partition (went back to ext3 after formatting because i didn't feel like entering in the extra commands, and i have not noticed any difference in ext3 or ext4), but if you do want to try ext4 and already have ext3 do this in the recovery console
Code:
tune2fs -O extents,uninit_bg,dir_index /dev/block/mmcblk0p2
e2fsck -fpDC0 /dev/block/mmcblk0p2
then you will have ext4, voila.

Related

Partition Formatting Through Terminal???

can anyone provide me with the terminal commands to formatting ext2 partitions
mke2fs /dev/block/mmcblk0p2
that's assuming you want to format the 2nd partition of your sd card to ext2
this requires e2fsprogs -- check here if your build doesn't have them
if you want to partition your sd card use SDSplit
if you want to reformat your already existent ext2 partition run this in terminal
su
rm -r /system/sd/*
reboot
nephron said:
rm -r /system/sd/*
Click to expand...
Click to collapse
this does not format the partition -- it removes (deletes / unlinks) all files in that directory or file system mounted there.
fairly substantial difference, but your suggestion may, indeed accomplish what the OP set out to do if that's all they wanted

is there a way to format ext3 partition (app2sd) from g1 phone or from recovery mode

help please .. paragon partitiion is not working
wc326 said:
help please .. paragon partitiion is not working
Click to expand...
Click to collapse
-repeatedly bangs head against wall-
follow this guide but in the beginning where it says use adb and type adb shell
just be in recovery console and hit enter then from there out all the commands should be the same.
if you need more help pm me and i will walk you through the steps
cant; do itr without adb ??
wc326 said:
help please .. paragon partitiion is not working
Click to expand...
Click to collapse
turn phone off and boot into recovery via home+red key
go to console and type in
# mount -o rw /dev/block/mmcblk0p2 /system/sd
# cd /system/sd
# rm -rf /system/sd/*
# reboot recovery
this has been covered many times in many other threads
NOTE:dont type in the # signs. but do however type in the * sign.
go to recovery console hit enter
parted /dev/block/mmcblk0
print
the fourth line in the 'print' command output shows you the total size of sdcard in MB(or GB if you card is large)..mine says: Disk /dev/block/mmcblk0: 7969MB
use this number(XXXXMB) and do some simple math to get the size of your partitions.
7969MB - 32MB linux-swap = 7937MB
7937MB - 500MB ext2 = 7437MB fat32
32MB seems to be alright size for swap, though it can be lower depending on your sdcard size.
500 MB is a good round number for the ext2 partition...no need for more.
that leaves us with 7437MB for fat32 storage.
Click to expand...
Click to collapse
if you do not want linux-swap then do not figure it in
after figuring out the size of your partitions from using the above method type rm 1 (if you only have one partition skip next part) then rm2
then to make the partitions type (numbers are from above example substitute your own in)
mkpartfs primary fat32 0 7437
mkpartfs primary ext2 7437 7937
mkpartfs primary linux-swap 7937 7969 (only if you want linux-swap)
then type print again to see if it worked. if it did you will have 1 and 2 (and 3 if you want linux-swap) come up under all the other info.
then type quit
then to upgrade to ext3 type upgrade_fs
then if apps2sd is automatic in your rom of choice reflash it and you are set. i am too nice tonight.
brian_v3ntura said:
turn phone off and boot into recovery via home+red key
go to console and type in
# mount -o rw /dev/block/mmcblk0p2 /system/sd
# cd /system/sd
# rm -rf /system/sd/*
# reboot recovery
this has been covered many times in many other threads
NOTE:dont type in the # signs. but do however type in the * sign.
Click to expand...
Click to collapse
too bad its not that simple. i think he means partitioning since he references not having adb to do the partitioning in the guide i linked him to. (sorry for assuming your gender OP)
i just want to format my ext3 app2sd partition....
it already has fat32 , ext 3 , and linus swap
really only want to format ext3 partition so i can install my new rom
just wondering can you format ext3 partition without havn'ing to erase fat32 and linus swap
david1171 said:
too bad its not that simple. i think he means partitioning since he references not having adb to do the partitioning in the guide i linked him to. (sorry for assuming your gender OP)
Click to expand...
Click to collapse
actually its clear as day that he means he JUST wants to format his ext.
wc326 said:
is there a way to format ext3 partition (app2sd) from g1 phone or from recovery mode
help please .. paragon partitiion is not working
Click to expand...
Click to collapse
paragon partition is aprogram that will enable you to partition your card on your computer and format.
wc326 said:
i just want to format my ext3 app2sd partition....
it already has fat32 , ext 3 , and linus swap
really only want to format ext3 partition so i can install my new rom
just wondering can you format ext3 partition without havn'ing to erase fat32 and linus swap
Click to expand...
Click to collapse
THIS IS WHAT YOU NEED TO DO to format ext. the other guy must've confused u
turn phone off and boot into recovery via home+red key
go to console and type in
# mount -o rw /dev/block/mmcblk0p2 /system/sd
# cd /system/sd
# rm -rf /system/sd/*
# reboot recovery
NOTE:dont type in the # signs. just push enter when done typing each line. and be sure to type everything exact and carefully.but do however type in the * sign.
errr wrong post

Clear a partition

I'm looking to delete all the data and subfolders in my partitions ext3 and linux-swap, start fresh.. i dont feel like going through that long procedure of removing the actual partitions and then re-adding and allocating the blocks.
I don't use adb, i just use the console from cyanogen's recovery page. i just starting learning all of this fun linux stuff when i got my dream a few months back =P
So what's the commands to mount, then clear the info on the partitions including all sub folders?
TIA!
Boot into recovery home+power
Go to console ALT+X
type:
(press enter)
#
# mount -o rw /dev/block/mmcblk0p2 /system/sd
# rm -rf /system/sd/*
# reboot recovery
Much thanks! worked great.

how do you wipe an ext3 partition from console?

I need to wipe my ext part from the console how can I do this?
in the console:
mount /system
rm -r /system/sd/
are you spacing these commands? It is not working
From recovery console
Code:
mke2fs -j /dev/block/mmcblk0p2
Will completely reformat ext3 partition destroying data and rebuilding table.
pistol4413 said:
in the console:
mount /system
rm -r /system/sd/
Click to expand...
Click to collapse
um, don't you have to mount the partition as rw first?
Code:
mount -o rw /dev/block/mmcblk0p2 /system/sd
This is how I installed without any problems:
: rename to update.zip
: place in the root of sd card
: shut off device
: boot into recovery
: wipe (alt w)
: go to console (alt x) and hit enter
(enter)
# mount -o rw /dev/block/mmcblk0p2 /system/sd
# cd /system/sd
# rm -rf /system/sd/*
# reboot recovery
: now wipe again (alt w)
: run a filesystem check from the menu. If it tells you to run it manually,
drop to a console (alt+x) and run "e2fsck /dev/block/mmcblk0p2".
: flash
Enjoy!!
AdrianK said:
um, don't you have to mount the partition as rw first?
Code:
mount -o rw /dev/block/mmcblk0p2 /system/sd
Click to expand...
Click to collapse
Lol yea i forgot to add it in srry
I, personally, used to use the recovery console or adb. But just download ubuntu and run it from live cd (basically boots linux from cd without installing anything on hard drive). Partition tool inside the OS beats any other method.
dumfuq said:
From recovery console
Code:
mke2fs -j /dev/block/mmcblk0p2
Will completely reformat ext3 partition destroying data and rebuilding table.
Click to expand...
Click to collapse
use that one. Best one available. doing a rm -rf on /system/sd sometimes still leaves some files. reformating ext3 and rebuilding the tables are the best way
yourtravelboy said:
This is how I installed without any problems:
: rename to update.zip
: place in the root of sd card
: shut off device
: boot into recovery
: wipe (alt w)
: go to console (alt x) and hit enter
(enter)
# mount -o rw /dev/block/mmcblk0p2 /system/sd
# cd /system/sd
# rm -rf /system/sd/*
# reboot recovery
: now wipe again (alt w)
: run a filesystem check from the menu. If it tells you to run it manually,
drop to a console (alt+x) and run "e2fsck /dev/block/mmcblk0p2".
: flash
Enjoy!!
Click to expand...
Click to collapse
Would you mind to tell me that if this instruction also apply to reformat ext3. I ask this question because I see the "mmcblk0p2" instead of "mmcblk0p3" in your instuction. I saw some posts which indicate that mmcblk0p2 is for ext2 but the mmcblk0p3 is for ext3. Am I correct?
p_pen said:
Would you mind to tell me that if this instruction also apply to reformat ext3. I ask this question because I see the "mmcblk0p2" instead of "mmcblk0p3" in your instuction. I saw some posts which indicate that mmcblk0p2 is for ext2 but the mmcblk0p3 is for ext3. Am I correct?
Click to expand...
Click to collapse
no, mmcblk0 references your sdcard mmcblk0px means partition substitute in 1 for fat32, 2 for ext2/3/4, and 3 for linux-swap.
p_pen said:
Would you mind to tell me that if this instruction also apply to reformat ext3. I ask this question because I see the "mmcblk0p2" instead of "mmcblk0p3" in your instuction. I saw some posts which indicate that mmcblk0p2 is for ext2 but the mmcblk0p3 is for ext3. Am I correct?
Click to expand...
Click to collapse
This is Not correct.
Everything in /dev/block is a different block device
mmcblk0p3 represents the third partition on you sdcard.
Usually this would be a linux swap partition.
To format ext3 look at my post above...for ext2 just remove the -j flag in the command.
dumfuq said:
This is Not correct.
Everything in /dev/block is a different block device
mmcblk0p3 represents the third partition on you sdcard.
Usually this would be a linux swap partition.
To format ext3 look at my post above...for ext2 just remove the -j flag in the command.
Click to expand...
Click to collapse
thanks for the simple ass formatting command. i actually bookmarked this page so that whenever this question is asked again (we all know it will be) i can easily pop this answer out.
I appreciate for your quick ans. It really solve my concern.
david1171 said:
thanks for the simple ass formatting command. i actually bookmarked this page so that whenever this question is asked again (we all know it will be) i can easily pop this answer out.
Click to expand...
Click to collapse
You should probably just memorize it.
mke2fs -j
Make_extended2_filesystem with journal
I thought this thread died just gave up just revisited this and it works thank you all for your help the command is "mke2fs /dev/block/mmcblk0p3" thank you I am sick of using acronis disk director it works but this takes an extra 10 min.
confused
can someone explain this more.
What is recovery console? How do i get there? Cause if its in my phone I cant get to it cause my boot screen is looping
Can you explain step by step in more detail
spazoid said:
can someone explain this more.
What is recovery console? How do i get there? Cause if its in my phone I cant get to it cause my boot screen is looping
Can you explain step by step in more detail
Click to expand...
Click to collapse
Boot pressing Home + Power
Scroll down to Enter Console
click the trackball
it will say <Press Enter>, so press enter
then type the following
Code:
mke2fs -j /dev/block/mmcblk0p2
and press enter
your ext is partitioned
to reboot your phone, type
Code:
reboot
and press enter
spazoid said:
can someone explain this more.
What is recovery console? How do i get there? Cause if its in my phone I cant get to it cause my boot screen is looping
Can you explain step by step in more detail
Click to expand...
Click to collapse
how exactly have you used your phone without knowing what the recovery console is.......
power down your phone
hold home and power to boot it up
press alt and x on the keyboard
press enter
type mke2fs -j /dev/block/mmcblk0p2
now type reboot recovery
wipe your phone
flash your rom.
reboot your phone with home and back.
Somebody please kill me!
Its clear the op didnt ****ing search when he asked this, otherwise he would have found my post explaining how to wipe your ext partition from your console. God dammit this is pissing me off

Question about first time Swap setup....

i am interested in creating a SWAP partition on my sd card to increase rom speed, even tho CMs roms are preety fast already. I hav e 8gb CD with about 500mb ext2. now if i use this method to create Swap partition:
Reboot and enter recovery
Enter console
#parted /dev/block/mmcblk0
#print (to verfiy we know what size card we are dealing with, the details should be straight forward)
rm 1
rm 2
mkpartfs primary fat32 0 7200
mkpartfs primary ext2 7200 7700
mkpartfs primary linux-swap 7700 7732
#print (to verify we have the 3 partitions)
i know how to backup music and everything on fat32 to my PC(to later restore) because doing the above will reformat entire card.
my question is do i need to back up my ext2 with all my apps and data on it, and if so how? or will it do everything itself when i reboot my CM rom? i am trying to create this swap partition without really changing everything and without wiping
There are quite a few threads on this, but granted they aren't that easy to find (I'm looking at you, people who name their threads "PLZ HELPPPPP!!")
boot in to recovery and go to the console:
cd sdcard
mkdir app
mkdir app-private
cp /system/sd/app/* /sdcard/app/
cp /system/sd/app-private/* /sdcard/app-private/
All your apk's are now on your Fat partition, copy those two folders to your computer
after you have remade the partitions go back to the recovery console (don't do this in terminal, but you can use adb shell when the phone is in recovery mode). This time we have to mount your new ext partition as rw.
mount -o rw /dev/block/mmcblk0p2 /system/sd
cd /system/sd
mkdir app
mkdir app-private
cp /sdcard/app/* /system/sd/app/
cp /sdcard/app-private/* /system/sd/app-private/
You're done. expect your phone to take a few minutes to boot up as it re-creates the dalvik-cache.

Categories

Resources