Skip to content

Latest commit

 

History

History
50 lines (34 loc) · 2.72 KB

File metadata and controls

50 lines (34 loc) · 2.72 KB
title taxonomy
Provisioning a new device
category
docs

After downloading one of the Mender demo images, building a Mender Yocto Project image or converting existing debian images for the first time, you need to write the storage image to the flash of the device.

!!! The Mender sdimg generator, which is part of meta-mender, generates disk images with exactly four partitions: one boot, two rootfs and one data partition. It is intended as a reference implementation for testing and simple production use. For more advanced use cases, please refer to your board's tools for generating disk images and flashing storage, such as imx-loader, mfg-tool, and tegrarcm.

Prerequisites

A disk image for the device storage

You need an image file to flash to the entire storage of the device. meta-mender-core creates these files with a .sdimg suffix, so they are easy to recognize. This file contains all the partitions of the given storage device, as described in Partition layout.

A physical device to provision that uses SD cards

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 .sdimg 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.

Write the disk image to the SD card

!! 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 .sdimg, you can write the sdimg to the SD card using the following command:

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.

!!! <DEVICE> depends on where your SD card is placed. Normally this would be something like /dev/mmcblk0 or /dev/sdb. If you are unsure how to find the correct device, the Raspberry Pi Foundation provides some nice references that can help you for Linux, Mac OSX, Windows.