My scenario is simple: my android phone has internal microSD card with size of 2Gb and I run out of space. Now I bought a new 16Gb microSD card where I want to migrate.
Steps: 1. Insert old sd card, use dd to make backup
# dd if=/dev/mmcblk0 of=backup.img bs=1M
- Insert new sd card, dd old image
# dd if=backup.img of/dev/mmcblk0 bs=1M
- Resize the partition...wait I can't see partitions there
# fdisk /dev/mmcblk0 Welcome to fdisk (util-linux 2.21.2). Changes will remain in memory only, until you decide to write them. Be careful before using the write command. Command (m for help): p Disk /dev/mmcblk0: 16.0 GB, 16001269760 bytes 4 heads, 16 sectors/track, 488320 cylinders, total 31252480 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00000000 Device Boot Start End Blocks Id System Command (m for help):
Ok, let's try resize?
# resize2fs /dev/mmcblk0 resize2fs 1.42.3 (14-May-2012) resize2fs: Bad magic number in super-block while trying to open /dev/mmcblk0 Couldn't find valid filesystem superblock.
GParted shows 16Gb fat16 partition, but the available size is still old 2Gb size from old microSD.
What I'm doing wrong?