# Partition switch not happening on Raspberry Pi

**URL:** <https://hub.mender.io/t/partition-switch-not-happening-on-raspberry-pi/6568>\
**Category:** General Discussions\
**Tags:** yocto, raspberry-pi-3, raspberry-pi-4\
**Created:** [February 19, 2024, 11:26am UTC](https://hub.mender.io/t/partition-switch-not-happening-on-raspberry-pi/6568 "2024-02-19T11:26:56Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![emilm](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/emilm/32/449_2.png) [@emilm](https://hub.mender.io/u/emilm)\
**Post date:** [February 19, 2024, 11:26am UTC](https://hub.mender.io/t/partition-switch-not-happening-on-raspberry-pi/6568/1 "2024-02-19T11:26:56Z")

</div>

I actually have a problem with mender NOT modifying cmdline and I am stuck on the same partition after update…

---

<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:** [February 19, 2024, 7:17pm UTC](https://hub.mender.io/t/partition-switch-not-happening-on-raspberry-pi/6568/2 "2024-02-19T19:17:43Z")

</div>

Hi @emilm,

I’m currently investigating the problem too, but don’t have a grip on it yet. Could you trace it down to the `cmdline` creation?

Greets,  
Josef

---

<div class="post-metadata">

**Author:** ![emilm](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/emilm/32/449_2.png) [@emilm](https://hub.mender.io/u/emilm)\
**Post date:** [February 19, 2024, 8:35pm UTC](https://hub.mender.io/t/partition-switch-not-happening-on-raspberry-pi/6568/3 "2024-02-19T20:35:50Z")

</div>

Hello!

I figured it out. Seems like it was not enough to INHERIT += “mender-full” …

I needed to add:  
MENDER\_FEATURES\_ENABLE:append = " mender-update-install"

---

<div class="post-metadata">

**Author:** ![pyxlwuff](https://avatars.discourse-cdn.com/v4/letter/p/898d66/32.png) [@pyxlwuff](https://hub.mender.io/u/pyxlwuff)\
**Post date:** [February 21, 2024, 5:00pm UTC](https://hub.mender.io/t/partition-switch-not-happening-on-raspberry-pi/6568/4 "2024-02-21T17:00:48Z")

</div>

Just want to note that I’ve ran into this as well, even with the latest tag I should use according to [this other thread](https://hub.mender.io/t/rootfs-switch-not-occurring-on-raspberry-pi-4-64-with-meta-mender-kirkstone/6543) that mentions it too. Instead of adding mender-update-install I needed to do mender-client-install. Will report back tomorrow if that fixes the switching issue

---

<div class="post-metadata">

**Author:** ![emilm](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/emilm/32/449_2.png) [@emilm](https://hub.mender.io/u/emilm)\
**Post date:** [February 21, 2024, 7:38pm UTC](https://hub.mender.io/t/partition-switch-not-happening-on-raspberry-pi/6568/5 "2024-02-21T19:38:58Z")

</div>

Hm how can it be different for you ? It includes the file if that feature is detected

---

<div class="post-metadata">

**Author:** ![pyxlwuff](https://avatars.discourse-cdn.com/v4/letter/p/898d66/32.png) [@pyxlwuff](https://hub.mender.io/u/pyxlwuff)\
**Post date:** [February 21, 2024, 8:57pm UTC](https://hub.mender.io/t/partition-switch-not-happening-on-raspberry-pi/6568/6 "2024-02-21T20:57:33Z")

</div>

I’m not too sure right now, but it’s the same setup as yours in my local.conf with `INHERIT += “mender-full”` but the switch just doesn’t happen. Mostly just experimentation right now as the v2023.12 kirkstone tag checks for `mender-client-install` instead of `mender-update-install`

---

<div class="post-metadata">

**Author:** ![pyxlwuff](https://avatars.discourse-cdn.com/v4/letter/p/898d66/32.png) [@pyxlwuff](https://hub.mender.io/u/pyxlwuff)\
**Post date:** [February 22, 2024, 2:40pm UTC](https://hub.mender.io/t/partition-switch-not-happening-on-raspberry-pi/6568/7 "2024-02-22T14:40:47Z")

</div>

Just tried this (v2023.12 Kirkstone Tag) and it still fails to perform the partition switch, with or without ` MENDER_FEATURES_ENABLE:append = " mender-client-install"` (mender-update-install threw loads of errors claiming it’s not a valid mender feature).

Weirdly, the web UI reports the update as a success, even though it never boots into the new rootfs?

Edit: using the kirkstone branch (no tag) with mender-update-install specified also didn’t perform the partition switch.

---

<div class="post-metadata">

**Author:** ![emilm](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/emilm/32/449_2.png) [@emilm](https://hub.mender.io/u/emilm)\
**Post date:** [February 26, 2024, 10:35am UTC](https://hub.mender.io/t/partition-switch-not-happening-on-raspberry-pi/6568/8 "2024-02-26T10:35:41Z")

</div>

I am on commit 4047149055f8dd6db59412c9e802e94a3ba7c85d

Double check the remote / local branch and commit. And post the errors after confirming

---

<div class="post-metadata">

**Author:** ![pyxlwuff](https://avatars.discourse-cdn.com/v4/letter/p/898d66/32.png) [@pyxlwuff](https://hub.mender.io/u/pyxlwuff)\
**Post date:** [February 26, 2024, 12:50pm UTC](https://hub.mender.io/t/partition-switch-not-happening-on-raspberry-pi/6568/9 "2024-02-26T12:50:54Z")

</div>

I did manage to get that resolved over the weekend, using 2023.12 kirkstone. Adds everything it needs now but will complain about fuzz in uboot and when I flash the image I get stuck on a blinking cursor.

Log:

```auto
Sstate summary: Wanted 2323 Local 0 Mirrors 0 Missed 2323 Current 1 (0% match, 0% complete)
NOTE: Executing Tasks
WARNING: u-boot-1_2022.01-r0 do_patch: Fuzz detected:

Applying patch 0001-configs-rpi-enable-mender-requirements.patch
patching file configs/rpi_0_w_defconfig
Hunk #1 succeeded at 19 with fuzz 1 (offset 1 line).
Hunk #2 succeeded at 44 (offset 3 lines).
patching file configs/rpi_2_defconfig
Hunk #1 succeeded at 20 with fuzz 1 (offset 2 lines).
Hunk #2 succeeded at 44 (offset 4 lines).
patching file configs/rpi_3_32b_defconfig
Hunk #1 succeeded at 21 with fuzz 1 (offset 2 lines).
Hunk #2 succeeded at 47 (offset 4 lines).
patching file configs/rpi_3_b_plus_defconfig
Hunk #1 succeeded at 20 with fuzz 1 (offset 1 line).
Hunk #2 succeeded at 46 (offset 3 lines).
patching file configs/rpi_3_defconfig
Hunk #1 succeeded at 20 with fuzz 1 (offset 1 line).
Hunk #2 succeeded at 46 (offset 3 lines).
patching file configs/rpi_4_32b_defconfig
Hunk #1 succeeded at 20 with fuzz 1 (offset 1 line).
Hunk #2 succeeded at 62 (offset 4 lines).
patching file configs/rpi_4_defconfig
Hunk #1 succeeded at 20 with fuzz 1 (offset 1 line).
Hunk #2 succeeded at 60 (offset 4 lines).
patching file configs/rpi_arm64_defconfig
Hunk #1 succeeded at 19 with fuzz 2 (offset 1 line).
Hunk #2 succeeded at 52 (offset 2 lines).
patching file configs/rpi_defconfig
Hunk #1 succeeded at 19 with fuzz 1 (offset 1 line).
Hunk #2 succeeded at 44 (offset 3 lines).
patching file env/Kconfig
Hunk #1 succeeded at 57 (offset -4 lines).
patching file include/configs/rpi.h
Hunk #1 succeeded at 68 with fuzz 2 (offset -29 lines).

The context lines in the patches can be updated with devtool:

    devtool modify u-boot
    devtool finish --force-patch-refresh u-boot <layer_path>

Don't forget to review changes done by devtool!

WARNING: u-boot-1_2022.01-r0 do_patch: QA Issue: Patch log indicates that patches do not apply cleanly. [patch-fuzz]
WARNING: u-boot-1_2022.01-r0 do_provide_mender_defines: Found more than one dtb specified in KERNEL_DEVICETREE ( bcm2708-rpi-zero.dtb bcm2708-rpi-zero-w.dtb bcm2708-rpi-b.dtb bcm2708-rpi-b-rev1.dtb bcm2708-rpi-b-plus.dtb bcm2709-rpi-2-b.dtb bcm2710-rpi-2-b.dtb bcm2710-rpi-3-b.dtb bcm2710-rpi-3-b-plus.dtb bcm2711-rpi-4-b.dtb bcm2711-rpi-400.dtb bcm2708-rpi-cm.dtb bcm2710-rpi-cm3.dtb bcm2711-rpi-cm4.dtb overlays/overlay_map.dtb overlays/at86rf233.dtbo overlays/disable-bt.dtbo overlays/dwc2.dtbo overlays/gpio-ir.dtbo overlays/gpio-ir-tx.dtbo overlays/gpio-key.dtbo overlays/gpio-poweroff.dtbo overlays/gpio-shutdown.dtbo overlays/hifiberry-amp.dtbo overlays/hifiberry-dac.dtbo overlays/hifiberry-dacplus.dtbo overlays/hifiberry-digi.dtbo overlays/justboom-both.dtbo overlays/justboom-dac.dtbo overlays/justboom-digi.dtbo overlays/i2c-gpio.dtbo overlays/i2c-rtc.dtbo overlays/imx219.dtbo overlays/imx477.dtbo overlays/iqaudio-dac.dtbo overlays/iqaudio-dacplus.dtbo overlays/mcp2515-can0.dtbo overlays/mcp2515-can1.dtbo overlays/mcp3008.dtbo overlays/miniuart-bt.dtbo overlays/pitft22.dtbo overlays/pitft28-capacitive.dtbo overlays/pitft28-resistive.dtbo overlays/pitft35-resistive.dtbo overlays/pps-gpio.dtbo overlays/rpi-ft5406.dtbo overlays/rpi-poe.dtbo overlays/vc4-fkms-v3d.dtbo overlays/vc4-fkms-v3d-pi4.dtbo overlays/vc4-kms-v3d.dtbo overlays/vc4-kms-v3d-pi4.dtbo overlays/vc4-kms-dsi-7inch.dtbo overlays/w1-gpio.dtbo overlays/w1-gpio-pullup.dtbo overlays/wm8960-soundcard.dtbo ). Only one should be specified. Choosing the last one: overlays/overlay_map.dtb. Set KERNEL_DEVICETREE to the desired dtb file to silence this warning.

```

Local.conf:

```auto
## MENDER CONFIG
MENDER_ARTIFACT_NAME = "os-img"
INHERIT += "mender-full"
ARTIFACTIMG_FSSTYPE = "ext4"

MENDER_SERVER_URL = "<redacted>"
MENDER_STORAGE_TOTAL_SIZE_MB = "16000"
MENDER_BOOT_PART_SIZE_MB = "500"
MENDER_DATA_PART_SIZE_MB = "2500"
MENDER_FEATURES_ENABLE:append = " mender-uboot mender-image-sd"
MENDER_FEATURES_DISABLE:append = " mender-grub mender-image-uefi"

## Raspberry Pi Config

RPI_USE_UBOOT = "1"
ENABLE_UART = "1"
IMAGE_INSTALL:append = " kernel-image kernel-devicetree"
IMAGE_FSTYPES:remove = " rpi-sdimg"
VIDEO_CAMERA = "1"
ENABLE_I2C = "1"
KERNEL_MODULE_AUTOLOAD:rpi += "i2c-dev i2c-bcm2708"
GPU_MEM = "128"

```

EDIT: Seems to boot now. Think adding ` SDIMG_ROOTFS_TYPE = "ext4"` to my local.conf did the trick.

---

<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:** [February 27, 2024, 9:49am UTC](https://hub.mender.io/t/partition-switch-not-happening-on-raspberry-pi/6568/10 "2024-02-27T09:49:32Z")

</div>

Hi @pyxlwuff,

Glad to hear you’re making good progress. Yeah we know about the patch fuzz, and while it’s not super pretty it is harmless.  
One thing I could spot, `ARTIFACTIMG_FSSTYPE` is a typo, there’s one extra **S**. If you take that out, I’d expect the `SDIMG_ROOTFS_TYPE` assignment to be not required anymore.

Greets,  
Josef

---

<div class="post-metadata">

**Author:** ![pyxlwuff](https://avatars.discourse-cdn.com/v4/letter/p/898d66/32.png) [@pyxlwuff](https://hub.mender.io/u/pyxlwuff)\
**Post date:** [February 27, 2024, 6:01pm UTC](https://hub.mender.io/t/partition-switch-not-happening-on-raspberry-pi/6568/11 "2024-02-27T18:01:36Z")

</div>

Ah good catch, didn’t notice that 😄 done quite a few test rootfs updates now without issues so all seems to be resolved for me. Thanks!
