# "Mounted root does not match boot loader environment" error with overlayroot setup

**URL:** <https://hub.mender.io/t/mounted-root-does-not-match-boot-loader-environment-error-with-overlayroot-setup/7911>\
**Category:** General Discussions\
**Tags:** mender-client, deltaupdate, overlay, system-update, rootfs\
**Created:** [July 22, 2025, 10:13am UTC](https://hub.mender.io/t/mounted-root-does-not-match-boot-loader-environment-error-with-overlayroot-setup/7911 "2025-07-22T10:13:53Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![adbjo](https://avatars.discourse-cdn.com/v4/letter/a/b9bd4f/32.png) [@adbjo](https://hub.mender.io/u/adbjo)\
**Post date:** [July 22, 2025, 10:13am UTC](https://hub.mender.io/t/mounted-root-does-not-match-boot-loader-environment-error-with-overlayroot-setup/7911/1 "2025-07-22T10:13:53Z")

</div>

When using the `overlayroot` package on Debian to mount a rw overlay on top of a ro rootfs, the rootfs update module fails with the following error:

```auto
"Mounted root does not match boot loader environment ($1)!"

```

See this line: [mender/support/modules/rootfs-image at 9fc5b2fec4b525ee045cc93c0a030d94aa308394 · mendersoftware/mender · GitHub](https://github.com/mendersoftware/mender/blob/9fc5b2fec4b525ee045cc93c0a030d94aa308394/support/modules/rootfs-image#L158)

Is this a bug? Does mender actually care about how the root is mounted after handing it over to the kernel / initramfs?

Can this check be disabled? Or can it be changed to instead check that the passive partition is not mounted?

Thanks!

---

<div class="post-metadata">

**Author:** ![adbjo](https://avatars.discourse-cdn.com/v4/letter/a/b9bd4f/32.png) [@adbjo](https://hub.mender.io/u/adbjo)\
**Post date:** [July 22, 2025, 11:03am UTC](https://hub.mender.io/t/mounted-root-does-not-match-boot-loader-environment-error-with-overlayroot-setup/7911/2 "2025-07-22T11:03:48Z")

</div>

Another option to check wether the active partition is the correct one could be to check what was passed to kernel via /proc/cmdline. Something like:

```auto
ROOT_DEVICE=$(findfs $(grep -o '\(^\| \)root=[^]*' /proc/cmdline | cut -d= -f2-))

```

---

<div class="post-metadata">

**Author:** ![adbjo](https://avatars.discourse-cdn.com/v4/letter/a/b9bd4f/32.png) [@adbjo](https://hub.mender.io/u/adbjo)\
**Post date:** [July 22, 2025, 1:19pm UTC](https://hub.mender.io/t/mounted-root-does-not-match-boot-loader-environment-error-with-overlayroot-setup/7911/3 "2025-07-22T13:19:45Z")

</div>

Put up a PR for the /proc/cmdline approach:

> <https://github.com/mendersoftware/mender/pull/1811>
>
> See topic in forum for background:
> https://hub.mender.io/t/mounted-root-does-no…t-match-boot-loader-environment-error-with-overlayroot-setup/7911

I assume the delta update module would need a similar fix?

---

<div class="post-metadata">

**Author:** ![TheYoctoJester](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/theyoctojester/32/1444_2.png) [@TheYoctoJester](https://hub.mender.io/u/TheYoctoJester)\
**Post date:** [July 25, 2025, 9:27am UTC](https://hub.mender.io/t/mounted-root-does-not-match-boot-loader-environment-error-with-overlayroot-setup/7911/4 "2025-07-25T09:27:43Z")

</div>

Hi @adbjo,

Thanks so much for the detailed analysis and follow up contribution. I’ve answered there, as I think the code is the main relevant thing here and we should focus on that.

Concerning the delta update module, I _think_ a similar patch might be useful, but can’t judge this right now. Deltas being a Pro+ feature, I would encourage to file this through [support@mender.io](mailto:support@mender.io) to get started, I’ll keep an eye open for it there and eventually poke the relevant folks then.

Greetz,  
Josef

---

<div class="post-metadata">

**Author:** ![nils\_z](https://avatars.discourse-cdn.com/v4/letter/n/cdc98d/32.png) [@nils\_z](https://hub.mender.io/u/nils_z)\
**Post date:** [July 10, 2026, 10:17am UTC](https://hub.mender.io/t/mounted-root-does-not-match-boot-loader-environment-error-with-overlayroot-setup/7911/5 "2026-07-10T10:17:54Z")

</div>

After updating to a commit with this PR included, the script fails because my system is missing `findfs`  
Is there a dependency missing to ensure findfs is available?

---

<div class="post-metadata">

**Author:** ![TheYoctoJester](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/theyoctojester/32/1444_2.png) [@TheYoctoJester](https://hub.mender.io/u/TheYoctoJester)\
**Post date:** [July 10, 2026, 6:42pm UTC](https://hub.mender.io/t/mounted-root-does-not-match-boot-loader-environment-error-with-overlayroot-setup/7911/6 "2026-07-10T18:42:48Z")

</div>

Hi @nils_z,

Good question indeed. Are you using `mender-convert`, Yocto, or something else completely?

Greetz,  
Josef
