Installing mender-agent.pem


I’m trying to support device pre-authorization and in documentation is written to deploy private key to /data/mender/mender-agent.pem. I’m using poky rocko but it seems it doesn’t work (verify final image and in /data/mender but file was not there). Checked bit mender classes and one seems to wipe out data and copy e.g. device_identity and so on. any idea how to make it working or am I missing something obvious ? :slight_smile: Thanks.

With /data/mender/ it is meant to store this on the persistent data partition and I think on rocko you would need to use the “old method” of installing files to the data partition.

Example is here:

You also need to add MENDER_DATA_PART_DIR_append = "${DEPLOY_DIR_IMAGE}/persist" somewhere.

On newer branches there is no “special handling” and installing to /data would convert it to the data partition.

1 Like

Thanks @mirzak I completely forgot about that (most of other stuff is running on newer mender yocto release) :+1:

1 Like