Mender-convert'ed image fails to boot, can't mount root

I’m having trouble using Mender-convert on an existing RPI4 image. The image uses a custom kernel, so I run mender-convert like this:

sudo MENDER_ARTIFACT_NAME=alpha-1 ./docker-mender-convert --disk-image input/golden-image.img --config configs/raspberrypi4_config --overlay rootfs_overlay_alpha_1/

And then I manually replace the kernel7l.img with my custom one, which does have CONFIG_FHANDLE set.

The image will now boot partially, it stops at this output:

Waiting for root device ${mender_kernel_root}…

Later I see the mmc come up but it looks like uboot never expanded ${mender_kernel_root} before passing it to the kernel… What am I missing?

With mender-convert, the kernel*.img file is actually U-Boot which then loads the kernel from the active root filesystem. You probably need to put your updated kernel in the /boot directory of each of the root filesystem partitions.

Drew

That makes a whole lot of sense, that way the filesystem update can contain a new kernel.

Unfortunately, even if I replace both rootfs partitions /boot/zImage with my custom kernel, and leave the boot partition image unchanged from what mender-convert generates, I don’t get a working boot. I’m not sure where to look next because there is no output despite a loglevel=7 after the bootloader, just black screen.

I assume I need device tree binaries and overlays as well? I tried putting those in the same directory, but no luck.

I think it is best to verify with known working configurations, e.g

And trace from there any customization you need to make.