# How to remove the boot partition from Yocto build?

**URL:** <https://hub.mender.io/t/how-to-remove-the-boot-partition-from-yocto-build/366>\
**Category:** General Discussions\
**Tags:** yocto, sumo, rocko, nxp\
**Created:** [March 13, 2019, 10:46am UTC](https://hub.mender.io/t/how-to-remove-the-boot-partition-from-yocto-build/366 "2019-03-13T10:46:10Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![ajithpv](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/ajithpv/32/728_2.png) [@ajithpv](https://hub.mender.io/u/ajithpv)\
**Post date:** [March 13, 2019, 10:46am UTC](https://hub.mender.io/t/how-to-remove-the-boot-partition-from-yocto-build/366/1 "2019-03-13T10:46:10Z")

</div>

Hi,

AFAIK, Mender required minimum 3 partitions (2 rootfs and 1 data partition). The boot partition (4th one) which is created by Yocto is required only when we are using the ‘_.sdimg_’. Please correct me If I’m wrong.

Currently, we are not using the “.sdimg” and need to change the partition order. I have followed the below link:  
[https://docs.mender.io/1.7/devices/yocto-project/partition-layout#more-detailed-storage-configuration](https://docs.mender.io/1.7/devices/yocto-project/partition-layout#more-detailed-storage-configuration)  
Since, I don’t want the boot partition, I didn’t override or use the _MENDER\_BOOT\_PART_ variable in the Yocto but used rootfs and data variables.

According to my new configuration, 1st and 2nd partitions are rootfs and 3rd partition is data . But, still the first partition is mounting to “ **/uboot** ”. I came to know this is coming from ‘_MENDER\_BOOT\_PART\_MOUNT\_LOCATION_’ but didn’t get how to change it into filesystem partition ()

How to remove this auto mount of **/uboot** and make the first partition for the file system correctly?

---

<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:** [March 13, 2019, 11:30am UTC](https://hub.mender.io/t/how-to-remove-the-boot-partition-from-yocto-build/366/2 "2019-03-13T11:30:58Z")

</div>

On newer Yocto branches e.g thud you can set:

```
 MENDER_BOOT_PART_SIZE_MB = "0"

```

To disable this functionality.

I do not think that we have something similar on older branches and you might need to modify fstab in a rootfs post process command.

---

<div class="post-metadata">

**Author:** ![dellgreen](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/dellgreen/32/85_2.png) [@dellgreen](https://hub.mender.io/u/dellgreen)\
**Post date:** [March 13, 2019, 2:35pm UTC](https://hub.mender.io/t/how-to-remove-the-boot-partition-from-yocto-build/366/3 "2019-03-13T14:35:49Z")

</div>

As Mirzak says, sumo branch definitely supports MENDER\_BOOT\_PART\_SIZE\_MB

---

<div class="post-metadata">

**Author:** ![ajithpv](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/ajithpv/32/728_2.png) [@ajithpv](https://hub.mender.io/u/ajithpv)\
**Post date:** [March 13, 2019, 2:37pm UTC](https://hub.mender.io/t/how-to-remove-the-boot-partition-from-yocto-build/366/4 "2019-03-13T14:37:08Z")

</div>

@dellgreen How about Rocko? we are using both sumo and rocko in 2 board variants.

---

<div class="post-metadata">

**Author:** ![dellgreen](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/dellgreen/32/85_2.png) [@dellgreen](https://hub.mender.io/u/dellgreen)\
**Post date:** [March 13, 2019, 2:54pm UTC](https://hub.mender.io/t/how-to-remove-the-boot-partition-from-yocto-build/366/5 "2019-03-13T14:54:32Z")

</div>

yes, rocko supports MENDER\_BOOT\_PART\_SIZE\_MB as well

---

<div class="post-metadata">

**Author:** ![dellgreen](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/dellgreen/32/85_2.png) [@dellgreen](https://hub.mender.io/u/dellgreen)\
**Post date:** [March 13, 2019, 2:56pm UTC](https://hub.mender.io/t/how-to-remove-the-boot-partition-from-yocto-build/366/6 "2019-03-13T14:56:34Z")

</div>

So does pyro and morty

---

<div class="post-metadata">

**Author:** ![ajithpv](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/ajithpv/32/728_2.png) [@ajithpv](https://hub.mender.io/u/ajithpv)\
**Post date:** [March 13, 2019, 3:01pm UTC](https://hub.mender.io/t/how-to-remove-the-boot-partition-from-yocto-build/366/7 "2019-03-13T15:01:21Z")

</div>

@dellgreen Thank you for the reply.

So it is confirmed that, making

```auto
MENDER_BOOT_PART_SIZE_MB = "0"

```

will disable the boot partition (this is what I required) in Thud, Sumo, Rocko, Pyro and Morty.

Please correct me if I’m wrong.

---

<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:** [March 13, 2019, 3:47pm UTC](https://hub.mender.io/t/how-to-remove-the-boot-partition-from-yocto-build/366/8 "2019-03-13T15:47:20Z")

</div>

Yes, it looks like the patch is in all the branches to support that.

---

<div class="post-metadata">

**Author:** ![dellgreen](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/dellgreen/32/85_2.png) [@dellgreen](https://hub.mender.io/u/dellgreen)\
**Post date:** [March 13, 2019, 4:07pm UTC](https://hub.mender.io/t/how-to-remove-the-boot-partition-from-yocto-build/366/9 "2019-03-13T16:07:33Z")

</div>

Yes, the boot partition is conditionally added only if MENDER\_BOOT\_PART\_SIZE\_MB is greater than zero.
