What to do with a Linux OS microSD image file?

I don't use that board but the logic is that, you need to extract the compressed image (.xz) by

unxz image_file.img.xz

The image file should contain all you need (Linux File system, Kernel, ....)

Then locate your SD card by fdisk -l. If you are using micro-sd adapter, then it could be linked as /dev/mmcblk or if you are using USB-SD converter, the device name might be linked as /dev/sdb. (if you see sdb1 sdb2, etc., they refer the 1st partition, 2nd partition ...)

Make sure that the SD card (and any partition) is not mounted, you should use umount -a or umount /dev/sdb1 (2/3 ... for the partitions), otherwise you may need to deal further problems

then you can load the image to the SD card by

dd if=imagefile.img of=/dev/sdb bs=4M conv=fsync

when the process finishes, you can eject the SD card and place it into the board. Then power the board.


Here is the actual best way. In one step:

xz -dc yourthing.xz | dd of=/dev/sdX bs=4M

Make sure you get the right device for /dev/sdX (fdisk -l).

BONUS EDIT: To get output from dd, run this in another terminal:

while pkill -USR1 dd 2>/dev/null; do sleep 5; done

Use xz to extract the .img file, then use dd to write it directly to the card.


the right steps:

xz -d nameofimage.img.xz

fdisk -l (see which letter yours cd card has)

umount dev/sdX (replace X with the letter)

A good step is always to clear your destination media first! dd if=/dev/zero of=/dev/sdX bs=4M

sudo dd if=nameofimage.img of=/dev/sdX bs=4M

sync (important)