Facing issue when trying to convert existing ubuntu image for mender use

I’m currently using a Dell machine with Ubuntu 22.04 OS installed.

I’m also exploring the possibility of using mender-convert on a raw Ubuntu ISO file to create a bootable USB that can handle the partitioning. If this is a viable solution, could you provide the necessary arguments for the mender-convert command?

When I tried below command

$MENDER_CONVERT_LOCATION/scripts/bootstrap-rootfs-overlay-hosted-server.sh \
--output-dir ${PWD}/input/rootfs_overlay_demo \
--region us \
--tenant-token “<token>"

I received an error for region so I modified the bootstrap-rootfs-overlay-hosted-server.sh script made it static to us and code worked.

After that I encountered an error related to the “mender-convert” modules and attempted to address it by modifying the “prob.sh” code, specifically changing the target_arch to “x86_64” to resolve a previous error. However, I’m now encountering a different error.

The error arises when executing the following command in the terminal, specifically at line 42 of “deb.sh.”

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

Please check attached screenshot for detailed logs.

Ideally I should not change the code it should work as expected mentioned in the docs but unfortunately it is not working.

I’m hesitant to make further changes to the code as it may complicate management. Could you please provide assistance in a more effective manner to resolve this issue?

@pierrer @lluiscampos Can anyone please help

@MarekBelisko @AkshatVyas any help would be much appreciated!

@vimoxshah check if wget is not an issue as stated in log please. Maybe it was temporary hickup.

Hi @vimoxshah,

This might be a bug on mender-convert or /etc/os-release missing from your golden image.

From your logs I can see “wget …dists//stable/…”, which indicates that the distribution name is empty. There is a piece of code to “probe” the OS distro name but it seems to be returning empty for you. Can you verify that the file exists? And what are the contents?

cat etc/os-release

Lluís