[G1 Android Development] toeshot:
This is a guide to use gparted to re-size and add a new partition without having to reformat your entire SDcard.

gparted is installed by default in most Linux distributions now and this will work with all flavors of Linux, you may have just a couple of different quirks from the different distro's.

DISCLAIMER: I take no responsibility for lost or corrupted data that you may result from this procedure. I take no responsibility for corrupted and unusable SD card's that may result from this procedure.

What you will need:

SD Card

Linux/Linux LiveCD/DVD/

SD Card Reader

INSTRUCTIONS

Ubuntu 8.10 Linux

Plug your SD card in, it should mount your partitions on the card.

If you get an error saying you do not have permissions to mount this partition that is ok. It is the FAT32 partiton that didn't mount.

Open up a Terminal Shell (you can find this in Applications in Ubuntu or in System Tools in Fedora)

type mount in the terminal

$ mount

At the end of the list you will see a mount point something like this

/dev/sdb2 on /media/disk type ext3 (rw, noexec, nousid, nodev)

Take note of /dev/sdb2 the sdx is your SD Card. the x is the letter that is next in the device chain. sdx does not stand for SD Card, sdx is how linux Identifies SCSI, SCSI Emulated and SATA devices. USB devices are mounted as SCSI Emulated so if you had a SATA drive that would be sda and if you added a thumb drive that would be sdb. The number that follows that sequence is the partition number.

OK Lets move on.

In the terminal type

$ sudo gparted

This will open up the gparted software

In the upper right of the gparted window there is a drop down box, click on that and select your drive.

We will do this step by step applying each action as we go it is possible to do them all at once but i like the step by step approach

With your sd card selected from the drop down box right click on the FAT32 Partition (the green partition) and select resize from the list.

In the resize dialog box type in 288 in the box following Free Space Following (mib). When figuring out the swap size remeber that it is 1.5 times the ram and since the G1 has 192 ram it is 192 * 1.5 = 288

Click resize

Now click the apply button

After the resize has completed right click on the unallocated space (the gray space) and select new

In the Create New Partition in the filesystem dropdown box select linux-swap then click add then click apply

You now have 3 partitions on your SD Card without losing any data.

POSSIBLE ERRORS and FIXES

The new linux-swap partition didn't format

This occasionally happens, what gparted does is actually create the partition and then format it. Chances are that the partition was created but an error happened in formatting. Just rerun gparted and select the partition and reformat it.

FAT32 Partition won't resize

If there is a set of keys in front of the fat32 partition that means this partition is mounted and it needs to be unmounted to resize it. Right click on the keys and select unmount, then resize

Windows

You need to use Partition Magic and it works the same way. Sorry for the lack of instructions but I do not have Partition Magic anymore so I can not go into detail