# Running on x86

**URL:** <https://hub.mender.io/t/running-on-x86/2800>\
**Category:** General Discussions\
**Tags:** yocto\
**Created:** [November 9, 2020, 5:26pm UTC](https://hub.mender.io/t/running-on-x86/2800 "2020-11-09T17:26:28Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![malveo](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/malveo/32/704_2.png) [@malveo](https://hub.mender.io/u/malveo)\
**Post date:** [November 9, 2020, 5:26pm UTC](https://hub.mender.io/t/running-on-x86/2800/1 "2020-11-09T17:26:28Z")

</div>

Hello,

We are running Mender on Yocto Dunfell, months ago we had integrated an old x86 (32bit) device with this following local.conf configuration:

```auto
INHERIT += "mender-full"
MENDER_STORAGE_TOTAL_SIZE_MB = "6144"
MENDER_BOOT_PART_SIZE_MB = "256"
MENDER_DATA_PART_SIZE_MB = "2048"
MENDER_STORAGE_DEVICE = "/dev/sda"
MENDER_FEATURES_ENABLE_append = "mender-image-bios mender-grub mender-bios"
MENDER_FEATURES_DISABLE_append = "mender-image-uefi"

```

and it works smoothly, but by building a new image today, we get this error:

```auto
INFO: Creating image(s)...
ERROR: unrecognized bootimg-efi loader:
WARNING: exit cod 1 from a shell command.

```

also with:

```auto
INHERIT += "mender-full-bios"

```

without MENDER\_FEATURES\_ENABLE\_append and MENDER\_FEATURES\_DISABLE\_append.

produce the same issue.

Please share how to set the correct features to boot on a 32bit Intel class system.

Thank you.

Best,  
Mauro

---

<div class="post-metadata">

**Author:** ![mirzak](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/mirzak/32/2056_2.png) [@mirzak](https://hub.mender.io/u/mirzak)\
**Post date:** [November 10, 2020, 10:28am UTC](https://hub.mender.io/t/running-on-x86/2800/2 "2020-11-10T10:28:50Z")

</div>

Hi @malveo.

The error is new to me, and not yet clear what the root cause is.

Which revision of the `dunfell` branch are you using for meta-mender? What would be interesting to know if it is [this PR](https://github.com/mendersoftware/meta-mender/pull/1110) that introduced an regression?

Can you test reverting meta-mender to `71286ec47fe856179f9aa1bf7f6445c1db4e640c` which would be before mentioned PR was merged.

Also could you test with the changes in [this PR](https://github.com/mendersoftware/meta-mender/pull/1175)? Primarily the first commit that is interesting and that could be related to your problem…

---

<div class="post-metadata">

**Author:** ![malveo](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/malveo/32/704_2.png) [@malveo](https://hub.mender.io/u/malveo)\
**Post date:** [November 10, 2020, 2:19pm UTC](https://hub.mender.io/t/running-on-x86/2800/3 "2020-11-10T14:19:51Z")

</div>

Hi @mirzak,

Thank you, tested reverting to `71286ec47fe856179f9aa1bf7f6445c1db4e640c`, build successfully and boot.

Tested with `master` + PR `1175` same issue:

```auto
INFO: Creating image(s)...
ERROR: unrecognized bootimg-efi loader:
WARNING: exit code 1 from a shell command.

```

Best,  
Mauro

---

<div class="post-metadata">

**Author:** ![drewmoseley](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/drewmoseley/32/47_2.png) [@drewmoseley](https://hub.mender.io/u/drewmoseley)\
**Post date:** [November 10, 2020, 7:33pm UTC](https://hub.mender.io/t/running-on-x86/2800/4 "2020-11-10T19:33:34Z")

</div>

Hi @malveo where are you seeing this issue? Is this a _build_ failure? Can you provide a more thorough build log?

---

<div class="post-metadata">

**Author:** ![malveo](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/malveo/32/704_2.png) [@malveo](https://hub.mender.io/u/malveo)\
**Post date:** [November 11, 2020, 9:00am UTC](https://hub.mender.io/t/running-on-x86/2800/5 "2020-11-11T09:00:58Z")

</div>

Hi @drewmoseley -

Yes, it is a build failure, here the full log:

> <https://gist.github.com/malveo/99dc05076303aaa2ce46c9a5cc69d1d1>

Thank you,  
Mauro

---

<div class="post-metadata">

**Author:** ![drewmoseley](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/drewmoseley/32/47_2.png) [@drewmoseley](https://hub.mender.io/u/drewmoseley)\
**Post date:** [November 11, 2020, 2:16pm UTC](https://hub.mender.io/t/running-on-x86/2800/6 "2020-11-11T14:16:13Z")

</div>

Can you provide the contents of `/home/5267d0dea6/yocto/layers/custom/meta-customer/meta-customer-distro/recipes-extended/images/customer-image.bb:do_image_wic`

And also the output of `bitbake -e customer-image`?

---

<div class="post-metadata">

**Author:** ![malveo](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/malveo/32/704_2.png) [@malveo](https://hub.mender.io/u/malveo)\
**Post date:** [October 1, 2021, 4:08pm UTC](https://hub.mender.io/t/running-on-x86/2800/7 "2021-10-01T16:08:16Z")

</div>

Thank you @drewmoseley

Sorry for replaying you back after all these months. I’ve restarted working on x86 devices with Mender in the last few days.

This issue appear with this commit:

> <https://github.com/mendersoftware/meta-mender/commit/a9ab4f0eab023b0dd1c73150c78b4e75c39a2d01#diff-f995dd904f5246c2b1dd9032812ad79d8888feebba16b6836ab6f97f88562bf8>
>
> Changelog: None
> Signed-off-by: Drew Moseley \<drew.moseley@northern.tech\>

and was enforced with this one:

> <https://github.com/mendersoftware/meta-mender/commit/f03d7426e83e15bd379968026967ed5b4d51c76a#diff-f995dd904f5246c2b1dd9032812ad79d8888feebba16b6836ab6f97f88562bf8>
>
> Use stronger \`EFI\_PROVIDER\` assignment if related classes are set.
> Since a defau…lt has already been set in some layers, and \`?=\`
> assignments work in a first-one-counts fashion, our values do not
> propogate if we use \`?=\`.
> 
> The original motivation and discussion for this fix is here:
> https://hub.mender.io/t/simple-configuration-dunfell/2991/28
> 
> Changelog: Title
> 
> Signed-off-by: Kristian Amlie \<kristian.amlie@northern.tech\>
> (cherry picked from commit e71a2f98ea46b4a10e78604079c4f9092f687356)

that introduces default values for EFI\_PROVIDER if some features of Mender are enabled or disables.

If ‘mender-grub’ is enabled, EFI\_PROVIDER is set to ‘grub-efi’, but if mender-grub + mender-bios are set, EFI\_PROVIDER is ‘null’.

Building an image using ‘mender-full-bios’ class, enable both feature “mender-grub + mender-bios” in `meta-mender-core/classes/mender-setup-grub.inc`

```auto
MENDER_FEATURES_ENABLE_append_x86 = " mender-image-bios mender-grub mender-bios"

```

the combo `mender-grub + mender-bios`, set EFI\_PROVIDER to null, this consequently trigger an issue when wic is invoked because during the build process on `do_image_wic` is used the kickstart file `genericx86.wks` (from `./meta-yocto-bsp/wic/genericx86.wks.in`), that inside, use a reference of EFI\_PROVIDER as argument for the loader var.

```auto
part /boot --source bootimg-efi --sourceparams="loader=${EFI_PROVIDER}" --ondisk sda --label msdos --active --align 1024

```

And this triggers the error at build-time:

```auto
INFO: Creating image(s)...
ERROR: unrecognized bootimg-efi loader:
WARNING: exit code 1 from a shell command.

```

the delta betwheen bitbake -e on `dunfell` and on the `commit:71286ec47fe856179f9aa1bf7f6445c1db4e640c`, confirm the  
analisys above, EFI\_PROVIDER is ‘null’ .

[dunfell · GitHub](https://gist.github.com/malveo/22112763a7b3952248d3cd710c0c78e9) (dunfell)  
[71286ec47fe856179f9aa1bf7f6445c1db4e640c · GitHub](https://gist.github.com/malveo/e6ab638f59fd9eb50cc9c1da5a1adc81) (71286ec47fe856179f9aa1bf7f6445c1db4e640c)

Using `mender-full-bios` and removing `mender-bios` from `MENDER_FEATURES_ENABLE` fix the issue.

Please do some sanity check around `mender-full-bios.class`.

Best,  
Mauro

---

<div class="post-metadata">

**Author:** ![malveo](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/malveo/32/704_2.png) [@malveo](https://hub.mender.io/u/malveo)\
**Post date:** [October 5, 2021, 2:24pm UTC](https://hub.mender.io/t/running-on-x86/2800/8 "2021-10-05T14:24:01Z")

</div>

@drewmoseley just un update and errata corrige.

`mender-bios` is needed for a bootable artifact. It installs the grub bootloader on the resulting image, and with this commit.

> <https://github.com/mendersoftware/meta-mender/commit/f03d7426e83e15bd379968026967ed5b4d51c76a>
>
> Use stronger \`EFI\_PROVIDER\` assignment if related classes are set.
> Since a defau…lt has already been set in some layers, and \`?=\`
> assignments work in a first-one-counts fashion, our values do not
> propogate if we use \`?=\`.
> 
> The original motivation and discussion for this fix is here:
> https://hub.mender.io/t/simple-configuration-dunfell/2991/28
> 
> Changelog: Title
> 
> Signed-off-by: Kristian Amlie \<kristian.amlie@northern.tech\>
> (cherry picked from commit e71a2f98ea46b4a10e78604079c4f9092f687356)

in conjunction with the default wks file from poky, the build always fail. The only workaround possible is to provide a custom wks file with hardcoded --sourceparams=“loader=grub-EFI”, because EFI\_PROVIDER variable is null.

Best,  
Mauro

---

<div class="post-metadata">

**Author:** ![drewmoseley](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/drewmoseley/32/47_2.png) [@drewmoseley](https://hub.mender.io/u/drewmoseley)\
**Post date:** [October 5, 2021, 4:00pm UTC](https://hub.mender.io/t/running-on-x86/2800/9 "2021-10-05T16:00:21Z")

</div>

Hi @malveo,

I’m not quite following what needs to change here. Can you provide a detailed setup of how to replicate the reported issue when building with mender-bios? Ideally if you can provide a pull request that fixes the issue that would be great since I don’t really work with the EFI code much at present.

Drew

---

<div class="post-metadata">

**Author:** ![kacf](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/kacf/32/146_2.png) [@kacf](https://hub.mender.io/u/kacf)\
**Post date:** [October 6, 2021, 6:29am UTC](https://hub.mender.io/t/running-on-x86/2800/10 "2021-10-06T06:29:38Z")

</div>

I’m also not quite following. EFI and BIOS setups are mutually incompatible, both can’t be used at the same time. Using `EFI_PROVIDER` in a recipe is a mistake, since there isn’t one when `mender-bios` is enabled. Are you sure you don’t just need to add this:

```auto
IMAGE_FSTYPES_remove = "wic wic.bmap"

```

---

<div class="post-metadata">

**Author:** ![malveo](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/malveo/32/704_2.png) [@malveo](https://hub.mender.io/u/malveo)\
**Post date:** [October 6, 2021, 2:04pm UTC](https://hub.mender.io/t/running-on-x86/2800/11 "2021-10-06T14:04:56Z")

</div>

Thank you @kacf and @drewmoseley for the hint.
