How to I give Linux more space?

As with all advanced articles you must have a good understanding of linux and android in order to get this working as most devices work differently etc. If you have problems I will try to help but can not offer to much help with this matter (As it can be device dependent) also this can result in your sdcard getting wiped so preced with caution!

There are a few ways of going about this, I will look at two here the first being the safest but limited and the second harder but has really only the limit of how big your storage is! For both of these methods you must have a computer running Ubuntu or any other linux distro. 

 Method 1

For this method we shall simply make a bigger image file and copy the content from the old file to the new one, however its important to note if your storage is formatted for FAT32 you will only be able to increase the image to 4GB, if your storage is formatted to ext2/3/4 this can be much larger, but be warned Android starts to not like mounting large image files if you go to high! 

Start by copying your image file you want to 'make larger' to your computer, place it on the Desktop to make things easier. 

Now open a terminal, cd to the desktop and create the new blank image of the size you want using the following commands 

cd ~/Desktop 
dd if=/dev/zero of=ubuntunew.img bs=1M count=0 seek=4096 

This creates a new image file called 'ubuntunew.img' change the seek value to the sie you want (e.g 4096 = 4GB)

Next we must format the new image to the ext2 file system using the below command

mke2fs -F ubuntunew.img

next create two folders on your desktop call one ubuntunew and one ubuntuold, we will use these as a place to mount the two images.

You now need to mount the old and new images in there respective folders, do this using the follow commands:

sudo mount -o loop ubuntu.img ubuntuold

sudo mount -o loop ubuntunew.img ubuntunew

Now we shall copy all the files from the old image into the new image:

sudo cp -r ubuntuold/* ubuntunew

Once this is complete simply unmount the images and your ubuntunew.img is ready to be used!

sudo umount ubuntuold 
sudo umount ubuntunew

Method 2

The second option involves creating a partition on your sdcard and 'installing' ubuntu to the partition. This will wipe your sdcard and requires a good knowledge of both linux and android. I will write up this method shortly along with a edited boot script to allow booting from it. 

Feedback and Knowledge Base