Partition didn't switch to another after Mender system update

Partition didn’t switch to another after Mender system update.

The version I used.
Mender convert version 3.0.0
Mender-server version 3.4.0

The Mender-ui said I succeed the mender system update.

The logs said it will reboot another partition (partition 3).

But I used $ lsblk check my partition is still at partition 2 after rebooting.

$ lsblk
NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda      8:0    0   42G  0 disk
├─sda1   8:1    0  200M  0 part /boot/efi
├─sda2   8:2    0 20.8G  0 part /
├─sda3   8:3    0 20.8G  0 part
└─sda4   8:4    0  128M  0 part /data

Below is my system update logs from /data/mender/

{"level":"info","message":"Running Mender client version: 3.4.0","timestamp":"2022-11-07T06:26:17Z"}
{"level":"info","message":"State transition: update-fetch [Download_Enter] -\u003e update-store [Download_Enter]","timestamp":"2022-11-07T06:26:17Z"}
{"level":"info","message":"No public key was provided for authenticating the artifact","timestamp":"2022-11-07T06:26:17Z"}
{"level":"info","message":"Opening device \"/dev/sda3\" for writing","timestamp":"2022-11-07T06:26:17Z"}
{"level":"info","message":"Native sector size of block device /dev/sda3 is 512 bytes. Mender will write in chunks of 1048576 bytes","timestamp":"2022-11-07T06:26:17Z"}
{"level":"info","message":"All bytes were successfully written to the new partition","timestamp":"2022-11-07T06:28:38Z"}
{"level":"info","message":"The optimized block-device writer wrote a total of 20481 frames, where 5171 frames did need to be rewritten (i.e., skipped)","timestamp":"2022-11-07T06:28:38Z"}
{"level":"info","message":"Wrote 21474836480/21474836480 bytes to the inactive partition","timestamp":"2022-11-07T06:28:40Z"}
{"level":"info","message":"State transition: update-store [Download_Enter] -\u003e update-after-store [Download_Leave]","timestamp":"2022-11-07T06:28:40Z"}
{"level":"info","message":"State transition: update-after-store [Download_Leave] -\u003e mender-update-control-refresh-maps [none]","timestamp":"2022-11-07T06:28:40Z"}
{"level":"info","message":"State transition: mender-update-control-refresh-maps [none] -\u003e mender-update-control [none]","timestamp":"2022-11-07T06:28:40Z"}
{"level":"info","message":"State transition: mender-update-control [none] -\u003e update-install [ArtifactInstall]","timestamp":"2022-11-07T06:28:40Z"}
{"level":"info","message":"Enabling partition with new image installed to be a boot candidate: 3","timestamp":"2022-11-07T06:28:40Z"}
{"level":"info","message":"State transition: update-install [ArtifactInstall] -\u003e mender-update-control-refresh-maps [none]","timestamp":"2022-11-07T06:28:40Z"}
{"level":"info","message":"State transition: mender-update-control-refresh-maps [none] -\u003e mender-update-control [none]","timestamp":"2022-11-07T06:28:40Z"}
{"level":"info","message":"State transition: mender-update-control [none] -\u003e reboot [ArtifactReboot_Enter]","timestamp":"2022-11-07T06:28:40Z"}
{"level":"info","message":"Rebooting device(s)","timestamp":"2022-11-07T06:28:40Z"}
{"level":"info","message":"Mender rebooting from active partition: /dev/sda2","timestamp":"2022-11-07T06:28:40Z"}
{"level":"info","message":"Daemon terminated with SIGTERM","timestamp":"2022-11-07T06:28:40Z"}
{"level":"info","message":"Running Mender client version: 3.4.0","timestamp":"2022-11-07T06:29:02Z"}
{"level":"info","message":"State transition: init [none] -\u003e after-reboot [ArtifactReboot_Leave]","timestamp":"2022-11-07T06:29:02Z"}
{"level":"info","message":"State transition: after-reboot [ArtifactReboot_Leave] -\u003e after-reboot [ArtifactReboot_Leave]","timestamp":"2022-11-07T06:29:02Z"}
{"level":"info","message":"State transition: after-reboot [ArtifactReboot_Leave] -\u003e mender-update-control-refresh-maps [none]","timestamp":"2022-11-07T06:29:02Z"}
{"level":"info","message":"State transition: mender-update-control-refresh-maps [none] -\u003e mender-update-control [none]","timestamp":"2022-11-07T06:29:02Z"}
{"level":"info","message":"State transition: mender-update-control [none] -\u003e update-commit [ArtifactCommit_Enter]","timestamp":"2022-11-07T06:29:02Z"}
{"level":"info","message":"Device unauthorized; attempting reauthorization","timestamp":"2022-11-07T06:29:02Z"}
{"level":"info","message":"Output (stderr) from command \"/usr/share/mender/identity/mender-device-identity\": using interface /sys/class/net/eth0","timestamp":"2022-11-07T06:29:02Z"}
{"level":"info","message":"successfully received new authorization data from server https://docker.mender.io","timestamp":"2022-11-07T06:29:02Z"}
{"level":"info","message":"Local proxy started","timestamp":"2022-11-07T06:29:02Z"}
{"level":"info","message":"Reauthorization successful","timestamp":"2022-11-07T06:29:02Z"}
{"level":"info","message":"Committing update","timestamp":"2022-11-07T06:29:02Z"}
{"level":"info","message":"State transition: update-commit [ArtifactCommit_Enter] -\u003e update-after-first-commit [none]","timestamp":"2022-11-07T06:29:02Z"}
{"level":"info","message":"State transition: update-after-first-commit [none] -\u003e update-after-commit [ArtifactCommit_Leave]","timestamp":"2022-11-07T06:29:02Z"}
{"level":"info","message":"State transition: update-after-commit [ArtifactCommit_Leave] -\u003e cleanup [none]","timestamp":"2022-11-07T06:29:02Z"}
{"level":"info","message":"State transition: cleanup [none] -\u003e update-status-report [none]","timestamp":"2022-11-07T06:29:02Z"}

Hey @ak8893893, that’s odd. Can you post the output from the following two commands:

find /boot/ /boot/efi/
grub-mender-grubenv-print
1 Like

Thanks for your help. :smile:

$ find /boot/ /boot/efi/
/boot/
/boot/initrd
/boot/kernel
/boot/efi
/boot/efi/EFI
/boot/efi/EFI/centos
/boot/efi/EFI/centos/fonts
/boot/efi/EFI/centos/fonts/unicode.pf2
/boot/efi/EFI/centos/shimx64-centos.efi
/boot/efi/EFI/centos/grubx64.efi
/boot/efi/EFI/centos/BOOT.CSV
/boot/efi/EFI/centos/BOOTX64.CSV
/boot/efi/EFI/centos/MokManager.efi
/boot/efi/EFI/centos/mmx64.efi
/boot/efi/EFI/centos/shim.efi
/boot/efi/EFI/centos/grubenv
/boot/efi/EFI/centos/shimx64.efi
/boot/efi/EFI/centos/grub.cfg
/boot/efi/EFI/BOOT
/boot/efi/EFI/BOOT/grub.cfg
/boot/efi/EFI/BOOT/BOOTX64.EFI
/boot/efi/EFI/BOOT/fallback.efi
/boot/efi/EFI/BOOT/fbx64.efi
/boot/efi/grub-mender-grubenv
/boot/efi/grub-mender-grubenv/mender_grubenv1
/boot/efi/grub-mender-grubenv/mender_grubenv1/env
/boot/efi/grub-mender-grubenv/mender_grubenv1/lock
/boot/efi/grub-mender-grubenv/mender_grubenv1/lock.sha256sum
/boot/efi/grub-mender-grubenv/mender_grubenv2
/boot/efi/grub-mender-grubenv/mender_grubenv2/env
/boot/efi/grub-mender-grubenv/mender_grubenv2/lock
/boot/efi/grub-mender-grubenv/mender_grubenv2/lock.sha256sum
/boot/grub
/boot/grub/grub.cfg
/boot/grub/splash.xpm.gz
/boot/grub2
find: ‘/boot/grub2’: Permission denied
/boot/.vmlinuz-3.10.0-1160.76.1.el7.x86_64.hmac
/boot/System.map-3.10.0-1160.76.1.el7.x86_64
/boot/config-3.10.0-1160.76.1.el7.x86_64
/boot/initramfs-0-rescue-163dca4cac7a6b91d07aeae0c54f99b4.img
/boot/initramfs-3.10.0-1160.76.1.el7.x86_64.img
/boot/symvers-3.10.0-1160.76.1.el7.x86_64.gz
/boot/vmlinuz-0-rescue-163dca4cac7a6b91d07aeae0c54f99b4
/boot/vmlinuz-3.10.0-1160.76.1.el7.x86_64
/boot/efi/
/boot/efi/EFI
/boot/efi/EFI/centos
/boot/efi/EFI/centos/fonts
/boot/efi/EFI/centos/fonts/unicode.pf2
/boot/efi/EFI/centos/shimx64-centos.efi
/boot/efi/EFI/centos/grubx64.efi
/boot/efi/EFI/centos/BOOT.CSV
/boot/efi/EFI/centos/BOOTX64.CSV
/boot/efi/EFI/centos/MokManager.efi
/boot/efi/EFI/centos/mmx64.efi
/boot/efi/EFI/centos/shim.efi
/boot/efi/EFI/centos/grubenv
/boot/efi/EFI/centos/shimx64.efi
/boot/efi/EFI/centos/grub.cfg
/boot/efi/EFI/BOOT
/boot/efi/EFI/BOOT/grub.cfg
/boot/efi/EFI/BOOT/BOOTX64.EFI
/boot/efi/EFI/BOOT/fallback.efi
/boot/efi/EFI/BOOT/fbx64.efi
/boot/efi/grub-mender-grubenv
/boot/efi/grub-mender-grubenv/mender_grubenv1
/boot/efi/grub-mender-grubenv/mender_grubenv1/env
/boot/efi/grub-mender-grubenv/mender_grubenv1/lock
/boot/efi/grub-mender-grubenv/mender_grubenv1/lock.sha256sum
/boot/efi/grub-mender-grubenv/mender_grubenv2
/boot/efi/grub-mender-grubenv/mender_grubenv2/env
/boot/efi/grub-mender-grubenv/mender_grubenv2/lock
/boot/efi/grub-mender-grubenv/mender_grubenv2/lock.sha256sum
$ grub-mender-grubenv-print
bootcount=0
mender_boot_part=3
upgrade_available=0
mender_uboot_separator=
mender_boot_part_hex=3

Hmm. I can’t see anything wrong there. I wonder if this machine was already set to boot centos and therefore skipped over the BOOT entry that Mender added under EFI.

What you can try is to delete the boot entries with rm -rf /boot/efi/EFI/* folder, and then run sudo grub-install && sudo update-grub to repopulate it. This has a chance to brick the device, so do this on an experimental one.

1 Like