Artifact install failed - “No match between boot and root partitions”

Hi community,

I’m working on integrating Mender OTA into a Toradex Apalis iMX8 board using the Yocto-based image tdx-reference-multimedia-image (Toradex Yocto 5.7 / kirkstone). The image builds successfully and I can deploy it via the Mender server, but the update fails during installation with the following log:
info: Running Mender client version: 3.5.3
info: State transition: update-fetch [Download_Enter] → update-store [Download_Enter]
info: No public key was provided for authenticating the artifact
info: Output (stderr) from command “fw_printenv”: Cannot read environment, using default
info: Output (stderr) from command “fw_printenv”: Cannot read default environment from file
error: Artifact install failed: Payload: can not install Payload: Apalis-iMX8_Reference-Multimedia-Image.ext4: No match between boot and root partitions.: exit status 243

What I have configured:

Enable Mender features

MENDER_FEATURES_ENABLE:append = " mender-uboot mender-image mender-image-sd"
MENDER_FEATURES_DISABLE:append = " mender-grub mender-image-uefi"

Mender Artifact info

MENDER_ARTIFACT_NAME = “scooter-v1.0”

Mender and Toradex Tezi integration

INHERIT += “mender-toradex”
IMAGE_CLASSES += “image_type_mender_tezi”
IMAGE_FSTYPES:append = " mender_tezi"
IMAGE_FSTYPES:remove = " teziimg"

Remove files from boot partition that are loaded by Mender

from the root partitions; this allows the files to be updated OTA

#IMAGE_BOOT_FILES:remove:mender-uboot = “zImage ${KERNEL_DEVICETREE} overlays.txt overlays/*;overlays/”

MENDER_IMAGE_BOOTLOADER_BOOTSECTOR_OFFSET = “0”
DISTRO_FEATURES:append = " systemd"
VIRTUAL-RUNTIME_init_manager = “systemd”
DISTRO_FEATURES_BACKFILL_CONSIDERED = “sysvinit”
VIRTUAL-RUNTIME_initscripts = “”

Settings for apalis-imx8

MENDER_IMAGE_BOOTLOADER_BOOTSECTOR_OFFSET:apalis-imx8 = “0”
MENDER_BOOT_PART_SIZE_MB:apalis-imx8 = “64”
OFFSET_SPL_PAYLOAD:apalis-imx8 = “”
MENDER_STORAGE_DEVICE:apalis-imx8 = “/dev/mmcblk0”
MENDER_STORAGE_TOTAL_SIZE_MB:apalis-imx8 = “4096”
KERNEL_DEVICETREE:apalis-imx8 = “freescale/imx8qm-apalis-v1.1-ixora-v1.2.dtb”
MENDER_BOOT_PART = “${MENDER_STORAGE_DEVICE_BASE}1”
MENDER_DATA_PART = “${MENDER_STORAGE_DEVICE_BASE}4”
MENDER_ROOTFS_PART_A = “${MENDER_STORAGE_DEVICE_BASE}2”
MENDER_ROOTFS_PART_B = “${MENDER_STORAGE_DEVICE_BASE}3”
MENDER_UBOOT_AUTO_CONFIGURE = “1”

Append the Mender provided bootargs to tdxargs

the Toradex boot.scr will overwrite bootargs so we stash the context in tdxargs

MENDER_UBOOT_POST_SETUP_COMMANDS:append = " ; setenv tdxargs ${tdxargs} ${bootargs}; "

Make sure the Toradex boot script finds the overlays and overlays.txt file in

the /boot directory of the rootfs partition

MENDER_UBOOT_POST_SETUP_COMMANDS:append = " ; setenv overlays_file /boot/overlays.txt ; setenv overlays_prefix boot/overlays/ "

serveur

MENDER_SERVER_URL = “https://eu.hosted.mender.io
MENDER_TENANT_TOKEN = “my-server-token”
MENDER_DEMO_HOST_IP_ADDRESS = “my-adress-ip”

bitbake -e confirms correct values:

MENDER_BOOT_PART="/dev/mmcblk0p1"

MENDER_ROOTFS_PART_A="/dev/mmcblk0p2"

MENDER_ROOTFS_PART_B="/dev/mmcblk0p3"

MENDER_DATA_PART="/dev/mmcblk0p4"

The problem:

When an OTA update is triggered, it downloads the artifact correctly.

But it fails during the installation step with this error:

Payload: can not install Payload: … No match between boot and root partitions.

Also, fw_printenv gives errors:

Cannot read environment, using default
Cannot read default environment from file

My goal:

Get artifact updates to apply correctly on the Apalis iMX8.

Ensure U-Boot is Mender-compatible and that fw_env.config is configured properly.

Resolve the “No match between boot and root partitions” error.

Any help or guidance would be greatly appreciated!

Hi, I’m the Toradex AI Assistant.

I might make mistakes. Our support team will step in if needed. If I answered your question, please tick the “Solution” checkbox. For follow-up questions to me, please use @ToradexAI in your post.

Did you like my answer? :+1: :-1:


Hello! Thank you for providing such a detailed summary of your setup and the issues you are encountering. Let’s address the main problem: the failure of the Mender OTA update on your Apalis iMX8 with the error involving boot and root partition mismatch and issues with fw_printenv.

Key Issue Overview

  • Mender “No match between boot and root partitions.”
    This error generally indicates Mender cannot determine or access the correct boot and root partitions, usually because the U-Boot environment is either not written/read properly or the fw_env.config is misconfigured.

  • fw_printenv errors (“Cannot read environment, using default”)
    This points to a problem in accessing U-Boot environment variables from Linux. Frequently, the configuration file or device node is incorrect.


1. Check /etc/fw_env.config

For Apalis iMX8 (eMMC-based), /etc/fw_env.config must be set for the eMMC’s boot area (not the standard partition).
The correct contents should be exactly:

/dev/mmcblk2boot0 -0x2200 0x2000
  • Ensure /dev/mmcblk2boot0 exists on your board (otherwise, adjust according to the correct device under /dev/).
  • Do not use /dev/mmcblk0p1, as this is the standard first partition, not the eMMC boot area U-Boot uses for the environment.

More detail:


2. File Permissions and Running as Root

Both fw_printenv and fw_setenv must be executed with root privileges. On your deployed system, try:

sudo fw_printenv

If you are using Torizon or another locked-down setup, root access (or sudo) is necessary.

See:


3. eMMC Boot Are Read-Only by Default

By default, eMMC boot partitions are read-only. To program the U-Boot environment (especially when first setting up or debugging), you might need to make them writable temporarily:

echo 0 > /sys/block/mmcblk2boot0/force_ro

(Remember to set it back to 1 if you wish to return to the read-only behavior.)

Reference:


4. Revisit Yocto Mender Settings

Your Yocto variables look reasonable, but you MUST ensure that your U-Boot is built with Mender integration and that U-Boot itself is flashed to the correct location on the device. Sometimes problems arise because the running U-Boot is not compatible with Mender or is not able to read the environment from the location you’ve configured.

Double-check you have:

  • INHERIT += "mender-toradex"
  • All partition variables set as you show (looks good)

The “No match between boot and root partitions” usually means Mender couldn’t query the environment, so fixing the fw_env.config issue should solve this error as well.


5. Next Steps

  • Correct /etc/fw_env.config (as above) and redeploy.
  • Reboot, then check sudo fw_printenv and you should NOT see the “Cannot read environment” error.
  • Re-attempt the OTA update.

If you encounter new errors after these steps, please share the specific output so I can assist further.


References

Best regards, Toradex AI Assistant.

Hi @ranim!

Thanks for reaching out!

Since we already offer Torizon Cloud—which provides online/offline updates, device monitoring, remote access, fleet management, and more—we’ve focused our efforts there rather than supporting other update mechanisms.

By choosing Torizon OS and Torizon Cloud, you get all these features out of the box, without the added complexity of maintaining a custom BSP for your device.

That said, at the moment we don’t have any plans to support third-party OTA tools in the near future. So, for more experienced and focused support, I would suggest asking on Mender’s forum.

Let us know if you have any other questions.

Best regards.