After building a Mender Yocto Project image, you need to write the disk image to the flash of the device.
Depending on the build configuration the disk image will have one of the following
Sometimes the image is compressed in which case there may be an additional
.zip suffix. If the image is compressed, you need to
uncompress it first with one of the commands below:
# For gz compressed images. gunzip <IMAGE-NAME>.img.gz # For xz compressed images. unxz <IMAGE-NAME>.img.xz # For zip compressed images. unzip <IMAGE-NAME>.img.zip
In this initial provisioning you will flash and overwrite everything on the given device storage.
There are several methods to flash storage, and the simplest case is if your device uses a SD card. Currently, this is the approach we assume you take here, but the same disk image file can be used to flash any block device. See Flash memory types for a clarification of what is meant by block device in this context.
Be careful! If you point to the wrong
<DEVICE> when executing the command below, you risk overwriting your workstation's local or connected storage devices.
Assuming you are in the same directory as your disk image, you can write it to
the the SD card using the following command (
sdimg is used as an example):
sudo dd if=<PATH-TO-IMAGE>.sdimg of=<DEVICE> bs=1M && sudo sync
This may take a few minutes, depending on the size of the image.
Found errors? Think you can improve this documentation? Simply click the Edit link at the top of the page, and then the icon on Github to submit changes.
© 2020 Northern.tech AS