Differences between "mender-convert" and "mender-artifact"

I am new to Mender, studied the documentation (looking humbly on the great work being done with this project) and standing on the threshold now to start my 1st Snapshot/Golden Image with RaspbianLite on a Raspberry CM3 module. To avoid unnecessary work I would like to ask the experienced folks here about the following two aspects which I did not really understand:

  1. What is the difference between “mender-convert” and “mender-artifact” (especially comparing input, output and actions of both tools) ? As far as I understand, “mender-convert” generates all the required partitions from the Golden Image in an .img-File while “mender-artifact” (.mender) wouldn’t do this ? Does mender-convert also generate a “/data” partition, not only boot and rootfs A/B ?

  2. What is the intended way to keep settings in OS configuration files like /etc/networks or /etc/hosts (which are normally stored in the rootfs and not in /data partition) after updates ? Is this functionality (which should be a common task with every implementation) by default covered by one of the above outputs (*.img or *.mender) or is a “homebrewn” solution required for such things ?


After more detailed examination of the documentation I found the answer myself:

  1. I think *.mender artifacts (generated with “mender-artifact”) don’t contain a data partition. Only complete partitioned images (like *.img, *.sdimg, generated with mender-convert) will contain a “/data” partition.
  2. Generating symlinks on my own for each config file are the intended way to preserve such data

I think *.mender artifacts (generated with “mender-artifact”) don’t contain a data partition. Only complete partitioned images (like *.img, *.sdimg, generated with mender-convert) will contain a “/data” partition.

Correct, mender-artifact is the tool to generate the update Artifacts and is not a way to generate disk images etc.

mender-convert will,

  • provide the bootloader integration required by Mender
  • install the Mender client on your golden image
  • generate the appropriate partition tables and filesystem images
  • produce a Mender Artifact (.mender) file using mender-convert

Generating symlinks on my own for each config file are the intended way to preserve such data

Yes, this would the recommendation as we do not provide a “canned” solution for this.