# Handling Yocto version changes

**URL:** <https://hub.mender.io/t/handling-yocto-version-changes/1569>\
**Category:** General Discussions\
**Created:** [February 20, 2020, 1:42pm UTC](https://hub.mender.io/t/handling-yocto-version-changes/1569 "2020-02-20T13:42:49Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Austriker](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/austriker/32/511_2.png) [@Austriker](https://hub.mender.io/u/Austriker)\
**Post date:** [February 20, 2020, 1:42pm UTC](https://hub.mender.io/t/handling-yocto-version-changes/1569/1 "2020-02-20T13:42:49Z")

</div>

Hi,

If I build my image based on Yocto Warrior based for example on meta-tegra. What would be the proper procedure to upgrade the system to Zeus hypothetically.

Update all the metas to zeus branches :

- meta-mender
- meta-mender-community
- meta-tegra

Build the new image (on condition of having it running on a device) and the .mender file to mender servers ?

Is that all or am I missing something ?

Best regards,

---

<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:** [February 20, 2020, 6:17pm UTC](https://hub.mender.io/t/handling-yocto-version-changes/1569/2 "2020-02-20T18:17:24Z")

</div>

Hi @Austriker in theory that is all however sometimes there are changes in the Yocto branches that may require one time extra steps for the upgrade. For instance, the default partition layout changed several versions ago, resulting in different partition numbers being required on systems that had upgraded rather than being freshly provisioned. I’m unaware of any such issues with Warrior-\>Zeus but we don’t officially support it yet so it has not been looked at closely. Please let us know if you uncover anything.

Drew

---

<div class="post-metadata">

**Author:** ![Austriker](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/austriker/32/511_2.png) [@Austriker](https://hub.mender.io/u/Austriker)\
**Post date:** [February 23, 2020, 6:23pm UTC](https://hub.mender.io/t/handling-yocto-version-changes/1569/3 "2020-02-23T18:23:26Z")

</div>

Hi @drewmoseley, thank you for you answer. It is the case for Thud to Warrior apparently so we are working directly on warrior. The case where the partition layout changes how do we handle it. Do you need to reflash the device ?

---

<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:** [February 24, 2020, 7:50am UTC](https://hub.mender.io/t/handling-yocto-version-changes/1569/4 "2020-02-24T07:50:44Z")

</div>

Don’t worry, there are no partition layout changes between thud and warrior AFAIK. That was just an example from even earlier versions. It’s worth checking out [the changelog](https://docs.mender.io/2.3/release-information/release-notes-changelog#meta-mender-warrior-v201910-1) between the two though. In particular, there is a section about “mender-migrate-configuration” that might be of interest. I don’t think it’s required to perform this upgrade step, but it’s definitely recommended.

---

<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:** [February 24, 2020, 3:53pm UTC](https://hub.mender.io/t/handling-yocto-version-changes/1569/5 "2020-02-24T15:53:14Z")

</div>

And to add a bit more color, the change mentioned above was fixed by simply adjusting the partition numbers in the bitbake variables.

But, that said, we cannot guarantee that no matter what changes are made in the future with Yocto we can support them without extra efforts. We’ll have to take each case individually to figure out how to address it.

---

<div class="post-metadata">

**Author:** ![tpiepho](https://avatars.discourse-cdn.com/v4/letter/t/e9a140/32.png) [@tpiepho](https://hub.mender.io/u/tpiepho)\
**Post date:** [February 25, 2020, 8:26pm UTC](https://hub.mender.io/t/handling-yocto-version-changes/1569/6 "2020-02-25T20:26:28Z")

</div>

GPT partitions support labels for each partition. You can label them whatever you want. If update software, mount points, rootfs selection all use labels (they can!), then there is no longer any dependency on the precise number and order of partitions.

If something keeps breaking because partition order changes, there is a way to address this fragility with a less fragile system.

---

<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:** [February 26, 2020, 3:06pm UTC](https://hub.mender.io/t/handling-yocto-version-changes/1569/7 "2020-02-26T15:06:19Z")

</div>

Can the bootloader identify partitions by labels?

---

<div class="post-metadata">

**Author:** ![tpiepho](https://avatars.discourse-cdn.com/v4/letter/t/e9a140/32.png) [@tpiepho](https://hub.mender.io/u/tpiepho)\
**Post date:** [February 26, 2020, 6:49pm UTC](https://hub.mender.io/t/handling-yocto-version-changes/1569/8 "2020-02-26T18:49:47Z")

</div>

Yes, both Barebot and U-Boot can parse GPT tables and identify a partition by label or by UUID.

The kernel can do the same. You can tell it what rootfs to use with `root=PARTLABEL=rootA` or also with `root=PARTUUID=xxxx-xxxx-xxxx`. However, barebox has a `bootm.appendroot` option that’s even better if you boot a kernel that is on the rootfs: it will automatically create a “root=” kernel option, using the partition UUID, to use as rootfs whatever device the kernel barebox is booting is on.

And once in Linux userspace, udev will create `/dev/disk/by-partlabel/*` and `/dev/disk/by-partuuid/*` with symlinks to device nodes.

So there’s really no need to ever care about what the exact dynamic partition and device enumeration will be, in the bootloader and in the kernel.
