Problems converting a packer-debian11.img with mender-convert

Hi, I am trying to mender-convert an debian11.img file to mender format. I first created the image via packer. The qcow2 file I got there I then converted via qemu-img convert into a img file. This I want now convert to mender format via mender-convert, but I run into the following problem:

2022-06-23 07:07:33 [DEBUG] [mender-convert-modify] Running: (modules/ run_and_log_cmd_noexit():  

	sudo chroot work/rootfs grub-install --removable --no-nvram
	Disabling OS prober in offline mode...
Cannot probe device in command line: --target=fs_uuid --device /dev/sda3
Installing for i386-pc platform.
grub-install: error: install device isn't specified.

2022-06-23 07:07:33 [ERROR] [mender-convert] mender-convert failed
2022-06-23 07:07:33 [ERROR] [mender-convert] mender-convert exit code: 1

The image:

fdisk -l input/golden-image.img
Festplatte input/golden-image.img: 4,9 GiB, 5242880000 Bytes, 10240000 Sektoren
Einheiten: Sektoren von 1 * 512 = 512 Bytes
Sektorgröße (logisch/physikalisch): 512 Bytes / 512 Bytes
E/A-Größe (minimal/optimal): 512 Bytes / 512 Bytes
Festplattenbezeichnungstyp: dos
Festplattenbezeichner: 0xa59940fa

Gerät                   Boot Anfang     Ende Sektoren Größe Kn Typ
input/golden-image.img1 *      2048 10237951 10235904  4,9G 83 Linux

Can someone give me a hint where I do have to specify the install device? If you need more info, please just let me know.
Thanks in advance.

@Kay Welcome to mender hub!

From fdisk it looks like image have only one partition (usually mender-convert expect EFI partition and rootfs). I think problem can be in golden image that it was created by packer which is used for running in container. Can you check that? Thanks.

1 Like

Thank you.

Ah ok, yes, at the moment the image is configured to only have one partition. I will enhance it to have an EFI and a rootfs. Thanks so far.

It might work if you use a custom config file, like input/myconfig, where you set:


It should probably be better at detecting this scenario though. This part was rewritten in mender-convert 3.0.0, so it’s still a bit fresh. I have a proposed fix here.

Thanks for the quick replies. It worked for me, so I was able to step over that error message.

For the record, which solution was it that worked? :slightly_smiling_face:

The one from MarekBelisko, I tried it before I read yours, sorry ;-).

No problem! I think it’s a better solution anyway, because mine would have disabled important features.

1 Like

Glad you have it working. Can you share maybe how packer config looks like and how you generate image? I’m looking for some mkosi alternative due it’s using dracut as initrams which makes me troubles when want to use Yubikey). Thanks.