How do I do this? I wanna wipe everything and make a new partition with a different amt of swap, etc. How do I go about doing this?
go to recovery and re particion your sd card. but remember to back up stuff to your pc that are important.
Sent from my Htcclay's SuperBad G1 using the XDA mobile application powered by Tapatalk
phazzdaddy said:
How do I do this? I wanna wipe everything and make a new partition with a different amt of swap, etc. How do I go about doing this?
Click to expand...
Click to collapse
Follow these steps. I do them every single time before flashing a ROM, never have any issues that others have because they are lazy and refuse to just start fresh. I'm going to make this as basic as possible just to make it easy. It looks long, but I can seriously do this in under 3 minutes now.
You can either remove everything off your SD card and transfer on later, or leave it. It depends on if you want to resize your fat32 partition.
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
If you don't have Amon_RA's recover get it Here
Boot into recovery (power on phone by pressing home button and power button)
Once in recovery, select (Go to console)
Press Enter
at the /# type this in
parted /dev/block/mmcblk0
Press Enter
When this pops up (parted), type in print
Press Enter
You should now see something like this:
Code:
Model: ([B][COLOR="Red"]whatever model your SD is[/COLOR][/B])
Disk /dev/block/mmcblk0: ([B][COLOR="Red"]the size of your SD card (write this # down for reference)[/COLOR][/B])
Sector Size (logical/physical): ([B][COLOR="Red"]Sector size[/COLOR][/B])
Partition Table: msdos
Number Start End Size Type File system Flags
1 512B 7405MB 7405MB primary fat32 lba
2 7405MB 7905MB 500MB primary ext2
3 7905MB 8001MB 96.0MB primary linux-swap(v1)
This gives you a break down of how much space is allocated for each partition.
The start/end/size values will differ depending on the size of your SD card and partitions.
Write down the size of your sd card, you can find it above next to:
Disk /dev/block/mmcblk0: ####MB
From here you can now delete and resize your partitions.
Number:
1 - fat32 partition (where you store music, photos, etc.)
2 - ext partition (where apps2sd goes)
3 - swap partition (used for swap)
Before you start deleting, make sure if you do want to remove the fat32 partition, you mount your SD and copy everything to your PC or wherever so you can transfer back later.
To remove individual partitions, type in at the (parted)
rm 1 Enter (this will delete your fat32 partition)
rm 2 Enter (this will delete your ext partition)
rm 3 Enter (this will delete your linux-swap partition)
Depending on what you deleted, you can type print Enter, again and it will refresh the partitions.
Using the number you wrote down which is the size of your SD card, you can figure out how you want to allocate the partitions.
I will show you what I type in and you can go off of that.
I have a 8GB SD card. 8169MB total
7405MB - fat32
500MB - ext2
96MB - swap
I only use 8001MB just to be safe. (not sure if it matters)
You just don't want to go over your SD card size.
Now to create the partitions.
The sizes below are my settings.
You can decide the sizes for you own SD card.
--------------------------------------------------------------------------------
For fat32 type in at the (parted):
mkpartfs primary fat32 0 7405 press Enter
This will create a 7405MB fat32 partition
--------------------------------------------------------------------------------
For ext2 type in at the (parted):
mkpartfs primary ext2 7405 7905 press Enter
This will create a 500MB ext2 partition
--------------------------------------------------------------------------------
For swap partition type in at the (parted):
mkpartfs primary linux-swap 7905 8001 press Enter
This will create a 96MB swap partition (you can upgrade to ext3 and ext 4 through the recovery)
--------------------------------------------------------------------------------
Notice the numbers I entered in 0 7405 (since 0-7405 = 7405, that's the size of the partition. Yes elementary, but just so you know what the numbers represent)
7405 7905 (7905-7405 = 500, 500MB partition, and so on)
You can choose whatever you want for the sizes of the partition doing it this way. Just make sure fat32 partition starts with 0, you want fat32 partition first, ext 2nd, and swap 3rd.
Once you have created the partitions, reboot into recovery and flash your rom.
To reboot into recovery, type quit at the (parted)
Then reboot recovery at the / #
It may look hard, but it is really simple.
Good luck.
All the credit for this goes to 51dusty and his thread Here
I just made this so you can do the same steps from your phone.
Related
Ok guys ima try to explain this as best I can. I have a 16g sd card that gparted or acronis will not recognize, now windows 7 on my laptop does.recognize it as an sd card showing 15.3gig wich I can only imagine is because it has been formated a few times, curently it has been formatted to fat32 using my laptop..what can I do to get my phone or any formatting tool to see it and format to the fat32, ext3 and linux swap, I've been trying for days and have read all I can so now I turn to the greater brains that be...thanks for ur help..........veritasaequita
I love the search button! Lol use cyanogen's latest recovery image (1.3.1) Search for it!
Then once you have it flashed, go into recovery console (alt+x on the menu) and type parted /dev/block/mmcblk0
do not type stuff in ( )
print (it should tell you the sector size, in mb. Since yours is 16gb it should be ~15000mb?)
rm 1
rm 2 (you might get, partition not found on this doesn't matter)
rm 3 (you might get, partition not found on this doesn't matter)
mkpartfs primary fat32 0 xxxx
mkpartfs primary ext2 xxxx yyyy
mkpartfs linux-swap yyyy zzzz
quit
upgrade_fs
reboot recovery
alt+f, alt+w, alt+s
home+back
<some extra notes, for the linux-swap partiton it should be roughly 32 mb. So make sure there's only a 32mb difference between yyyy and zzzz>
<ext2/3 partition should be ~600 mb> and fat32 the rest. Any problems just message me
How to partition the SD card for CyanogenMod? make it into 2?
Here is a how to link http://forum.xda-developers.com/showthread.php?t=535232
yeah but the guide says to download a app for apps2sd and the thread for CyanogenMod says not too. Confused ;p
Read threw the whole thing, you will load apps2sd but then you will do a wipe and load cyangen again with apps2sd installed in the rom. The reason cyanogen says not to have apps2sd is because its already in the mod. So you will use it to partition then wipe it then reintall it with cyanogen
It helps to use the SEARCH
How to partition your SD card from console (This requires the cyanogen recovery 1.3.1)
Example for my 8GB card.
Reboot and enter recovery (home+power) then go to console. Enter the below pressing "enter" after each line.
parted /dev/block/mmcblk0
print (to verfiy we know what size card we are dealing with. Mine was 8166 read below if yours is different)
rm 1 (if you had more than 1 partition you would want to rm them as well)
mkpartfs primary fat32 0 7526
mkpartfs primary ext2 7526 8038
mkpartfs primary linux-swap 8038 8166
quit
upgrade_fs
recovery
if your card isn't 8166 when you type print then you will need to modify those numbers to match your card size. You basically work back to figure out the totals. To figure it out, start with your cards total size. For example 8166 total Subtract 128 for swap (8038) minus 512 for ext (7526) the rest will go to fat32. Each partition starts where the other left off.
http://forum.xda-developers.com/showthread.php?t=533731
I have a ext 2 and fat32 formatted card and I want to do linux-swap and I'm wondering if I can take my fat32 thats free and partition that as a linux-swap without formatting the fat32.
?
Most of the ROMs expect the partitions to be in the correct order so you would have to respect that anyway.
I'm guessing you want to reduce the size of the FAT partition without losing data to gain space to make a linux swap. In which case you can *in theory* do this in Ubuntu (from live CD). You would need to resize the FAT32 parition, move the ext2 partition to the left so the free space is at the end and create your swap partition there. I haven't tried it though and would want to backup anyway.
In my opinion you would get best results by start fresh on all the partitions. I would backup whats on your fat32 partition onto your computer and then use the directions for in this thread to create all three partitions.
Creating 3 fresh partitions with the directions in that threat eliminate and issues you may have with ROM's that might be cause from the partitions not being done right.
if you really want to do and do not care for your ext3 data (or just search how to back it up) you can go into recovery console for cm recovery image 1.3.1 or later do this
Code:
parted /dev/block/mmcblk0
rm 2
print
now take the space that is left say x amount of space
subtract y amount of space for linux-swap
then z will be amount of space left for ext2
x-y=z
now in parted type
Code:
mkpartfs primary ext2 [end of fat32 partition from print command above] [number of z from equation above]
then (so not to be too confusing)
Code:
mkpartfs primary linux-swap [z from above] [end of sdcard from print command by disk size dev/block/mmcblk0]
print (to verify it worked)
quit (ignore etc/fstab update)
upgrade_fs
reboot
or since this requires a fair amount of understanding of the process of using parted from the recovery image you may want to start from scratch
Hey, I want to run hero rom. I already have my sd partition in 2 sections but the hero rom needs a third linux swap partition. On the bootloader screen there's a option to do it from the g1 but it will erase everything on the sd card. I don't have a sd card reader on my computer, so I need to use the g1 to read my sd card. Does anyone know how I could put the hero rom on my sd card after I format it from my g1? Thanks.
All the information you need could be found here http://forum.xda-developers.com/showthread.php?t=534479 .
you dont have to format the SD, just use (parted) and make the 3rd 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)
mkpartfs primary linux-swap 7700 7732 ................................................................................... this depends on what size of SD you have. (this is for 8G SD)
#print (to verify we have the 3 partitions)
Nasrat said:
All the information you need could be found here http://forum.xda-developers.com/showthread.php?t=534479 .
you dont have to format the SD, just use (parted) and make the 3rd 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)
mkpartfs primary linux-swap 7700 7732 ................................................................................... this depends on what size of SD you have. (this is for 8G SD)
#print (to verify we have the 3 partitions)
Click to expand...
Click to collapse
Thanks ... but how do I set the linux swap to 64mb?
depends on which recovery you are using. if you are using RA 1.2.2 it has the option to mount/unmount via usb. so you save the rom to the pc, boot into recovery, repartition, mount via usb copy the rom over, unmount, flash as usual.
Krazi Bluntz said:
Thanks ... but how do I set the linux swap to 64mb?
Click to expand...
Click to collapse
if your card ends at 7732, then
Code:
mkpartfs primary linux-swap 7668 7732
please read the instructions and understand what your doing first..... i would highly recommend you backup your FAT32 and EXT partitions and reformat the whole card
i installed the latest cyanogen update. phone is running perfectly but cant get apps2sd run. it is there is my applications menu but i cant select it
i partitioned my memory card the way written in the qoute?
How to partition your SD card from console (This requires the cyanogen recovery 1.3.1)
Example for my 8GB card.
Reboot and enter recovery (home+power) then go to console. Enter the below pressing "enter" after each line.
parted /dev/block/mmcblk0
print (to verfiy we know what size card we are dealing with. Mine was 8166 read below if yours is different)
rm 1 (if you had more than 1 partition you would want to rm them as well)
mkpartfs primary fat32 0 7526
mkpartfs primary ext2 7526 8166
quit
upgrade_fs
recovery
if your card isn't 8166 when you type print then you will need to modify those numbers to match your card size. You basically work back to figure out the totals. To figure it out, start with your cards total size. For example 8166 total Subtract 128 for swap (8038) minus 512 for ext (7526) the rest will go to fat32. Each partition starts where the other left off.
Click to expand...
Click to collapse
what should be my next step? i tried most of the ways on xda and have failed pls help