Cool script to clone SD card for raspberry
Posted: Friday 15 April 2016 14:25
Hi,
I wanted to clone my SD card, but SD cards of the publicised size aren't exactly the same - so trying to clone a 8GB Lexar SD card into Sandisk 8Gb card didn't work as the Sandisk card is slightly smaller.
I found the following script which not only saves you from having to pull the SD card out of the raspberry to clone, but also can clone to another SD card of a different size.
Check out: https://github.com/billw2/rpi-clone
Note that I had to edit the script to fix a mounting issue by adding -t vfat on line 388
..
echo "=> Mounting $DST_BOOT_PARTITION on $CLONE/boot"
if ! mount -t vfat $DST_BOOT_PARTITION $CLONE/boot
then
,,,
Otherwise a great and useful script!
I wanted to clone my SD card, but SD cards of the publicised size aren't exactly the same - so trying to clone a 8GB Lexar SD card into Sandisk 8Gb card didn't work as the Sandisk card is slightly smaller.
I found the following script which not only saves you from having to pull the SD card out of the raspberry to clone, but also can clone to another SD card of a different size.
Check out: https://github.com/billw2/rpi-clone
Note that I had to edit the script to fix a mounting issue by adding -t vfat on line 388
..
echo "=> Mounting $DST_BOOT_PARTITION on $CLONE/boot"
if ! mount -t vfat $DST_BOOT_PARTITION $CLONE/boot
then
,,,
Otherwise a great and useful script!