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.

Moderators: leecollings, remb0

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

RPi SD card duplicate

Post 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
i000
Posts: 39
Joined: Saturday 11 February 2017 8:04
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: RPi SD card duplicate

Post 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.
NetEye
Posts: 34
Joined: Friday 17 June 2016 7:57
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Spijkenisse
Contact:

Re: RPi SD card duplicate

Post 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).
User avatar
emme
Posts: 909
Joined: Monday 27 June 2016 11:02
Target OS: Raspberry Pi / ODroid
Domoticz version: latest
Location: Milano, Italy
Contact:

Re: RPi SD card duplicate

Post 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
The most dangerous phrase in any language is:
"We always done this way"
elmortero
Posts: 247
Joined: Sunday 29 November 2015 20:46
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.9639
Location: Spain
Contact:

Re: RPi SD card duplicate

Post 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?
elmortero
Posts: 247
Joined: Sunday 29 November 2015 20:46
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.9639
Location: Spain
Contact:

Re: RPi SD card duplicate

Post 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?
marcelr
Posts: 42
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 »

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 8:04
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: RPi SD card duplicate

Post 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).
NetEye
Posts: 34
Joined: Friday 17 June 2016 7:57
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Spijkenisse
Contact:

Re: RPi SD card duplicate

Post by NetEye »

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 / ODroid
Domoticz version: Beta
Location: Spijkenisse
Contact:

Re: RPi SD card duplicate

Post 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
jannl
Posts: 625
Joined: Thursday 02 October 2014 6:36
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.2
Location: Geleen
Contact:

Re: RPi SD card duplicate

Post 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
User avatar
philchillbill
Posts: 396
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 »

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...
Alexa skills author: EvoControl, Statereport, MediaServer, LMS-lite
jannl
Posts: 625
Joined: Thursday 02 October 2014 6:36
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.2
Location: Geleen
Contact:

Re: RPi SD card duplicate

Post by jannl »

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 / ODroid
Domoticz version: Beta
Location: Spijkenisse
Contact:

Re: RPi SD card duplicate

Post 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??
jannl
Posts: 625
Joined: Thursday 02 October 2014 6:36
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.2
Location: Geleen
Contact:

Re: RPi SD card duplicate

Post by jannl »

Connecting a monitor and checking the errors is a way to go from here
lost
Posts: 616
Joined: Thursday 10 November 2016 9:30
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: RPi SD card duplicate

Post 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!
NetEye
Posts: 34
Joined: Friday 17 June 2016 7:57
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Spijkenisse
Contact:

Re: RPi SD card duplicate

Post by NetEye »

I will look for another way to clone.
I will leave the apple in the tree....
leonmoonen
Posts: 20
Joined: Thursday 25 May 2017 23:07
Target OS: Raspberry Pi / ODroid
Domoticz version: current
Contact:

RPi SD card duplicate

Post 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
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest