RPi SD card duplicate

Topics (not sure which fora)
when not sure where to post, post here and mods will move it to right forum.
Post Reply
NetEye
Posts: 34
Joined: Friday 17 June 2016 7:57
Target OS: Raspberry Pi
Domoticz version: Beta
Location: Spijkenisse
Contact:

RPi SD card duplicate

Post by NetEye » Sunday 11 February 2018 10:35

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

i000
Posts: 39
Joined: Saturday 11 February 2017 9:04
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: RPi SD card duplicate

Post by i000 » Sunday 11 February 2018 19:50

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.

NetEye
Posts: 34
Joined: Friday 17 June 2016 7:57
Target OS: Raspberry Pi
Domoticz version: Beta
Location: Spijkenisse
Contact:

Re: RPi SD card duplicate

Post by NetEye » Monday 12 February 2018 18:35

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).

User avatar
emme
Posts: 957
Joined: Monday 27 June 2016 11:02
Target OS: Raspberry Pi
Domoticz version: latest
Location: Milano, Italy
Contact:

Re: RPi SD card duplicate

Post by emme » Monday 12 February 2018 18:38

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
The most dangerous phrase in any language is:
"We always done this way"

elmortero
Posts: 241
Joined: Sunday 29 November 2015 21:46
Target OS: Raspberry Pi
Domoticz version: 3.9639
Location: Spain
Contact:

Re: RPi SD card duplicate

Post by elmortero » Monday 12 February 2018 20:24

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?

elmortero
Posts: 241
Joined: Sunday 29 November 2015 21:46
Target OS: Raspberry Pi
Domoticz version: 3.9639
Location: Spain
Contact:

Re: RPi SD card duplicate

Post by elmortero » Monday 12 February 2018 20:24

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?

marcelr
Posts: 61
Joined: Friday 22 May 2015 21:10
Target OS: Linux
Domoticz version: svn 2470
Location: Ehv, NL
Contact:

Re: RPi SD card duplicate

Post by marcelr » Monday 12 February 2018 20:35

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)

i000
Posts: 39
Joined: Saturday 11 February 2017 9:04
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: RPi SD card duplicate

Post by i000 » Monday 12 February 2018 22:29

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).

NetEye
Posts: 34
Joined: Friday 17 June 2016 7:57
Target OS: Raspberry Pi
Domoticz version: Beta
Location: Spijkenisse
Contact:

Re: RPi SD card duplicate

Post by NetEye » Tuesday 13 February 2018 12:10

I will trie it.
One on one back-up and change ip adress.
Thanks all

NetEye
Posts: 34
Joined: Friday 17 June 2016 7:57
Target OS: Raspberry Pi
Domoticz version: Beta
Location: Spijkenisse
Contact:

Re: RPi SD card duplicate

Post by NetEye » Thursday 15 February 2018 19:46

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

User avatar
jannl
Posts: 955
Joined: Thursday 02 October 2014 6:36
Target OS: Raspberry Pi
Domoticz version: Beta
Location: Geleen
Contact:

Re: RPi SD card duplicate

Post by jannl » Friday 16 February 2018 8:28

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

User avatar
philchillbill
Posts: 239
Joined: Monday 12 September 2016 13:47
Target OS: Linux
Domoticz version: beta
Location: Eindhoven. NL
Contact:

Re: RPi SD card duplicate

Post by philchillbill » Friday 16 February 2018 15:41

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...
NUC/Ubuntu, Evohome Heating + HGI80, Evohome Security, 4x HikVision IP cams, Aeotec, Neo & Fibaro Z-Wave, Logitech Media Server (on Synology DS916+), 10x SqueezeBox, Kodi, Harmony Hub, 5x Amazon Echo, HA-Bridge, Hue.

User avatar
jannl
Posts: 955
Joined: Thursday 02 October 2014 6:36
Target OS: Raspberry Pi
Domoticz version: Beta
Location: Geleen
Contact:

Re: RPi SD card duplicate

Post by jannl » Friday 16 February 2018 16:10

hm, good question. I duplicate my SD-cards with win32imager, off-line

NetEye
Posts: 34
Joined: Friday 17 June 2016 7:57
Target OS: Raspberry Pi
Domoticz version: Beta
Location: Spijkenisse
Contact:

Re: RPi SD card duplicate

Post by NetEye » Friday 16 February 2018 18: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??

User avatar
jannl
Posts: 955
Joined: Thursday 02 October 2014 6:36
Target OS: Raspberry Pi
Domoticz version: Beta
Location: Geleen
Contact:

Re: RPi SD card duplicate

Post by jannl » Friday 16 February 2018 18:04

Connecting a monitor and checking the errors is a way to go from here

lost
Posts: 206
Joined: Thursday 10 November 2016 10:30
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: RPi SD card duplicate

Post by lost » Friday 16 February 2018 18:39

NetEye wrote:
Friday 16 February 2018 18: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!

NetEye
Posts: 34
Joined: Friday 17 June 2016 7:57
Target OS: Raspberry Pi
Domoticz version: Beta
Location: Spijkenisse
Contact:

Re: RPi SD card duplicate

Post by NetEye » Friday 16 February 2018 21:19

I will look for another way to clone.
I will leave the apple in the tree....

leonmoonen
Posts: 17
Joined: Thursday 25 May 2017 23:07
Target OS: Raspberry Pi
Domoticz version: current
Contact:

RPi SD card duplicate

Post by leonmoonen » Saturday 17 February 2018 8:22

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

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests