Making a copy of SD card for second Pi

I have a Pi2 which I use with OSMC for my main media center and I just bought a Pi3 to go in the basement (where I can use there wifi instead of having to run a cable). I’ve tried the SD card from the Pi2 in the Pi3 and it works perfectly. I have a Macbook Pro as my computer and have been trying to make an image (.img or .dmg) of the SD card and flash it over to a new SD card (same size).
While this seems to complete ok without errors on my Mac (using dd in the Terminal) it never seems to boot up ok on the Pi3 (I haven’t tried the Pi2).
I get lots of “no such file or directory” type errors and it tries to repair the files, reboots and then says “no such file or directory” again!
I am keen to transfer my settings and add ons from the Pi2 (especially the OpenVPN setup, which was quite involved).
Does anyone have any experience of doing this on a Mac? Successfully?

Are you using dd to create the image and write the image back? That should work!

Exactly! That’s what I’m doing. Very odd.
I tried multiple times too - with different USB card readers.
Guess I’m resigned to making a fresh install then🙄
Thanks for replying Fzinken

Well just make a backup of your current system and restore that after the fresh install should be as fast as the one to one copy

If you have two card readers you could just copy with dd from one card to the other without going through a image file as a test.

Thanks mate. That’s a good idea.
Not sure how I’d do a direct SD to SD copy in Terminal. :question:

Osmc has a backup and restore tool built in… But I’ve always used the kodi backup add on. Let’s me restore all settings / add on / etc from any osmc install (rpi1, 2, 3, Vero 1, vero2) to any other osmc device. Takes a few seconds to Install fresh, add the add on, and restore from an ntf share.

Now you confuse me, earlier you wrote you created and restored the image with dd already?
If that is the case just use the if= from your first command and the of= from the second command.

dd if=/path/to/old_card of=/path/to/new_card bs=1m

I use the free software “Etcher” on my Mac to burn SD cards from image files.
It formats/burns SD cards properly for Pis, unlike Disk Utility. It is easier to use than Terminal, too. Try it:


Edit: Just realised the OP wanted to (presumeably) clone his card completely, including settings, etc… Etcher won’t currently do that - it only burns cards from images. However, saving cards as images (i.e. backup), and then burning another clone card from that image - IS on the developers to-do list. So, watch that space!

1 Like

I use Apple Pi baker for the Mac. Works perfectly for imaging and restoring sd cards for the pi.

Simon

2 Likes

Thats the general method I was using - only writing it to a file in between.
I see what you mean.
I can’t see how making an image in the middle is going to mess things up but might be worth a try.
Thanks

Thanks for the tip mate, I’d forgotten about that.
Thats got me a lot closer, without nearly as much effort.

Thanks.
I’ll give that a look.

Glad it fits your need :slight_smile:

Thanks to everybody who responded.
From a fresh install of OSMC => Backup add-on => transferring some data over manually, I’m at a place where everything seems to be working ok.
I even added in a RetrOSMC install too and was up FAR too late last night playing pixelated old video games!!
The OpenVPN install was a sticking point but I figured out that I needed to go into the OpenVPN add-on settings and point the add-on to the openvpn (in usr/sbins) install again & now it seems to work fine.
Thanks again for all the tips on SD card imaging/flashing apps - when I need to do this again I will revisit this thread.