I have tried this on the latest release (archlinux-hf-2013-07-22.img) and the geometry has changed, the disk now has an extended partition with a logical one inside that…
fdisk reports (after imaging onto 8GB card)
$this->bbcode_second_pass_code('', ' Device Boot Start End Blocks Id System
/dev/mmcblk0p1 2048 186367 92160 c W95 FAT32 (LBA)
/dev/mmcblk0p2 186368 3667967 1740800 5 Extended
/dev/mmcblk0p5 188416 3667967 1739776 83 Linux
')
It looks like both the extended & logical partitions need to be deleted (p2 and p5)
Something like…
$this->bbcode_second_pass_code('', '
fdisk "/dev/mmcblk0"
p
d
2
n
e
(return) # accept default partition no
(return) # accept default start
(return) # accept default end
n
l
(return) # accept default start
(return) # accept default end
p
w
sync; reboot
...
resize2fs /dev/mmcblk0p5
fsck etc
')
I get the following geometry from fdisk…
$this->bbcode_second_pass_code('', '
Device Boot Start End Blocks Id System
/dev/mmcblk0p1 2048 186367 92160 c W95 FAT32 (LBA)
/dev/mmcblk0p2 186368 15652863 7733248 5 Extended
/dev/mmcblk0p5 188416 15652863 7732224 83 Linux
')
I tried only deleting the last partition but it is limited by the size of the enclosing extended partition, so you can't expand the partition until the extended one is also expanded.
Thanks for all the tips so far, this is handy - hope this helps too