0

I have a Raspberry Pi 4B (short: RPi4B) running Raspberry OS Debian GNU/Linux 12 bookworm, which I've configured to meet my specific needs (Installing several software packages and making various settings). Since it took me a considerable amount of time to set everything up, I would like to create an image of this setup. Ideally, I want to make a bootable microSD-Card (short: SDCard) from this image so that I can later install it on multiple RPi4B's. This would also serve as a backup for me. Please see the picture below for an overview of my components.

Note, that I have another SDCard, two USB Card Reader (short: CardReader) and another RPi4B with the standard Raspberry OS Debian GNU/Linux 12 bookworm installed. I've read that it's best to create a custom image on a PC that also runs Debian GNU/Linux 12 bookworm.

I've never done this before, so

  • What are the best practices for creating a bootable image of my RPI4B-#1 (SDCard-#1) setup?

enter image description here


I would do it this way:

  1. Power off RPi4B-#1 and remove the SDCard-#1
  2. Insert the SDCard-#1 into CardReader-#1 into RPi4B-#2
  3. Create the image of SDCard-#1 sudo dd if=/dev/sdX of=/path/to/backup/image.img bs=4M status=progress (Replace /dev/sdX with the correct device)
  4. Insert the SDCard-#2 into CardReader-#2 into RPi4B-#2
  5. Flash the image to SDCard-#2: sudo dd if=/path/to/backup/image.img of=/dev/sdY bs=4M status=progress (Replace /dev/sdY with the correct device)
  6. Insert the new SDCard-#2 into another RPi4B and power it on. It should boot with the exact same state as RPi4B-#1.
  7. Done!

Based on the community's feedback, here's how I would approach it now:

  1. Power off RPi4B-#1 and remove the SDCard-#1
  2. Insert the SDCard-#1 into CardReader-#1 into RPi4B-#2
  3. Create the image of SDCard-#1 sudo dd if=/dev/sdX of=/path/to/backup/image.img bs=1M status=progress (Replace /dev/sdX with the correct device)
  4. Insert the USB-Drive into RPi4B-#2
  5. Flash the image to USB-Drive: sudo dd if=/path/to/backup/image.img of=/dev/sdY bs=1M status=progress (Replace /dev/sdY with the correct device)
  6. Insert the new USB-Drive into another RPi4B and power it on. It should boot with the exact same state as RPi4B-#1.
  7. Done!
0

1 Answer 1

1

Exactly the way you described it is the correct approach.

  • The only things you should keep in mind when running multiple OS with the same image on the same network is to change the hostname and IP(if not dhcp).

  • Don’t forget that later all images will have the same UUID!

  • It may be that when you clone the image to a new SD card, it might not start, so try the same step again.

  • It's also possible that errors occurred during the image creation process, this can happen with SD cards.

With SD cards, you need to be careful because they wear out faster compared to USB sticks, SSDs, M.2, or HDDs, especially with many read/write operations, which can damage sectors over time.

Make sure the SD card is not used or to much used

Check this post SDcard Image behaves differently than Original

  • You can also clone the image to a USB stick and boot from the USB stick. The stick must be at least the same size or larger than the SD card from which you created the image.

HOW TO: Boot Raspberry Pi 4 from USB SSD Drive

How to Boot Raspberry Pi 4 / 400 From a USB SSD or Flash Drive

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.