# Changing boot partition offset even when using grub/uefi

**URL:** https://hub.mender.io/t/changing-boot-partition-offset-even-when-using-grub-uefi/6211
**Category:** General Discussions
**Tags:** yocto
**Created:** [September 20, 2023, 12:21am UTC](https://hub.mender.io/t/changing-boot-partition-offset-even-when-using-grub-uefi/6211 "2023-09-20T00:21:33Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![PhoenixMage](https://avatars.discourse-cdn.com/v4/letter/p/b5ac83/32.png) [@PhoenixMage](https://hub.mender.io/u/PhoenixMage)
#### Post date: [September 20, 2023, 12:21am UTC](https://hub.mender.io/t/changing-boot-partition-offset-even-when-using-grub-uefi/6211/1 "2023-09-20T00:21:33Z")

</div>

I am using a combination of u-boot and GRUB to provide a consistent and manageable boot process across a variety of SBCs. By doing this I can largely deal with the custom u-boot implementations by chainloading grub.efi and booting from there.

I have just started playing with mender and I notice that when I am using the UEFI image it starts the partition at a 16Mb offset which doesn’t allow me to install u-boot without clobbering the boot partition.

Is there a variable I have missed that will allow me to move the starting offset of the boot partition for a UEFI image?

---

<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: [September 20, 2023, 11:39am UTC](https://hub.mender.io/t/changing-boot-partition-offset-even-when-using-grub-uefi/6211/2 "2023-09-20T11:39:28Z")

</div>

Hi @PhoenixMage,

Not sure I understand the situation correctly, sorry. The [BeaglePlay](https://hub.mender.io/t/beagleplay/5792) and [BeagleBone AI-64](https://hub.mender.io/t/beaglebone-ai-64/5793) use a very similar booting strategy (U-Boot to GRUB).

There, the enabled `MENDER_FEATURES` included `mender-grub`, causing the integration to be injected into GRUB. Do I understand right that this is also the route you are following?

Additionally, it sounds like you have `mender-image-uefi` enabled and want to use the resulting `.uefiimg`. So the problem is not having a space reserved for the U-Boot environment? Or what causes the mentioned clobbering of the boot partition?

Greetz,  
Josef

---

<div class="post-metadata">

### Author: ![PhoenixMage](https://avatars.discourse-cdn.com/v4/letter/p/b5ac83/32.png) [@PhoenixMage](https://hub.mender.io/u/PhoenixMage)
#### Post date: [September 20, 2023, 11:49am UTC](https://hub.mender.io/t/changing-boot-partition-offset-even-when-using-grub-uefi/6211/3 "2023-09-20T11:49:20Z")

</div>

Hey Leto,

Good to know the Beagle’s are doing something similar, I will see if adding mender-grub to the MENDER\_FEATURES does what I am after. Does the Beagle solution also use the grub.efi?

I was manually dd’ing the u-boot files to the microSD just to see if I could get it running, basically _I_ was manually globbering it. I am using Rock boards and they require the idbloader at offset 64 and the u-boot.itb at offset 16384 which already has the boot fs there, hence hoping to move boot partition along.

I will trying your suggestion, I might hit you up on the yocto IRC to chat at some stage.

Cheers

---

<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: [September 20, 2023, 12:13pm UTC](https://hub.mender.io/t/changing-boot-partition-offset-even-when-using-grub-uefi/6211/4 "2023-09-20T12:13:11Z")

</div>

Howdy @PhoenixMage,

sure, feel free to ping me on IRC. I see, this is quite RK-specifc it seems. A random thought, have you tried adding an `--offset` parameter to [this line](https://github.com/mendersoftware/meta-mender/blob/master/meta-mender-core/classes/mender-part-images.bbclass#L92C29-L92C29)? If it does the trick, we can look into polishing and upstreaming such.

Greetz,  
Josef
