Error when generating artifact for system update

Hi!

I was following the Tutorial to deploy a system update:

mender-artifact write rootfs-image \
    -f ssh://"${USER}@${IP_ADDRESS}" \
    -t "${DEVICE_TYPE}" \
    -n system-v1 \
    -o system-v1.mender \
    -S "${SSH_ARG}"

I get the following error:
time=“2025-02-06T16:01:31+01:00” level=error msg=“Device-local data is stored on the partition being snapshotted: /var/lib/mender. The recommended approach is to have a separate data-partition mounted on "/data" and add a symbolic link (/var/lib/mender → /data). Consult either Overview | Mender documentation Debian family or Overview | Mender documentation case you use Yocto”
time=“2025-02-06T16:01:31+01:00” level=error msg=“data store (/var/lib/mender) is located on filesystem /”
imgFilesystemType error: imgFilesystemType: blkid command failed: exit status 2

How do I fix this?

Hi @adhn,

Using mender-artifact to snapshot a live device will not automagically add a Mender integration. So in order for this to work, the image on the device has to be already Mender aware, in terms of a persistent /data partition, A/B root filesystem partitions and the bootloader integration.

You can create such an image in various ways, like using mender-convert or a Yocto build for example.

Greetz,
Josef

Hi @TheYoctoJester ,

ok, thank you.
I have been following the tutorial for mender-convert.

Some info:

  • I installed Ubuntu 22.04 as a dual boot option on my Windows machine to generate the “mender images”
  • I have used the 4.3.x branch of mender-convert
  • In mender_grub_config, I set MENDER_GRUB_KERNEL_IMAGETYPE=bzImage
  • In mender_convert_config, I set MENDER_STORAGE_TOTAL_SIZE_MB=40000
  • The final command to create the mender-aware Image:
    MENDER_ARTIFACT_NAME=release-1 ./docker-mender-convert \
    --disk-image input/golden-image-1.img \
    --config configs/raspberrypi/include/pre_bookworm_config \
    --overlay input/rootfs_overlay_demo/
    

After copying the resulting image on a new SD card, the display shows only black.
What went wrong?

Thank you!

Hi @adhn,

The configs/raspberrypi/include/pre_bookworm_config is, as its path suggests, just an include which provides functionality to an actual configuration. Depending on your base image and device, you should probably choose one here: mender-convert/configs/raspberrypi/uboot/debian at master · mendersoftware/mender-convert · GitHub

Greetz,
Josef

Hi @TheYoctoJester ,

makes sense.
Thank you!
It is now working as expected.

1 Like