To build an image containing read-only rootfs add the following changes to the
IMAGE_FEATURES = "read-only-rootfs"
You can read more about this feature in the Yocto Project Mega-Manual - 7.27. Creating a Read-Only Root Filesystem
This feature is highly package dependent and even if Mender works correctly when this feature is enabled there might be other packages in your image that expect the root filesystem to be writable and might not function properly. We recommend testing this feature as Mender will gradually move to support read-only root filesystem by default in the future.
If you do not want Mender to run as a system service, and you prefer to carry out update steps manually using the command line client interface, you can disable the service that starts Mender at boot.
This is simple to accomplish by adding a
recipes-mender/mender/mender_%.bbappend file in your Yocto Project layer, with the following content:
SYSTEMD_AUTO_ENABLE = "disable"
In this case it is also possible to avoid Mender's current dependency on systemd. If you do not wish to enable systemd in your build, add the following to
MENDER_FEATURES_DISABLE_append = " mender-systemd"
Also, you do not need any daemon-related configuration items in your
local.conf as outlined in the section on configuring the Yocto Project build.
If you disable Mender running as a daemon under
systemd, you must run all required Mender commands from the CLI or scripts. Most notably, you need to run
mender -commit after booting into and verifying a successful deployment. When running in managed mode, any pending
mender -commit will automatically be run by the Mender daemon after it starts. See Modes of operation for more information about the difference.
You can configure how frequently the Mender client will make requests to the Mender server as described in Polling intervals before starting the build process.
In order to do this, change the following in the file
MENDER_UPDATE_POLL_INTERVAL_SECONDS ?= "1800" MENDER_INVENTORY_POLL_INTERVAL_SECONDS ?= "28800"
If the client should connect to a different address than the default of
https://docker.mender.io/, then you should specify this variable in your
MENDER_SERVER_URL = "https://my-mender-server.net/"
Port numbers can be specified in the same way as you would in a browser, as a colon after the address followed by the number, for example
Note that the
https protocol specifier is required in the address. For security reasons, Mender does not support the plaintext
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