How can I duplicate an SD card for deployment on another RPi

Raspberry Pi Asked by Hydrowelder on January 2, 2022

I need to build about 10 identical RPi Zero W units. I used an existing unit which worked, cloned it in Win32Disk, and plugged that SD card in a new unit. The new unit previously had no issues running but now it is not able to identify any network interfaces. Did I need to edit any of the config files for the new unit? I am afraid I bricked the network capabilities of the new one because I went into this kind of blind.

3 Answers

This is more of a "workflow" answer as I'm unsure exactly what environment you're working in. If you have specific questions, you may either edit your original question, or use the Comments (sparingly please).

Duplicating your system as an image file:

You can use image-utils to create an image file of your "existing unit". One of the advantages of image-utils is that you can duplicate your existing SD card while it is inserted in your Pi, and the system is running. Another advantage is that you can easily and quickly update your saved image file from your running RPi - for example if you make configuration changes that you wish to propagate to the "other units". As suggested in the Comments to your question, you may want to review this Q&A for more details.

Modifying your image file for deployment to other units

As you have noticed, and as @Ingo has pointed out, some changes to the image file you have created are necessary before deploying the image to your clones. Fortunately, your image file can be edited to make these changes. It is also possible to automate these changes with a script if you are inclined to such things.

It may be difficult or awkward to make these changes from a Windows environment. If you are working in a Windows environment, you may find this Q&A informative. However - my first recommendation would be to make these edits from a Linux machine.

I won't go into details of making the edits in a Linux environment, but you can find some guidance for the cost of an Internet search. This one in particular looks promising; the key feature is using the mount -o loop option to mount the image file. Once you've mounted it, you can explore the contents, and make the changes needed for deployment to other units.

Answered by Seamus on January 2, 2022

It seems the cloned SD Card boots up and is running but has problems at least with the network interfaces. On a cloned program it also has exactly the same system parameter like hostname, MAC address, ssh server keys, UUID and PARTUID of the storage and maybe other parameter I just don't remember now. This is no problem if the clones are running on different networks without connection between them. But if they are running on the same network you will run into problems. At least the hostname and the MAC address must be different for network communication. Other parameter like ssh server keys give you warnings or error messages when using ssh.

So for your network problems you should first try to change the hostname and the MAC addresses of your network interfaces (e.g. eth0, wlan0 etc.).

Answered by Ingo on January 2, 2022

You can clone SD Cards.

There are a few things to watch, depending on whether they are to be used on the same network.

However DON'T use Windows!

The Pi has a SD Copy program, and you will find hundreds of similar questions on this site.

Answered by Milliways on January 2, 2022

Add your own answers!

Related Questions

RFID RC522 Reader & Chromium Web Page

1  Asked on December 5, 2020


Access Raspberry pi jenkins server over the internet

1  Asked on December 4, 2020 by emil-mller-ringgaard


Stuck in matchbox window

1  Asked on December 2, 2020 by christian-benner


How to use PI4J with a brushless motor?

1  Asked on November 27, 2020 by cy8berpunk


Android Things for RaspBerry

0  Asked on November 16, 2020 by flower


Pioneer TV shows “unsupported” when connected to RPI 4

1  Asked on October 29, 2020 by dannyniu


Docker disables network connectivity

0  Asked on October 16, 2020 by stevepoling


Is there documentation for RPi.GPIO

2  Asked on October 15, 2020 by milliways


Redirecting Traffic to local mqtt server

2  Asked on October 11, 2020 by elior


Playing Kodi without UPnP

0  Asked on October 6, 2020 by hasan


Powering a Servo with 12V Battery and Buck Converter

0  Asked on September 26, 2020 by gumby4231


Trying to get SSH over USB to work (Raspberry pi Zero W)

1  Asked on September 26, 2020 by damightyzombie


Raspberry PI random connection interruptions

1  Asked on September 22, 2020 by ben


Connect sim800 to Raspberry PI (RX, TX)

4  Asked on September 15, 2020 by max


make: *** No rule to make target ‘Install’. Stop

1  Asked on September 12, 2020 by travism


Ask a Question

Get help from others!

© 2023 All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP