Make Image
When you have made modifications to an image and want to create your own image, you can follow the steps below on Linux to create a minimal image.
touch /mnt/tmp/firstboot
> ~/.bash_history
-
Firstly, use the
gpartedsoftware to open the SD card of the image you want to create. Usegpartedto partition the unused space and set it as unallocated. This ensures that this portion of empty space without any valid content is not included in the image creation.
-
Next, use the
fdiskcommand to view the size of the available space, as shown in the following image, which is 10151935.
-
Then, use the
ddcommand to write to an empty img file. Set thecountvalue to be greater than the size of the volume end obtained fromfdiskby at least 1.
touch blikvm-armbian-v4-20230623.img
sudo dd if=/dev/sdb of=./blikvm-armbian-v4-20230623.img bs=512 count=10151936
- Wait for the
ddcommand to finish executing.