Make img system image based on Raspberry Pi CM4 & batch make TF card

Preface

It takes time to customize the configuration after burning the system on Raspberry Pi. When faced with the configuration of large quantities of Raspberry Pi, the time cost is very huge. After configuring it for the first time, it can be said that you are crossing the river by feeling for the stones, but configuring it after you know how to do it is all repetitive operations. Apart from improving your proficiency, there is no essential improvement.
This blog is a record of saving time.


1. Environment and Tools

PC operating system: Windows
Hardware: Raspberry Pi CM4+CM4-Adapter (expansion baseboard)
Official burning tool: Raspberry Pi Imager
Disk imaging tool: Win32DiskImager_v1.0


2. Make a mirror

By default, CM4 already has a system here. For specific burning system reference: this blog

Switch the BOOT file on the Raspberry Pi CM4 baseboard to ON, then power on, and then open rpiboot (official driver file). After reading, the
Insert image description here
Insert image description herecorresponding CM4 disk will be displayed on the computer.


Create a file in your free disk Raspi.img. You can create it by creating a new text and modifying the suffix name.

Insert image description here

Insert image description here

Open Win32DiskImager_v1.0, select the img file and CM4 disk

Insert image description here
Here we choose 读取, which means writing the Raspberry Pi system into img. Mine is about 8G, and the reading time is about 15 minutes.

It should be noted here: the method we use for mirroring is non-compressed.
In other words, the size of our image will be as big as the Raspberry Pi disk.
For example: CM4 is divided into bootfs partition 256M and rootfs partition 7.7G. But the actual usage of our rootfs is actually only 1G.
Using this method to create a mirror image, it is a copy of the original model. This means that when we burn a custom image later, we can only use 大于等于the TF card or EMMC that stores it. At the same time, if the img file is too large, the burning time will be relatively long.

But this method is very simple, just click the mouse. It does not involve some partition IDs, expansion, compression, etc.
In terms of convenience, it’s still pretty good.


3. Burn the image

Burning the image is also very simple, as shown in the figure below.
Insert image description here
The writing time is about 8 minutes

After completion, you can unplug the TF card and insert it into the TF card slot on the bottom of the Raspberry Pi to restore the configuration one by one.


4. Summary

This blog is mainly about improving productivity, and the content is relatively simple.
I originally made img according to the previous method of making tf startup card under Linux, but found that there were still many problems.
Later, I used the win32 disk imaging tool, which although takes a little space, is very convenient.
Here is a record for readers who have the same problem to learn from.

Guess you like

Origin blog.csdn.net/Edwinwzy/article/details/132764164