Page 1 of 1

RPi SD card duplicate

Posted: Sunday 11 February 2018 9:35
by NetEye
People,
When I maken a copy of the sd card I’am using in the RPi with Domoticz it is not usable in another raspberry.
It seems to be dedicated for his used RPi.
How can I make a copy it (app and his commands) so the SD card can be used in other raspberrys (with all the specific RPi and Domoticz settings and used scripts in crontab)?
Regards

Re: RPi SD card duplicate

Posted: Sunday 11 February 2018 18:50
by i000
Hi! I use Applepi Baker program to do the copy exactly like original. But to get it works, is necessary that the original and the copy cards have the same capacity and brand, why this? Because between different brand, sometimes there are small differences in capacity.

Re: RPi SD card duplicate

Posted: Monday 12 February 2018 17:35
by NetEye
Dear i000,
Does the copy works then on the same RPi or a different one.
Because thats the problem to make a copy and let it work on a second different RPi (caused by addressing and so on).

Re: RPi SD card duplicate

Posted: Monday 12 February 2018 17:38
by emme
I use etcher to copy the SD but befose doing any copy I use also to close the PI not with shutwon but Halt


sudo halt

Re: RPi SD card duplicate

Posted: Monday 12 February 2018 19:24
by elmortero
Hi,

What exactly is not working using a copy?
Do you get errors?
And also, you mention addressing, do you mean you get messages about duplicate IPs?

Re: RPi SD card duplicate

Posted: Monday 12 February 2018 19:24
by elmortero
Hi,

What exactly is not working using a copy?
Do you get errors?
And also, you mention addressing, do you mean you get messages about duplicate IPs?

Re: RPi SD card duplicate

Posted: Monday 12 February 2018 19:35
by marcelr
Can't you just attach the second sd card to your Raspi (through a USB adapter) and copy it literally:

dd if=/dev/mmcblk0 of=/dev/mmcblk1 bs=16M

(take mmcbkl0 and mmcblk1 according to your own settings)

Re: RPi SD card duplicate

Posted: Monday 12 February 2018 21:29
by i000
Hi NetEye, for me is a Backup. To work in a second is necessary change the fixed IP address, but I have this working always with the same to access remotely.


NetEye wrote:Dear i000,
Does the copy works then on the same RPi or a different one.
Because thats the problem to make a copy and let it work on a second different RPi (caused by addressing and so on).

Re: RPi SD card duplicate

Posted: Tuesday 13 February 2018 11:10
by NetEye
I will trie it.
One on one back-up and change ip adress.
Thanks all

Re: RPi SD card duplicate

Posted: Thursday 15 February 2018 18:46
by NetEye
I can not get it right.
I made it as : https://medium.com/a-swift-misadventure ... 8a630f899c
When I put it in a different new unused RPi it does not work.
Like there is no operating system on the raspberry.
The green and yellow lights of the RJ45 utp connection is not lighting...no connection

Re: RPi SD card duplicate

Posted: Friday 16 February 2018 7:28
by jannl
When you connect your pi to a monitor do you see any errors. When using the copied sd I guess yoy have diconnected the original one to prevent ip conflicts?

Jan

Re: RPi SD card duplicate

Posted: Friday 16 February 2018 14:41
by philchillbill
Just to be sure, are you formally cloning the card using a card-copying utility (e.g. Etcher) or just dragging files over from the source card to a newly formatted card? That will never work if that's what you did...

Re: RPi SD card duplicate

Posted: Friday 16 February 2018 15:10
by jannl
hm, good question. I duplicate my SD-cards with win32imager, off-line

Re: RPi SD card duplicate

Posted: Friday 16 February 2018 17:02
by NetEye
Yes Phil I removed the sd card from the rpi and made a copy of it with Disk Utility app on my mac.
Save it in DVD/CD master Format and change the .cdr extension to .iso
Then an empty sd card writing the image with Etcher.
But it does not work yet, no communication possible with the rpi.
It is for sure my incompetence but hopefully I’am close.☺️
Win32 imager does not work on mac i think, maybe I have to try it on a windows pc??

Re: RPi SD card duplicate

Posted: Friday 16 February 2018 17:04
by jannl
Connecting a monitor and checking the errors is a way to go from here

Re: RPi SD card duplicate

Posted: Friday 16 February 2018 17:39
by lost
NetEye wrote: Friday 16 February 2018 17:02 Yes Phil I removed the sd card from the rpi and made a copy of it with Disk Utility app on my mac.
Save it in DVD/CD master Format and change the .cdr extension to .iso
Then an empty sd card writing the image with Etcher.
But it does not work yet, no communication possible with the rpi.
It is for sure my incompetence but hopefully I’am close.☺️
Win32 imager does not work on mac i think, maybe I have to try it on a windows pc??
Not sure your imaging stuff makes a raw binary image...

Macs have a BSD-Unix base, so they should have the dd command...
Just take care not to invert of/if arguments while imaging or dd=data destroyer.

Also make sure to use the right device, not your HDD seen as a storage media just like the SD.

On Linux, if /dev/sdX is the device allocated to your SD, this should be something like (with admin rights, revert if/of, taking care of device name, to restore):

dd if=/dev/sdX of=imagePi.bin bs=1M oflag=dsync conv=notrunc status=progress

status report may not be supported (dd stays silent until the end... even if a USR1 signal on the dd process PID could be used to get status) on old versions.

As I didn't used an Apple device since a very long time (well, a nice brand that started in a garage making first hardware open to customization/add-ons now building such overly closed shit even impossible to repair, really impossible for me to buy this!), Apple IIe to make things clear, can't help more!

Re: RPi SD card duplicate

Posted: Friday 16 February 2018 20:19
by NetEye
I will look for another way to clone.
I will leave the apple in the tree....

RPi SD card duplicate

Posted: Saturday 17 February 2018 7:22
by leonmoonen
I’ve been using rpi-clone to make backup clones of my pi’s sdcard, on the pi itself, using an USB sdcard adaptor for the target. Internally, it uses a combi of dd and rsync and it imprements logic to be a bit smarter than plain dd, both in terms of speed and in it’s ability to clone a running system (aka ‘hot clone’)

https://github.com/billw2/rpi-clone