To write the Armbian_community_25.2.0-trunk.377_Orangepizero_bookworm_current_6.6.72_minimal.img.xz file to the microSD card on an Arch Linux system, follow these steps carefully:
1. Identify the MicroSD Card
First, determine the device name of the microSD card.
Run the following command:
lsblk
This will list all storage devices. Look for the microSD card by identifying its size and partitions. It will likely appear as something like /dev/sdX or /dev/mmcblkX (e.g., /dev/sdb or /dev/mmcblk0). Be very careful to choose the correct device to avoid overwriting your main system.
2. Unmount the MicroSD Card
If any partitions of the microSD card are mounted, unmount them:
sudo umount /dev/sdX*
Replace /dev/sdX with the correct device name you identified earlier.
3. Write the Image to the MicroSD Card
Since the image is compressed as .xz, you can directly write it to the SD card using the xz and dd commands in a pipeline.
Run the following command:
xzcat Armbian_community_25.2.0-trunk.377_Orangepizero_bookworm_current_6.6.72_minimal.img.xz | sudo dd of=/dev/sdX bs=4M status=progress conv=fsync
Replace /dev/sdX with your microSD card’s device name. For example, if the microSD card is /dev/sdb, replace /dev/sdX with /dev/sdb.
Explanation of the command:
xzcat: Decompresses the.xzfile and streams the output.dd: Writes the decompressed image to the microSD card.of=/dev/sdX: Specifies the output device (your SD card).bs=4M: Sets the block size to 4 MB for faster writing.status=progress: Shows progress during the write process.conv=fsync: Ensures all writes are flushed to the card before the command completes.
4. Verify the Write (Optional)
To verify that the image was written correctly:
sudo sync
sudo dd if=/dev/sdX bs=4M count=10 | sha256sum
xzcat Armbian_community_25.2.0-trunk.377_Orangepizero_bookworm_current_6.6.72_minimal.img.xz | head -c $((4 * 1024 * 1024 * 10)) | sha256sum
Compare the hashes. If they match, the image was written successfully.
5. Remove the MicroSD Card
Once the write operation completes, safely remove the microSD card:
sudo sync
Then, physically remove the microSD card.
6. Boot Your Orange Pi Zero
Insert the microSD card into your Orange Pi Zero, power it on, and let it boot from the new image.