# Problems integrating on x86\_64 with GRUB Bootloader using Buildroot

**URL:** <https://hub.mender.io/t/problems-integrating-on-x86-64-with-grub-bootloader-using-buildroot/5911>\
**Category:** General Discussions\
**Tags:** x86, x86-grub, buildroot, grub\
**Created:** [June 13, 2023, 6:08am UTC](https://hub.mender.io/t/problems-integrating-on-x86-64-with-grub-bootloader-using-buildroot/5911 "2023-06-13T06:08:08Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Simnacher](https://avatars.discourse-cdn.com/v4/letter/s/47e85d/32.png) [@Simnacher](https://hub.mender.io/u/Simnacher)\
**Post date:** [June 13, 2023, 6:08am UTC](https://hub.mender.io/t/problems-integrating-on-x86-64-with-grub-bootloader-using-buildroot/5911/1 "2023-06-13T06:08:08Z")

</div>

Hello everybody,

we are currently trying to integrate and evaluate mender on our buildroot based board. In the board integration section, we mainly saw u-boot integrations that won’t work for our case.

Mender version: 3.4.0  
Buildroot version: 2023.02  
Board: x86\_64  
Bootloader: GRUB2

All mentioned requirements from the documentation are met and mender-grubenv package is activated.  
It seems like the script “fw\_setenv” is missing which is mentioned in the description of the mender Config.in file.

When trying to install an update, we receive errors like

```bash
**ERRO[0008] fw_setenv returned failure: exit status 1**
**ERRO[0008] Failed to probe the U-Boot environment for which separator to use. Got error: exit status 1**

```

Is there a flag or a variable that eneds to be set in order to use GRUB with the buildroot mender package?

---

<div class="post-metadata">

**Author:** ![lramirez](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/lramirez/32/1195_2.png) [@lramirez](https://hub.mender.io/u/lramirez)\
**Post date:** [June 15, 2023, 11:02pm UTC](https://hub.mender.io/t/problems-integrating-on-x86-64-with-grub-bootloader-using-buildroot/5911/2 "2023-06-15T23:02:58Z")

</div>

Hello @Simnacher,

Not a buildroot expert but in Yocto we have configurations like these:

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

```

I found the following configs in a community repo: [BR2\_PACKAGE\_MENDER\_GRUBENV](https://github.com/aduskett/buildroot-mender-configs/blob/c3dd65f751e0012a0a5f06ddfc8aa69830ade5c9/configs/mender_x86_64_efi_defconfig#L78) and [BR2\_TARGET\_GRUB2](https://github.com/aduskett/buildroot-mender-configs/blob/c3dd65f751e0012a0a5f06ddfc8aa69830ade5c9/configs/mender_x86_64_efi_defconfig#L21) for x86-64 that I can assume enables GRUB but unsure if by definition disables u-boot. Have you tried them already?

Hope it helps,  
Luis

---

<div class="post-metadata">

**Author:** ![Simnacher](https://avatars.discourse-cdn.com/v4/letter/s/47e85d/32.png) [@Simnacher](https://hub.mender.io/u/Simnacher)\
**Post date:** [June 16, 2023, 1:26pm UTC](https://hub.mender.io/t/problems-integrating-on-x86-64-with-grub-bootloader-using-buildroot/5911/3 "2023-06-16T13:26:57Z")

</div>

Thanks for your reply.

BR2\_PACKAGE\_MENDER\_GRUBENV and BR2\_TARGET\_GRUB2 are both enabled in buildroot config which should actually result in a grub supported mender implementation. Unfortunately the implementation doesn’t seem to work as intended.

---

<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 16, 2023, 1:30pm UTC](https://hub.mender.io/t/problems-integrating-on-x86-64-with-grub-bootloader-using-buildroot/5911/4 "2023-06-16T13:30:54Z")

</div>

Maybe @pamolloy or @aduskett can give pointers here?

Greetz,  
Josef

---

<div class="post-metadata">

**Author:** ![Simnacher](https://avatars.discourse-cdn.com/v4/letter/s/47e85d/32.png) [@Simnacher](https://hub.mender.io/u/Simnacher)\
**Post date:** [June 19, 2023, 8:09am UTC](https://hub.mender.io/t/problems-integrating-on-x86-64-with-grub-bootloader-using-buildroot/5911/5 "2023-06-19T08:09:49Z")

</div>

Quick update from our research:

Taking a look into the packages, we figured out that the mender-grubenv buildroot package only executes the “install-boot-env” target from the grub-mender-grubenv repo. We assume that it should also execute the “install-legacy-tools” target to install the fw\_printenv and fw\_setenv script.

Maybe we can find some time to test and update the package…

Best regards  
Lukas
