Cool script to clone SD card for raspberry

Topics (not sure which fora)
when not sure where to post, post here and mods will move it to right forum.

Moderators: leecollings, remb0

Post Reply
nigels0
Posts: 221
Joined: Thursday 23 January 2014 12:43
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8153
Contact:

Cool script to clone SD card for raspberry

Post by nigels0 »

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!
starfish001
Posts: 17
Joined: Sunday 28 February 2016 23:54
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Cool script to clone SD card for raspberry

Post by starfish001 »

looks interesting will give it try later
starfish001
Posts: 17
Joined: Sunday 28 February 2016 23:54
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Cool script to clone SD card for raspberry

Post by starfish001 »

great script works really well

git clone https://github.com/billw2/rpi-clone.git
cd rpi-clone
cp rpi-clone /home/pi/domoticz/scripts
cd /home/pi/domoticz/scripts
sudo chmod +x rpi-clone

could be sda or sdb or sdc check!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
sudo /home/pi/domoticz/scripts/rpi-clone sdb -f -v
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest