No match between boot and root partitions

Hi all
My sd card partition for my target board is as follows:
/dev/mmcbkl0p1 – for kernel
/dev/mmcbkl0p2 – for uboot
/dev/mmcbkl0p3 – /
/dev/mmcbkl0p4-- extra partition for dual boot

What changes need to be done in this partition scheme in order to meet the partition layout requirements of the mender. I understand that an extra partition for persistent data would be required. What else?
As of now, while running mender daemon, it throws the following Error

ERRO[0000] Failed to read the current active partition: No match between boot and root partitions.: exit status 243

How to resolve this?

Hi @abhishek,

The basics are covered here. Will the mechanics for a Yocto build are different, the underlying structures are similar.

Note that we don’t usually leave the kernel in a separate partition but rather stored as a file in the root filesystem. This ensures redundancy and rollback capability.

Without knowing more about your system, I would expect your partition structure to looks something like:

  • /dev/mmcblk0p1 - UBoot (maybe not depending on how Uboot works on your device; on many platforms it is actually stored in unpartitioned space)
  • /dev/mmcblk0p2 - root filesystem A
  • /dev/mmcblk0p3 - root filesystem B
  • /dev/mmcblk0p4 - data partition

Is there a reason you are doing this manually rather than using our mender-convert (for debian style systems) or Yocto integrations which will set it up for you?

Drew

I am using U54 target board (RISC-V) where I have 3 partitions by default, bootloader, kernel and rootfs.
I suspect mender-conver tool would be targeting ARM architecture. Will it recognise all 3 partitions? Can I use it create image for my target from by golden image?

I am currently building mender from source and able to transfer simple files. With filesystem update, it is creating this issue!

Thanks for your response

I don’t know if mender-convert will support that board or not but I suspect there will be issues.
It definitely won’t work with the kernel as a separate partition.
You may be able to address both issues with a custom integration.

Building from source may get you a working system to transfer simple files. As you noted, doing the robust full image updates requires more effort.

Drew

Can you guide me where exactly I should dig further to solve this issue?
I have managed to transfer simple file but this problem occurs while filesystem update. I have even tested by creating data partition but still got same error!
Looks like uboot issue!

Thanks

You will not be able to do a filesystem update without doing a full integration using either mender-convert or Yocto. Those doc links should get you started but it’s hard to say what issues you will face given that this is a new architecture.
Drew

Mender-convert needs config file which is not available for my target board (u54). Can pi4 config file be used as sample to create config file in this command?

MENDER_ARTIFACT_NAME=release-1 ./docker-mender-convert \
    --disk-image input/golden-image-1.img \
    --config configs/raspberrypi3_config \
    --overlay rootfs_overlay_demo/

Not likely. That is the config file that customizes mender-convert for your platform. You will need to determine what is needed for your platform and store it in a custom config file. That’s essentially what is needed for a mender-convert integration.

Drew

Hi

When I have flashed golden image in pi, I could find kernel sitting within boot partition along with uboot but in documents, it is mentioned that kernel comes along with rootfs and uboot remains separate.
Can you please clarify?

In this case, the kernel7.img file is actually a U-Boot binary. The proprietary firmware loads U-Boot which then loads the kernel off of the root filesystem.

Drew

Can you please point out where exactly the kernel is located in rootfs?

It’s in the boot directory.