Question about first time Swap setup.... - G1 Q&A, Help & Troubleshooting

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.

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

backup ext3 partition

Hey guys,
is there a way to backup the ext3 partition? when flashing Drizzys ROM you must have a clean ext3 to do initial boot. without clean ext3 you get a bootloop. Ive flashed his ROMS several times and i want to flash a new cyans 4.0.1 but im afraid that ill lose my apps.
any ideas on how to keep your info AANNNDDDD flash drizzys ROM??
If you have adb up and running you can adb pull /system/sd/app (some directory on your computer) to make a back up the adb push (same dir from above) /system/sd/app if you don't have adb then i do not know
If you ant to go from Drizzy to Cyan you should be fine. Just wipe and flash Cyan.
For fututre refrence, to back up your ext, go in to the recovery console
Code:
mkdir /sdcard/app/
mkdir /sdcard/app-private/
cp /system/sd/app/* /sdcard/app
cp /system/sd/app-private/* /sdcard/app-private
All that does is make the "app" and "app-private" folders on the fat32 partition of your sdcard and copies the apps to them from the ext3 partition (the mount point of ext3 is /system/sd).
To push them back after flashing a new ROM (again from recovery, don't do this from the terminal when your phone is on):
Code:
mount -o rw /dev/block/mmcblk0p2 /system/sd
cp /sdcard/app/* /system/sd/app/
cp /sdcard/app-private/* /system/sd/app-private
This time was also have to mount the ext3 as re-writeable so we can copy to it.
Hope that helps.
or just do cp /system/sd/* /sdcard
gets you all the folders in /system/sd
This makes it really easy http://forum.xda-developers.com/showthread.php?t=549876

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

How to change SD card after moving apps?

So I've got a dilemma:
I've rooted my phone the cyanogen method and have partitioned out my 1 gig SD card which now has all of my apps moved to it. I've read that the phone gets wonky if you remove the SD card.
So, having purchased an 8 gig card and want to use it, but how do I migrate all of my data and settings from the 1 gig to the 8, including properly partitioning it?
You can either do it in Ubuntu or you can run some commands
cd sdcard
mkdir app
mkdir app-private
cp /system/sd/app/* /sdcard/app/
cp /system/sd/app-private/* /sdcard/app-private/
Your apps are now on your Fat32 partition, so copy everyrthing in your Fat32 to a folder on your computer. Use parted or whatever you want to add the partitions you want and copy everything back to your fat32
Go back to the recovery console
mount -o rw /dev/block/mmcblk0p2 /system/sd
cp /sdcard/app/* /system/sd/app
cp /sdcard/app-private/* /system/sd/app-private/
And you're done
Thanks AdrianK I just copied and pasted one of your last posts.

Can I format my Ext3 partition without removing my card?

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.

Categories

Resources