Skip to content

Flashing an SD Card

After a successful build, the output images are in:

build/tmp/deploy/images/<machine>/

Image Formats

Depending on the BSP version, the generated image may have different extensions:

Extension Description
.wic.zst Compressed with Zstandard (most recent)
.wic.gz Compressed with gzip
.wic.bz2 Compressed with bzip2
.wic Uncompressed WIC image
.raw Raw disk image
.sdcard Legacy format (older BSP releases)

Check what's present in the deploy directory:

ls -lh build/tmp/deploy/images/<machine>/

Identify the SD Card Device

Selecting the wrong device will permanently destroy data

Always verify the device path before running dd.

lsblk

Insert the SD card and run lsblk again — the new device is your SD card.

sda      232G   disk    ← host disk, do not touch
sdb       32G   disk    ← SD card
└─sdb1    32G   part

Use the disk device (e.g. /dev/sdb), not a partition (not /dev/sdb1).


Flash the SD Card

zstdcat -cd <image>.wic.zst | sudo dd of=/dev/sdX bs=10M status=progress && sync
gzip -dc <image>.wic.gz | sudo dd of=/dev/sdX bs=10M status=progress && sync
bzcat <image>.wic.bz2 | sudo dd of=/dev/sdX bs=10M status=progress && sync
sudo dd if=<image>.wic of=/dev/sdX bs=10M status=progress && sync

Replace /dev/sdX with your actual SD card device.

Graphical alternative

BalenaEtcher handles all compressed formats automatically.
Download from balena.io/etcher.