How to partition linux swap?! - G1 Q&A, Help & Troubleshooting

Ok I allready have my fat32 and ext2 here are the specs
Start end Size TYPE File
1.8192B 3447MB 3447MB primary Fat 32
2.3447MB 3966MB 519MB primary ext2
I want the linux swap to be 32mb so how do I do it?

Do you know simple math? Total size minus 32mb for linux-swap= xxxxmb
Xxxxmb minus xxx(however big you want ext2)=xxxxmb
Start and end fat32: 0 to xxxxmb(from the second part with ext2)
Start and end for ext2: xxxxmb(from above) to xxxxmb(from the first part with linux swap)
Start and end for linux-swap: xxxxmb(from last part of previous step) to end of sdcard size
You should be able to fill in the missing information. Search next time

Use ubunutu, look in sig for tut.

do it using a live cd like ubuntu
http://forum.xda-developers.com/showthread.php?t=535914
or from recovery(which is easier for me)
http://forum.xda-developers.com/showthread.php?t=533731&highlight=parted

stefan.buddle said:
do it using a live cd like ubuntu
http://forum.xda-developers.com/showthread.php?t=535914
or from recovery(which is easier for me)
http://forum.xda-developers.com/showthread.php?t=533731&highlight=parted
Click to expand...
Click to collapse
Ahhh. Thank you, someone referenced my guide.

Related

SD card prepare tool[req]

hello all
just got an android and im still testing it. so please excuse my noobishness
question: is it possible to make a simple tool that runs on windows that would prepare and partition the sdcard with the three portions (fat32,ext2 and swap) and proper file system. is there something technically preventing such app of ever getting written. i know that some image burning software on widows can be used burn a cd/dvd that is not supported by the windows file system
if not, is it possible to write an android application to do all that. if so, anybody willing to write it
that would greatly simplify the process of installing the swap file enabled cooked roms. the current process is a bit messy
that is a great idea. I can do ext/2 or 3 with acronis disk director but I don't know how to do both and am nervous setting that up throught the phone although there is a really good guide on how to do that the phone.
Taken from http://forum.xda-developers.com/showthread.php?t=533731
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.
Click to expand...
Click to collapse
I personally have never tried this or don't know if this will help you but it was worth a shot.
xsnipuhx said:
Taken from http://forum.xda-developers.com/showthread.php?t=533731
I personally have never tried this or don't know if this will help you but it was worth a shot.
Click to expand...
Click to collapse
This is a perfect procedure.
THE GRIZZ said:
hello all
just got an android and im still testing it. so please excuse my noobishness
question: is it possible to make a simple tool that runs on windows that would prepare and partition the sdcard with the three portions (fat32,ext2 and swap) and proper file system. is there something technically preventing such app of ever getting written. i know that some image burning software on widows can be used burn a cd/dvd that is not supported by the windows file system
if not, is it possible to write an android application to do all that. if so, anybody willing to write it
that would greatly simplify the process of installing the swap file enabled cooked roms. the current process is a bit messy
Click to expand...
Click to collapse
http://forum.xda-developers.com/showthread.php?t=534043
Keep an eye on that tool. If you look at this to-do list, it looks like automatically partitioning your sdcard is next up. But the procedure above is simple, and it works now if you don't wanna wait.
xsnipuhx said:
Taken from http://forum.xda-developers.com/showthread.php?t=533731
I personally have never tried this or don't know if this will help you but it was worth a shot.
Click to expand...
Click to collapse
It's a good way but you should subtract 32 for linux-swap. 128 for linux-swap is WAY to big.
h.nocturna said:
http://forum.xda-developers.com/showthread.php?t=534043
Keep an eye on that tool. If you look at this to-do list, it looks like automatically partitioning your sdcard is next up. But the procedure above is simple, and it works now if you don't wanna wait.
Click to expand...
Click to collapse
thanks thats exactly what i was talking about. i already partioned it using one of the guides. a simpler method cant hurt though
It is a great idea, the problem is that none of the tools for partitioning on windows are free. Maybe it would be possible to make a GUI that feeds commands to parted on the phone using adb? I don't know, I don't see what's wrong with booting in to gparted, seems like less troube and it's has a GUI.
Eh, 3-4 commands in Terminal isn't gonna kill anyone, but it might intimidate the noobs here and prevent them from fully enjoying their phone cuz they stop as soon as they see a wall of text.
h.nocturna said:
Eh, 3-4 commands in Terminal isn't gonna kill anyone, but it might intimidate the noobs here and prevent them from fully enjoying their phone cuz they stop as soon as they see a wall of text.
Click to expand...
Click to collapse
You're completely right, if people never use it they will always be scared of the terminal =P
Bah, if everyone used linux they could just use gparted, another easy way.
I used the cmd line I quoted early to ready a 8gb sd card for apps2sd and I just left out the linux swap part and it worked MINT. But if your scared of the terminal, try using the apps2sd app on the market and that will get your sd card ready.

a2sd with OEM SD card

have the g1 rooted with jf1.5 rom , OTA, hrdSPL and trying to use apps2sd. The apps2sd application always tells me that I don't have my card formatted correctly and to follow the guide, which I followed explicitly (I think). Here is the output of print within parted for my sdcard using adb shell. Does any one know what is wrong?
Code:
Model: SD SU01G (sd/mmc)
Disk /dev/block/mmcblk0: 1016MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 32.3kB 699MB 699MB primary fat32 lba
2 699MB 984MB 285MB primary ext3
3 984MB 1016MB 31.8MB primary linux-swap(v1)
open up on of cyanogen's roms, take out his a2sd script, either adb push it or drip into to the .zip on your computer and resign, or look for terminal commands.
that should work work, try and grab an older version that doesn't have compache built into the script or just comment out the lines for compache
Moving to Cyanogen
The point of this was to ensure card was formatted correctly before moving to Cyanogen since I have virtually no space left and want the increased performance from his release. Are you saying that if I just switch ROMs my sdcard looks good-to-go for a2sd?
sammarcow said:
The point of this was to ensure card was formatted correctly before moving to Cyanogen since I have virtually no space left and want the increased performance from his release. Are you saying that if I just switch ROMs my sdcard looks good-to-go for a2sd?
Click to expand...
Click to collapse
sorry i guess i didn't think enough (just woke up), yeah you will be fine going to cyanogen's roms with that setup. i thought you wanted a2sd on the jf rom.

Question about using swap for the first time(CM 4.1.11.1)

i am currently on Cm 4.1.11.1 with ext2 and fat 32, i know how to creat linux swap using Paragon, just want to know can i simply just create Linux swap partition and keep fat 32 and ext2 the way it is, and after creating swap, how do i use it with CM 4.1.11.1
***Please no one answer with "search" or "look around forum" because i have read threw about 100000000paages already
caleoss said:
i am currently on Cm 4.1.11.1 with ext2 and fat 32, i know how to creat linux swap using Paragon, just want to know can i simply just create Linux swap partition and keep fat 32 and ext2 the way it is, and after creating swap, how do i use it with CM 4.1.11.1
***Please no one answer with "search" or "look around forum" because i have read threw about 100000000paages already
Click to expand...
Click to collapse
You need to create a user.conf and userinit.sh on your ext partition which tell the phone which settings to use. The link's in my sig.
I'd highly recommend, switching from ext2, ext3 and 4 are journalled so you should get much better performance. If I remember correctly you can type "upgrade_fs" in Cyanogen's recovery to convert ext2 to ext3.
http://forum.xda-developers.com/showthread.php?t=534479
you may have to repartition your card (instructions in link above)
AdrianK said:
You need to create a user.conf and userinit.sh on your ext partition which tell the phone which settings to use. The link's in my sig.
I'd highly recommend, switching from ext2, ext3 and 4 are journalled so you should get much better performance. If I remember correctly you can type "upgrade_fs" in Cyanogen's recovery to convert ext2 to ext3.
Click to expand...
Click to collapse
what setting do u recomend? do u have a configuration already set up that i could just put on sd card or whatever, dont really know much about configuring it

tutorial link please

FINALLY got cyanogen rom working. i've almost pulled my hair out over buying this phone(att user so i had to unlock and learn root, etc.)
anyways, got .999 installed and saw the * Apps2SD is automatic! All you need is a second partition (ext).
can someone point me in the right direction on how to do the partition part? i have full version of paragon and know how to use it but just don't want to fubar anything up.
i apologize for the noob question but i just need to know what to set my 2gb(although i have a 4gb class 6 in the mail now) sd card to what size partitions so i can run the add2sd.
thanks guys and love the site.
There is a sticky post in this section. I found it in less than 2 seconds. without searching.
blackinches said:
FINALLY got cyanogen rom working. i've almost pulled my hair out over buying this phone(att user so i had to unlock and learn root, etc.)
anyways, got .999 installed and saw the * Apps2SD is automatic! All you need is a second partition (ext).
can someone point me in the right direction on how to do the partition part? i have full version of paragon and know how to use it but just don't want to fubar anything up.
i apologize for the noob question but i just need to know what to set my 2gb(although i have a 4gb class 6 in the mail now) sd card to what size partitions so i can run the add2sd.
thanks guys and love the site.
Click to expand...
Click to collapse
Example for 8GB card.
Reboot and enter recovery (home+power) then go to console. Enter the below pressing "enter" after each line.
Code:
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 7622
mkpartfs primary ext2 7622 8134
mkpartfs primary linux-swap 8134 8166
quit
upgrade_fs
recovery
NOTE: this will reformat your entire card, so i suggest you back up your files.
and btw tell me the size of your sd card and i will type up the code for you...
use this method to tell me your exact size
go into recovery via home+power
go to console
pres enter
type:
parted /dev/block/mmcblk0
print
i am pretty sure you can see what number represent your total card size.
Easier Way!!!
OK,so I also have Paragon Partition Manager 9.0 Special Edition.
1.Go into your Paragon Partition Manager Software
2.Click on Partition Manager at the first screen
3.Click on your SD Card drive (ie. F:/)
4.Click on create partition in the left hand side of your screen.
5.It will ask you how big you would like your partition to be,then what type of partition. Paragon only supports EXT2 and EXT3 if your looking for an EXT partition. Paragon also only supports Linux-Swap2 and not Linux-Swap3.
If you need any more help man let me know.
Follow me on Twitter: http://twitter.com/andy_lowe02
andy_lowe02 said:
OK,so I also have Paragon Partition Manager 9.0 Special Edition.
1.Go into your Paragon Partition Manager Software
2.Click on Partition Manager at the first screen
3.Click on your SD Card drive (ie. F:/)
4.Click on create partition in the left hand side of your screen.
5.It will ask you how big you would like your partition to be,then what type of partition. Paragon only supports EXT2 and EXT3 if your looking for an EXT partition. Paragon also only supports Linux-Swap2 and not Linux-Swap3.
If you need any more help man let me know.
Follow me on Twitter: http://twitter.com/andy_lowe02
Click to expand...
Click to collapse
well i wouldnt say ur way is easier... it does require using a computer, mine uses the phone.. and mine is simply typing what u see.
Also im pretty sure you need to use linux-swap and not linux-swap2
(i think 2 works but im not sure that its recommendable sicne the rom cookers themeselves use 1)
I would also use the method brian posted. its much more effective
thanks guys, i got adds2sd working and everything. on a 1gb right now until my new 4gb class 6 comes in this week.
i haven't done the swap things yet as i'm not sure of them just yet. i've learned quite a bit over the last week without trying to bug too many people on the forum. your replies are MUCH appreciated.
what is the different between ext 2/3 and linux-swap? i'm running my current 1gb 514mb fat32 and 445mb ext3.
ext3 has journaling which reduces corruption a lot. linux-swap is used as virtual memory.
thanks for the reply so in turn the swap will make the phone run faster right?
also, since no one answered my question in another thread:
although i'm running .999 when i press the camera button it open a box with a 'To:' entry and 3 button 'open', 'call', and 'send'.
i've looked in the settings to see if i can change what the camera button does(want it to open the camera like before obviously) without any luck..
any idea?
Click to expand...
Click to collapse
any ideas?
thanks again
blackinches said:
thanks for the reply so in turn the swap will make the phone run faster right?
also, since no one answered my question in another thread:
Click to expand...
Click to collapse
In theory swap should make it faster as it has more memory to play with.
For your other question, a file on the ROM containing the keymaps has been changed. The only way to change what the camera button does is pull it, edit it, and push it back.
AdrianK said:
In theory swap should make it faster as it has more memory to play with.
For your other question, a file on the ROM containing the keymaps has been changed. The only way to change what the camera button does is pull it, edit it, and push it back.
Click to expand...
Click to collapse
oh boy, i tried to avoid the adb stuff as i had a few problems with it. wonder how it got 'changed'.
i'll give it a try sometime.

How to partition SD card for Android?

Can anyone make a tutorial that shows how to partition SD card for the Android Eclair for Kaiser -- Dark Themed ? Please, greatly appricated if you did =]
Moved as not ROM Development.
Think your best bet is to PM one of the peeps releasing builds to ask if they can? or ask in one of the numerous droid threads.
I suggest using Gparted.
As I understand, Android can read ext2, which is light years ahead of fat32.
Warning: The following assumes that Andriod's file system and base operation operates like GNU/Linux
I'm not sure this will work... or how to get android to do this... but:
In GNU/linux, you would make a line in /etc/fstab for the device, unless it is handled by an automounter they designed.
Anyway, you can resize the fat32 to two partitions, and you should be able to make a 2ndary partition on the SD for linux.
I assume you are running windows, so to run Gparted, you will need to use the Live CD.
http://gparted.sourceforge.net/download.php
A sample fstab line:
Code:
# <file system> <mount point> <type> <options> <dump> <pass>
UUID=7d126676-b613-457f-b50f-5f69929b06d6 / ext3 errors=remount-ro 0 1
/dev/sda6 /home ext4 errors=remount-ro 0 1
I'd assume they have some sort of andriod application that opens a terminal with bash, or edit the /etc/fstab by some other means.
Best of luck!
Or you can just do this in Fat32
http://forum.xda-developers.com/showthread.php?t=267475
Thanks for the attempt at an explanation. I'm in the same boat as the original poster. I think the problem is that Android is currently running from my SD card on my Tilt, so I don't know if it's possible to partition the card while Android is running.
I've got a Windows 7 PC at home, and I can boot it from a Linux CD if needed... but I'm a total Linux NEWB. I'd really appreciate it if someone can point me to instructions for how to partition a 4 GB SD card to accommodate an Androd build along with being accessible form Windows Mobile.
Can someone give an overview of the process and maybe some partition size guidelines?
Thanks,
-Brett.
Google Can
Gparted is good, it lets you resize partitions without formating them. It's part of the Ubuntu live cd's.
http://gparted.sourceforge.net/larry/resize/resizing.htm

Categories

Resources