# Not possible to downgrade after upgrade to meta-mender/kirkstone

**URL:** <https://hub.mender.io/t/not-possible-to-downgrade-after-upgrade-to-meta-mender-kirkstone/6187>\
**Category:** General Discussions\
**Tags:** dunfell, kirkstone\
**Created:** [September 7, 2023, 9:21am UTC](https://hub.mender.io/t/not-possible-to-downgrade-after-upgrade-to-meta-mender-kirkstone/6187 "2023-09-07T09:21:17Z")\
**Posts on this page:** 4\
**Page:** 1

<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:** [September 7, 2023, 9:21am UTC](https://hub.mender.io/t/not-possible-to-downgrade-after-upgrade-to-meta-mender-kirkstone/6187/1 "2023-09-07T09:21:17Z")

</div>

Hello!

I am in the process of upgrading a project that is using Mender + Yocto Project, the upgrade path is `dunfell` → `kirkstone`.

We are using Intel based hardware with EFI support.

But I stumbled upon a unexpected behavior and wanted to get your input on it.

Assuming that I have the following releases:

- v2.0.0 (kirkstone)
- v1.0.0 (dunfell)

If I flash my device with v2.0.0 ( `hddimg`), I get the following error if I try to “downgrade” to v1.0.0 using `.mender` (`rootfs-image`):

```auto
/usr/bin/fw_setenv: line 96: cd: /boot/efi/EFI/BOOT/mender_grubenv2: No such file or directory

```

It seems to be related to this commit, [Upgrade to grub-mender-grubenv with grub.d support. · mendersoftware/meta-mender@515ddb4 · GitHub](https://github.com/mendersoftware/meta-mender/commit/515ddb41ba23aad39836bbad108c6391253d2aa5).

The path changed:

- `/boot/efi/EFI/BOOT/mender_grubenv*` → `/boot/efi/grub-mender-grubenv/mender_grubenv*`

But it does not seem that “older” `grub-mender-grubenv-*` tools (the ones in dunfell) are able to auto-detect this behavior and hence the error.

The reverse works just fine, that is flashing a device with v1.0.0 (`hddimg`), and then upgrading to v4.0.0 using `.mender (rootfs-image)`. I guess this is what is meant by that the change is “backwards compatible”.

Is this expected behavior?

---

<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:** [September 11, 2023, 6:38am UTC](https://hub.mender.io/t/not-possible-to-downgrade-after-upgrade-to-meta-mender-kirkstone/6187/2 "2023-09-11T06:38:43Z")

</div>

Friendly ping. @kacf maybe? 🙂

---

<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:** [September 11, 2023, 7:02am UTC](https://hub.mender.io/t/not-possible-to-downgrade-after-upgrade-to-meta-mender-kirkstone/6187/3 "2023-09-11T07:02:42Z")

</div>

Hey @mirzak!

You are correct that flashing with hddimg and then downgrading won’t work. This is because the contents on `/boot/efi` is permanent, and survives Mender rootfs updates. So if you try to downgrade, you still have the kirkstone layout in `/boot/efi`, which `dunfell` is not prepared to handle.

I believe you can work around it by using the `/etc/mender_grubenv.config` file to specify the location manually. Unfortunately it means that the two dunfell images will be incompatible: One for `/boot/efi` dunfell layout, and one for `/boot/efi` kirkstone layout. So it’s probably better to start all images with the dunfell layout and upgrade them to kirkstone, if you suspect that you need downgrades later, since then you can move seamlessly between them.

---

<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:** [September 11, 2023, 8:04am UTC](https://hub.mender.io/t/not-possible-to-downgrade-after-upgrade-to-meta-mender-kirkstone/6187/4 "2023-09-11T08:04:09Z")

</div>

Thanks for the detailed response :).

> So it’s probably better to start all images with the dunfell layout and upgrade them to kirkstone,

This is a very good point, and this is what we will continue doing for a while.

> if you suspect that you need downgrades later, since then you can move seamlessly between them.

I do not suspect that we actually will need downgrades, but is a nice option to have for unforeseen events when doing an “major upgrade”.
