Amateur game dev
Category Archives: homeserver
July 12, 2013Posted by on
Quick way to move your raspberry pi installation to a new (bigger) sd-card.
It worked fine for me (16GB to 32GB different card-manufacturers), but I wouldn’t grantee it.
First shutdown your rasperry-pi and remove the current sd-card. Insert the card into your computer and unmout it (if automounted). Figure out the name of your computer’s sd-card-slot with dmesg (here it’s mmcblk0 make sure you pick the card and not a partition on it like mmcblk0p1).
sudo dd if=/dev/mmcblk0 of=~/rpi-card.bin
Wait for a long time until it finishes coping an image of the old card. Remove the old card and insert the bigger one. All data on the new card will be wiped, so ensure you lose nothing.
Make sure the new card is unmounted before your run this command:
sudo dd if=~/rpi-card.bin of=/dev/mmcblk0
You can append another command to alert you when the writing has finished like this:
sudo dd if=~/rpi-card.bin of=/dev/mmcblk0 && mplayer drowning-pool.ogg
It will copy the exact image of the old card to the new one.
This takes a bloody long time, so make sure your computer is charged and you’ve got something better to do.
Now put the new sd card into your raspberry-pi and boot it up.
pick resize root fs, reboot and that’s it.