Mender-convert without VERSION_CODENAME set?

I am very new to this, still learning and far from understanding it all. But I have successfully mender-converted and tested artifact deployments with the latest default beaglebone image from the web. Very happy about that. I am now trying to convert our production image and the conversion fails. I see that our image doesn’t have VERSION_CODENAME set. Could that be the reason for it to fail? Is there a way to bypass this without updating the image?

$ sudo MENDER_ARTIFACT_NAME=release-1 ./docker-mender-convert \
 --disk-image input/bbgw20210309.img \
 --config configs/beaglebone_black_debian_sdcard_config \
 --overlay ./rootfs_overlay_demo
Running mender-convert --disk-image input/bbgw20210309.img --config configs/beaglebone_black_debian_sdcard_config --overlay ./rootfs_overlay_demo
Running mender-convert-extract: --config ./work/override_compression_config --disk-image input/bbgw20210309.img --config configs/beaglebone_black_debian_sdcard_config --overlay ./rootfs_overlay_demo
2022-02-25 14:17:08 [INFO] [mender-convert-extract] Using configuration file: configs/mender_convert_config
2022-02-25 14:17:08 [INFO] [mender-convert-extract] Using configuration file: ./work/override_compression_config
2022-02-25 14:17:08 [INFO] [mender-convert-extract] Using configuration file: configs/beaglebone_black_debian_sdcard_config
2022-02-25 14:17:08 [INFO] [mender-convert-extract] Validating disk image
2022-02-25 14:17:08 [INFO] [mender-convert-extract] Disk parsed successfully
2022-02-25 14:17:08 [INFO] [mender-convert-extract] NUMBER OF PARTS: 1 TYPE: dos
2022-02-25 14:17:08 [INFO] [mender-convert-extract] PART 1: SIZE: 14.9G TYPE: 0x83
2022-02-25 14:17:08 [INFO] [mender-convert-extract] PART 1: extracting to work/part-1.fs
2022-02-25 14:17:43 [INFO] [mender-convert-extract] Generating boot partition (required, does not exist in original image)
2022-02-25 14:17:43 [INFO] [mender-convert-extract] Extracting boot gap to work/boot-gap.bin
mender-convert-extract has finished. Cleaning up...
Running mender-convert-modify: --config ./work/override_compression_config --disk-image input/bbgw20210309.img --config configs/beaglebone_black_debian_sdcard_config --overlay ./rootfs_overlay_demo
2022-02-25 14:17:43 [INFO] [mender-convert-modify] Using configuration file: configs/mender_convert_config
2022-02-25 14:17:43 [INFO] [mender-convert-modify] Using configuration file: ./work/override_compression_config
2022-02-25 14:17:43 [INFO] [mender-convert-modify] Using configuration file: configs/beaglebone_black_debian_sdcard_config
2022-02-25 14:17:45 [INFO] [mender-convert-modify] Installing Mender client and related files
2022-02-25 14:17:45 [INFO] [mender-convert-modify] Installing Mender client version latest
modules/probe.sh: line 119: VERSION_CODENAME: unbound variable
mender-convert-modify has finished. Cleaning up...
2022-02-25 14:17:46 [ERROR] [mender-convert] mender-convert failed
2022-02-25 14:17:46 [DEBUG] [mender-convert-modify] When running: (modules/deb.sh:43): run_and_log_cmd():  

	wget -Nq https://downloads.mender.io/repos/debian/dists/debian//stable/main/binary-armhf/Packages -P /tmp
2022-02-25 14:17:46 [ERROR] [mender-convert] mender-convert failed
2022-02-25 14:17:46 [ERROR] [mender-convert] mender-convert exit code: 8
Log file available at: logs/convert.log.ewvh
 or paste code here

RESOLVED - I learned how to mount an image to edit /etc/os-release and add VERSION_CODENAME=stretch.

Here my steps if anyone runs into a similar problem.

  • mkdir /mnt/img
  • sudo mount -o loop,offset=4194304 myimage.img /mnt/img (info here)
  • nano /mnt/img/etc/os-release
  • [add VERSION_CODENAME=stretch to the file]