Now we are selling larger 16Gb SD cards I have created this guide to allow our smaller images to be dd'd onto a larger card and then extended to fill the available space.
The easy way to do this is using a USBtoSD dongle and use GParted on another Linux machine or Guiplug but here is how to do it manually.
Firstly take a backup the card if don't have one already, we will be deleting the Rootfs partition during this process.
Boot to the Nand and insert the SD card to resize.
Check the filesystem
fsck -n /dev/mmcblk0p2
Remove the journal (make it ext2)
tune2fs -O ^has_journal /dev/mmcblk0p2
Delete and Recreate the partition with the new larger size.
This won't delete any data.
fdisk /dev/mmcblk0
Follow these key sequences within fdisk.
This will delete partition 2 then create a new partition 2 which fills the available space.
d <enter>
2 <enter>
n <enter>
p <enter>
2 <enter>
<enter>
<enter>
w <enter>
Check the filesystem
e2fsck -f /dev/mmcblk0p2
Resize the filesystem
resize2fs /dev/mmcblk0p2
Check the filesystem
fsck -n /dev/mmcblk0p2
Put journalling back (make it ext3 again)
tune2fs -j /dev/mmcblk0p2
That's it, you can reboot to the SD card now.
NewIT Technical