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?
I would do it this way:
- Power off RPi4B-#1 and remove the SDCard-#1
- Insert the SDCard-#1 into CardReader-#1 into RPi4B-#2
- Create the image of SDCard-#1
sudo dd if=/dev/sdX of=/path/to/backup/image.img bs=4M status=progress(Replace/dev/sdXwith the correct device) - Insert the SDCard-#2 into CardReader-#2 into RPi4B-#2
- Flash the image to SDCard-#2:
sudo dd if=/path/to/backup/image.img of=/dev/sdY bs=4M status=progress(Replace/dev/sdYwith the correct device) - Insert the new SDCard-#2 into another RPi4B and power it on. It should boot with the exact same state as RPi4B-#1.
- Done!
Based on the community's feedback, here's how I would approach it now:
- Power off RPi4B-#1 and remove the SDCard-#1
- Insert the SDCard-#1 into CardReader-#1 into RPi4B-#2
- Create the image of SDCard-#1
sudo dd if=/dev/sdX of=/path/to/backup/image.img bs=1M status=progress(Replace/dev/sdXwith the correct device) - Insert the USB-Drive into RPi4B-#2
- Flash the image to USB-Drive:
sudo dd if=/path/to/backup/image.img of=/dev/sdY bs=1M status=progress(Replace/dev/sdYwith the correct device) - Insert the new USB-Drive into another RPi4B and power it on. It should boot with the exact same state as RPi4B-#1.
- Done!
