# Mender Client 3.5 on Yocto Scarthgap

**URL:** <https://hub.mender.io/t/mender-client-3-5-on-yocto-scarthgap/6946>\
**Category:** General Discussions\
**Tags:** yocto, mender-client, grub\
**Created:** [June 11, 2024, 4:27pm UTC](https://hub.mender.io/t/mender-client-3-5-on-yocto-scarthgap/6946 "2024-06-11T16:27:36Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![cveilleux](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/cveilleux/32/307_2.png) [@cveilleux](https://hub.mender.io/u/cveilleux)\
**Post date:** [June 11, 2024, 4:27pm UTC](https://hub.mender.io/t/mender-client-3-5-on-yocto-scarthgap/6946/1 "2024-06-11T16:27:36Z")

</div>

Thanks for the initial scarthgap support. We are experimenting with [GitHub - TheYoctoJester/meta-mender at scarthgap](https://github.com/TheYoctoJester/meta-mender/tree/scarthgap) at the moment.

The biggest issue seems to be the default in scarthgap is the c++ based mender client 4.0.

I’ve worked around by pinning mender-client to 3.5.2 in my local.conf:

```auto
PREFERRED_VERSION_mender-client = "3.5.2"
PREFERRED_PROVIDER_mender-native = "mender-client-native"
PREFERRED_RPROVIDER_mender-auth = "mender-client"
PREFERRED_RPROVIDER_mender-update = "mender-client"

```

just sharing here because the client re-re-name from mender-client to mender (again??) requires the non-obvious PREFERRED\_PROVIDERs as well as PREFERRED\_VERSION.

---

<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:** [June 12, 2024, 1:20pm UTC](https://hub.mender.io/t/mender-client-3-5-on-yocto-scarthgap/6946/2 "2024-06-12T13:20:01Z")

</div>

Hi @cveilleux,

Thanks for sharing the snippet! Yes indeed, currently this is a way “backwards”. Any specific reason why you are selecting 3.5.x, though?

Greets,  
Josef

---

<div class="post-metadata">

**Author:** ![cveilleux](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/cveilleux/32/307_2.png) [@cveilleux](https://hub.mender.io/u/cveilleux)\
**Post date:** [June 12, 2024, 10:12pm UTC](https://hub.mender.io/t/mender-client-3-5-on-yocto-scarthgap/6946/3 "2024-06-12T22:12:10Z")

</div>

To be honest I assumed an update from mender-client 3 to the c++ mender 4 was simply not supported because it failed when I tried.

i just gave it another shot to collect more details…

Our use case is that we have intel machines using grub, currently running kirkstone/mender-client 3.5.2.

When I attempt to upgrade to a scarthgap/mender 4.0.2 using your in-progress branch, we get an error on the grub screen:

```auto
The environment is corrupt. Trying to boot from (rootfs b) in 10 seconds, but this is not guaranteed to be a valid partition...

```

ref: [grub-mender-grubenv/04\_mender\_setup\_env\_functions\_grub.cfg at master · mendersoftware/grub-mender-grubenv · GitHub](https://github.com/mendersoftware/grub-mender-grubenv/blob/master/04_mender_setup_env_functions_grub.cfg#L132)

We then luckily boots into the scarthgap rootfs, but then `mender-update commit` complains there is nothing to commit.

`mender-update show-artifact` shows `unknown`.

A reboot then rolls back to the kirkstone/mender 3.5.2 version.

If I pin mender-client to 3.5.2 with the above configs, everything works flawlessly. We can install, reboot then commit using the normal process. We can also go back to kirkstone without problems.

If it has an impact, we are using the mender-partuuid feature.

---

<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:** [June 13, 2024, 7:08am UTC](https://hub.mender.io/t/mender-client-3-5-on-yocto-scarthgap/6946/4 "2024-06-13T07:08:49Z")

</div>

@cveilleux thanks for the detailed description. That definitely should not happen ☹ Are there any specialities in the boot flow, or is it a mostly generic x86-grub setup?

Greetz,  
Josef

---

<div class="post-metadata">

**Author:** ![cveilleux](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/cveilleux/32/307_2.png) [@cveilleux](https://hub.mender.io/u/cveilleux)\
**Post date:** [June 13, 2024, 1:07pm UTC](https://hub.mender.io/t/mender-client-3-5-on-yocto-scarthgap/6946/5 "2024-06-13T13:07:12Z")

</div>

It’s a straight intel/mender/grub flow. We have not customized it, other than enabling mender-partuuid feature.

Since you are confirming it should be working, I will run more tests and gather more debug output.

I will update this thread once I figure it out.
