Mender-convert failure | raspberrypi4 ubuntu-server 20

I’ve attempted to search this hub but can’t find a topic that matches my particular conversion fatal error. So, apologies if I duplicated some how but here goes: (btw, the search function is garbage, doesn’t always search from everywhere, can’t open the search results in a page for starters) Conversion works fine, until it gets to where (I’m assuming) it creates the new kernel to boot from?

Command used to run the conversion:

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

Here’s the log:

ronin@miyamoto-x:~/mender-convert$ MENDER_ARTIFACT_NAME=release-1 ./docker-mender-convert --disk-image input/golden-image-1.img --config configs/raspberrypi4_config --overlay rootfs_overlay_demo/
Running mender-convert --disk-image input/golden-image-1.img --config configs/raspberrypi4_config --overlay rootfs_overlay_demo/
Running mender-convert-extract: --config ./work/override_compression_config --disk-image input/golden-image-1.img --config configs/raspberrypi4_config --overlay rootfs_overlay_demo/
2021-12-08 17:40:11 [INFO] [mender-convert-extract] Using configuration file: configs/mender_convert_config
2021-12-08 17:40:11 [INFO] [mender-convert-extract] Using configuration file: ./work/override_compression_config
2021-12-08 17:40:11 [INFO] [mender-convert-extract] Using configuration file: configs/raspberrypi4_config
2021-12-08 17:40:11 [INFO] [mender-convert-extract] Validating disk image
2021-12-08 17:40:11 [INFO] [mender-convert-extract] Disk parsed successfully
2021-12-08 17:40:11 [INFO] [mender-convert-extract] NUMBER OF PARTS: 2 TYPE: dos
2021-12-08 17:40:11 [INFO] [mender-convert-extract] PART 1: SIZE: 256M TYPE: 0xc
2021-12-08 17:40:11 [INFO] [mender-convert-extract] PART 1: extracting to work/part-1.fs
2021-12-08 17:40:13 [INFO] [mender-convert-extract] PART 2: SIZE: 29.6G TYPE: 0x83
2021-12-08 17:40:13 [INFO] [mender-convert-extract] PART 2: extracting to work/part-2.fs
mender-convert-extract has finished. Cleaning up...
Running mender-convert-modify: --config ./work/override_compression_config --disk-image input/golden-image-1.img --config configs/raspberrypi4_config --overlay rootfs_overlay_demo/
2021-12-08 17:50:33 [INFO] [mender-convert-modify] Using configuration file: configs/mender_convert_config
2021-12-08 17:50:33 [INFO] [mender-convert-modify] Using configuration file: ./work/override_compression_config
2021-12-08 17:50:33 [INFO] [mender-convert-modify] Using configuration file: configs/raspberrypi4_config
2021-12-08 17:50:48 [INFO] [mender-convert-modify] Installing Mender client and related files
2021-12-08 17:50:49 [INFO] [mender-convert-modify] Installing Mender client version latest
2021-12-08 17:50:50 [INFO] [mender-convert-modify] Successfully downloaded mender-client_3.1.0-1_arm64.deb
2021-12-08 17:50:51 [INFO] [mender-convert-modify] Successfully installed mender-client_3.1.0-1_arm64.deb into /mender-convert/work/rootfs/
2021-12-08 17:50:51 [INFO] [mender-convert-modify] Creating state folder in the data partition for Mender add-ons
2021-12-08 17:50:51 [INFO] [mender-convert-modify] Using root device A in mender.conf: /dev/mmcblk0p2
2021-12-08 17:50:51 [INFO] [mender-convert-modify] Using root device B in mender.conf: /dev/mmcblk0p3
2021-12-08 17:50:51 [INFO] [mender-convert-modify] Installing the local mender.conf file
2021-12-08 17:50:51 [INFO] [mender-convert-modify] Creating state scripts version file.
2021-12-08 17:50:51 [INFO] [mender-convert-modify] Installing a custom /etc/fstab (see /mender-convert/logs/convert.log.7srN for more info)
2021-12-08 17:50:51 [INFO] [mender-convert-modify] Using boot partition device in fstab: /dev/mmcblk0p1
2021-12-08 17:50:51 [INFO] [mender-convert-modify] Using data partition device in fstab: /dev/mmcblk0p4
2021-12-08 17:50:51 [INFO] [mender-convert-modify] Performing platform specific modifications (if any)
2021-12-08 17:50:51 [INFO] [mender-convert-modify] Running hook: platform_modify
mender-convert-modify has finished. Cleaning up...
2021-12-08 17:50:53 [ERROR] [mender-convert] mender-convert failed
2021-12-08 17:50:52 [DEBUG] [mender-convert-modify] When running: (configs/raspberrypi_config:78): run_and_log_cmd():  

        sudo cp work/boot/kernel7l.img work/rootfs/boot/zImage
        cp: cannot stat 'work/boot/kernel7l.img': No such file or directory

2021-12-08 17:50:53 [ERROR] [mender-convert] mender-convert failed
2021-12-08 17:50:53 [ERROR] [mender-convert] mender-convert exit code: 1

As you can see, there’s no real output given to tell me anything about why that kernel7l.img doesn’t exist, and I would think that normally there’s be some kind of error message when trying to create it or source it from somewhere…

Any constructive input is extremely appreciated.

i think you should be using the “raspberrypi4_ubuntu_config” rather than “raspberrypi4_config”

I would agree if it wasn’t for the fact that the ubuntu version fails for a different reason, undeclared variable… I’ll run it again and post that log too :slight_smile:

Running mender-convert-extract: --config ./work/override_compression_config --disk-image input/golden-image-1.img --config configs/raspberrypi4_ubuntu_config --overlay rootfs_overlay_demo/
2021-12-08 23:57:53 [INFO] [mender-convert-extract] Using configuration file: configs/mender_convert_config
2021-12-08 23:57:53 [INFO] [mender-convert-extract] Using configuration file: ./work/override_compression_config
2021-12-08 23:57:53 [INFO] [mender-convert-extract] Using configuration file: configs/raspberrypi4_ubuntu_config
mender-convert-extract has finished. Cleaning up...
configs/raspberrypi_config: line 13: RASPBERRYPI_CONFIG: unbound variable
2021-12-08 23:57:53 [ERROR] [mender-convert] mender-convert failed
2021-12-08 23:57:53 [INFO] [mender-convert-extract] Using configuration file: configs/mender_convert_config
2021-12-08 23:57:53 [INFO] [mender-convert-extract] Using configuration file: ./work/override_compression_config
2021-12-08 23:57:53 [INFO] [mender-convert-extract] Using configuration file: configs/raspberrypi4_ubuntu_config
2021-12-08 23:57:53 [ERROR] [mender-convert] mender-convert failed
2021-12-08 23:57:53 [ERROR] [mender-convert] mender-convert exit code: 1

Fails within 5 seconds of being run

it doesn’t look like raspberrypi4_ubuntu_config is quite correct.

try creating your own config file with the contents of raspberrypi4_ubuntu_config but remove the RASPBERRYPI_BINARIES declaration in it and put back in

RASPBERRYPI_CONFIG="raspberrypi4"

Ok, here’s the contents of the config now being used:

RASPBERRYPI_KERNEL_IMAGE="vmlinuz"
MENDER_KERNEL_IMAGETYPE="zImage"
MENDER_DEVICE_TYPE="raspberrypi4"
RASPBERRYPI_CONFIG="raspberrypi4"

source configs/raspberrypi_config

annnd we run the command:

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

Result:
Looks like it worked, other than a 32GB SD card not being big enough for mender… I’m going to tweak some variables, but it looks like everything in general worked just fine in regards to my original reported issue.

Thanks for your help!

1 Like

awesome, might be worth putting an issue up on the mender teams bug tracker, and maybe a pull-request with the fix if you have the time. :smiley:

Sure, I can throw that modified config into the real raspberrypi4_ubuntu_config file and gen a request. Good call! Not enough of us share the fixes we come up with in the wild.

Cheers! (oh and you’re getting credited on this, I didn’t do anything except follow your suggestion :slight_smile:

1 Like

Bug report created :slight_smile:
https://tracker.mender.io/browse/MEN-5284

2 Likes

This was discussed here previously, but halted because the user ran into a different problem. Good that you confirmed it though, I have submitted the fix now.

ah, right on, excellent, thanks

Did you see the original issue I was posting about with raspberrypi4_config? conversion going almost all the way through, but dying near the end? See O.G. Post of this thread :slight_smile:

The error message could be better, but it’s actually expected, since the input image type is Ubuntu, and not Raspios, which is expected when using raspberrypi4_config.

Righto, thank you for the follow up :slight_smile: