Matthias Mobil Tech Weblog

Android – G1 – Moto Q – Polar

G1: Add a SWAP partition to SD Card

with one comment

When I switched to Cyanogen, I did the mistake not to create a swap partition on my 8GB sd card in addition to the ext partition for apps2sd…  The current partition settings are:

parted /dev/block/mmcblk0
print

mkpartfs primary fat32 0 7499 -> (7499MB FAT32)
mkpartfs primary ext2 7499 7948 -> (449MB EXT)

Now goal is to reduce the size of the EXT partition and create a SWAP partition.

1) Backup Settings, Apps, etc.

I did a Nandroid backup using the Recovery and in addition a backup with Backup for Root Users as well as My Backup

2) Backup EXT Partition

Open a terminal and go to /system/sd This is the mounting point for your EXT partition. Copy all do a folder on the SD card, FAT32 partition.

3) Backup FAT32 Partition

Easy, just mount G1 to PC and copy the drive to the PC.

4) Now start  G1 into Recovery and go to the console

parted /dev/block/mmcblk0
print

rm2 -> (delete org EXT)

mkpartfs primary ext2 7499 7899 -> ( 400MB EXT3)
mkpartfs primary linux-swap 7899 7948 -> ( 49MB SWAP)

print
upgrade_fs
reboot

After reboot,  copy the previously backuped files (2) back to /system/sd via console or adb.  After execution of this steps, (keep in mind, that steps 1 and 3 are just for pre-caution reasons), system is running superb with a additional swap partition. And the FAT32 stayed untouched.

Matthias

Written by Matthias

7. October 2009 at 09:49

One Response

Subscribe to comments with RSS.

  1. I have the same query as mentioned here. Thanks for this nice post here as I got my solution from here. I will follow these tips. Well it is nice to post here. I like this site very much.

    carte sd

    12. October 2009 at 07:35


Leave a Reply