Skip to content

Make your own 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.

  1. touch /mnt/tmp/firstboot
    > ~/.bash_history
    
  2. Firstly, use the gparted software to open the SD card of the image you want to create. Use gparted to 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. Image title

  3. Next, use the fdisk command to view the size of the available space, as shown in the following image, which is 10151935. Image title

  4. Then, use the dd command to write to an empty img file. Set the count value to be greater than the size of the volume end obtained from fdisk by at least 1.

touch blikvm-armbian-v4-20230623.img
sudo dd if=/dev/sdb of=./blikvm-armbian-v4-20230623.img bs=512 count=10151936
  1. Wait for the dd command to finish executing.

Last update: November 28, 2024
Created: November 13, 2022