Possible to duplicate SDCARD...?


I have a couple of Pi 2’s, and i was wondering if it’s possible to just copy everything from one Pi 2 (the sdcard) to another to have everything already setup on the other one, including OSMC, addons and all the settings.


It’s more than possible - I’ve just been doing that.
How you do it depends on what hardware/software resources you have, and what you know.
Easiest route, I think, would be USB Image tool on a Windows PC to image the SD card, and then load it onto a new one.
Tools exist for linux as well, and I was using a script to clone my Pi setup actually on the Pi by employing a card reader plugged into the Pi system. The advantage of the latter route is that I can customise the new install to some extent (new identity etc)

Google is your friend!

There are probably other ways of doing this, but this was one of the first to come up:

… and here’s another one:

Good luck!


Taking a quick look at those links reminds me of a couple of points:

  1. win32diskimager is mentioned by both - I abandoned it when I found no flexibilty to allow keeping images of several cards (may only be a local-to-me problem).
  2. the different sizes of cards which are quoted as being the same size can create a problem - which can be overcome by using a dd variant (forgotten the name, but it doesn’t copy unused bits)
  3. using rsync to do the copy will only copy used bits (I’ve seen a posting online for this, and have a rough script to follow to do it)
1 Like

Hello, and thanks for the answer!
I have tried that application before (Win32DiscImager), with two identical sdcards, and to me it wasn’t possible; it said i didn’t have enough room on the sdcard i was gonna restore it too.
The size that was taken on the card was around 8gb, the image was ~32gb i think.
Sorry that i forgot to mention this…

Works perfectly with Win32DiskImager
I did it few day ago from 16gb to 32 gb.

When it’s done, don’t forget to launch :

sudo raspi-config

and to extend the partition


sudo raspi-config does not exist in OSMC


Oh ! So it’s automatic ?

Clonezilla. It can be booted from a USB stick or CD. I use it to image my ubuntu machines, and sometimes clone OSMC as a emergency backup alternative to rsync recovery.




So you could clone a card and restore it to a card of the same size?
Bonus question: when you say “launch sudo raspi-config”. How do i enter a console (exits kodi without shutting down the whole Pi)?

Ok, thanks, i will look into this =)
LiveUSB or CloneZilla?

Clonezilla can boot from either a usb stick or cd/dvd. I have it in a 2GB USB stick as it boots a bit quicker, but either way you’ll get the same interface.

It takes getting used to the menu options, but once you do, it is very reliable.

Also, with clonezilla you can write across the network onto network storage.


I also use a simple script to rsync all xbmc data, and other config data to an external drive as backup. To restore, you reinstall osmc image, install rsync, and rsync the data back where it belongs.

rsync -av /boot /mnt/tera/pi/osmc-pi2/osmc
rsync -av /etc /mnt/tera/pi/osmc-pi2/osmc
rsync -av /home /mnt/tera/pi/osmc-pi2/osmc
rsync -av /usr /mnt/tera/pi/osmc-pi2/osmc

rsync -av /mnt/tera/pi/osmc-pi2/osmc /mnt/16GB/pi/osmc-pi2/

1 Like



It took some time to get CZ to run, and understand the options, haha!
Anyhow, it did not work. Same “error” as Win32DiscImager gave me: Not enough size.

Just a few tiny MB’s missing… gaaah…
I don’t wanna buy a new, bigger, card to get this working. Ideas?

Are you trying to clone OSMC to another card, or make a backup? Unfortunately, with any imaging backup method your target storage (where you are storing the backup) needs more space . Can you send the image backup to the directory on your PC?

Use the option when you run CZ - it’s plainly written in the pic you posted.

Yes, i want to clone a card to use on another Pi 2. =)
Free space on the 32GB card is like 20GB, or more, so why the h*ll is the imagefile 32GB? Strange…
Yup i have the imagefile on my PC now.

You mean with the -C flag? That is said to be dangerous? :stuck_out_tongue:
I actually tried to use the advanced mode in CZ, i got alot more options, but not the -C.
And doing all this in commandline would not work for me…
Guess i’ll have to do all from scratch

Thanks guys!

There is a possibility - use parted (or gparted, perhaps on a live cd) to compress the large partition, and then you can use a tool like clonezilla to do the partition copying.

dandnsmith is right. I wasn’t aware that you were trying to clone to another sdcard that had data on it.

Get gparted live cd. Resize the existing partition to about 10GB, and the other 10GB for CZ. You want to resize the existing partition from the middle to the end of the drive, and create a new partition from the front of the drive, and clone to that first empty partition