Failed to install a system-update - Artifact headers failed

Hello,

I have successfully registered my device on a Mender test server. Now I want to install a system update but I get this error(s) during the installation. Yocto-Build!

2021-04-26 06:23:39 +0000 UTC info: Running Mender client version: 2.5.0
2021-04-26 06:23:40 +0000 UTC info: State transition: update-fetch [Download_Enter] -> update-store [Download_Enter]
2021-04-26 06:23:40 +0000 UTC info: No public key was provided for authenticating the artifact
2021-04-26 06:23:40 +0000 UTC info: Update Module path "/usr/share/mender/modules/v3" could not be opened (open /usr/share/mender/modules/v3: no such file or directory). Update modules will not be available
2021-04-26 06:23:40 +0000 UTC error: Fetching Artifact headers failed: installer: failed to read Artifact: readHeaderV3: handleHeaderReads: Artifact Payload type 'rootfs-image' is not supported by this Mender Client. Ensure that the Mender Client is fully integrated and that the RootfsPartA/B configuration variables are set correctly in 'mender.conf'
2021-04-26 06:23:40 +0000 UTC info: State transition: update-store [Download_Enter] -> fetch-install-retry-wait [Download_Enter]

After some tests and a lot of reading, I unfortunately haven’t found an answer to this question yet.

This is my local.conf setup:

# part
MENDER_STORAGE_DEVICE = "/dev/mmcblk1"
MENDER_ROOTFS_PART_A = "${MENDER_STORAGE_DEVICE_BASE}3"
MENDER_ROOTFS_PART_B = "${MENDER_STORAGE_DEVICE_BASE}5"
MENDER_BOOT_PART = "${MENDER_STORAGE_DEVICE_BASE}6"
MENDER_DATA_PART = "${MENDER_STORAGE_DEVICE_BASE}8" 

#
MENDER_STORAGE_TOTAL_SIZE_MB = "5000"
MENDER_DATA_PART_SIZE_MB = "2048"

#debug
#MENDER_FEATURES_ENABLE_append = " mender-uboot mender-image-sd"
#MENDER_FEATURES_DISABLE_append = " mender-grub mender-image-uefi"
#IMAGE_INSTALL_append = " mender-client-migrate-configuration"
#PACKAGECONFIG_remove = "split-mender-config"
#MENDER_PERSISTENT_CONFIGURATION_VARS = "RootfsPartA RootfsPartB"
#MENDER_ARTIFACT_EXTRA_ARGS_append = " -v 2"
#MENDER_GRUB_EFI_INTEGRATION = "n"

und meine WIC-File.

> part loader1    --align 32     --size 4000K            --ondisk ${RK_BOOT_DEVICE} --source rawcopy --sourceparams="file=idbloader.img"
> part reserved1  --align 4032   --size 64K              --ondisk ${RK_BOOT_DEVICE} --fstype=ext4
> part reserved2  --align 4096   --size 4096K            --ondisk ${RK_BOOT_DEVICE} --fstype=ext4
> part loader2    --align 8192   --size 4096K            --ondisk ${RK_BOOT_DEVICE} --source rawcopy --sourceparams="file=u-boot.bin"
> part atf        --align 12288  --size 4096K            --ondisk ${RK_BOOT_DEVICE} --fstype=ext4
> part /boot      --align 16384  --size=114688K --active --ondisk ${RK_BOOT_DEVICE} --source bootimg-partition --fstype=vfat --label boot --sourceparams="loader=u-boot"
> part /      --align 131072 --ondisk ${RK_BOOT_DEVICE} --source rootfs --fstype=ext4 --label root
> part /data  --size 2097152K --ondisk ${RK_BOOT_DEVICE} --fstype=ext4
> bootloader --ptable gpt --append="console=tty1 console=ttyS3,115200n8 rw root=/dev/${RK_BOOT_DEVICE}p7 rootfstype=ext4 init=/sbin/init"

Is it due to the lack of authentication? Or should I use the #debug variables ?

Thank you :slight_smile: and greetings

You need to enable the Mender features required for A/B updates:

Have a quick read through here:
https://docs.mender.io/system-updates-yocto-project/image-customization/features

:slight_smile:

Thanks :slight_smile:
Okay, unfortunately, I’m not quite behind it yet :frowning:

I have unfortunately not shown everything … my mistake … I use as a basis :

INHERIT += "mender-full"
MENDER_FEATURES_ENABLE_append = " mender-image"

Back to the documentation.
Grub should be already integrated by mender-full (?!)

Didn’t I enable the A/B-feature with :

MENDER_ROOTFS_PART_A = “${MENDER_STORAGE_DEVICE_BASE}3”

MENDER_ROOTFS_PART_B = “${MENDER_STORAGE_DEVICE_BASE}5”

?

Blockquote
Didn’t I enable the A/B feature with:
MENDER_ROOTFS_PART_A = ...

No, this is only a variable.
But inheriting mender-full enables it.

Inheritingmender-full also means you don’t need the:
MENDER_FEATURES_ENABLE_append = "mender_image" line.

I’m also a little confused. Could you post your entire local.conf, exactly as you use it in your build?

If mender-full is indeed used, you should see the four needed partitions with:
fdisk -l on your device.

Could you post both of these items for me to see?

Thanks for the help :slight_smile:

local.conf

MENDER_ARTIFACT_NAME = "Player_9"

MENDER_SERVER_URL = "https://mender-test.tdx.design"
MENDER_DEVICE_TYPE = "tinker-board-s"

# Specific Configuration for Mender
INHERIT += "mender-full"
MENDER_CONNECT_USER = "tdXPlayer"
MENDER_UPDATE_POLL_INTERVAL_SECONDS = "60"
MENDER_INVENTORY_POLL_INTERVAL_SECONDS = "60"


# part
MENDER_STORAGE_DEVICE = "/dev/mmcblk1"
MENDER_ROOTFS_PART_A = "${MENDER_STORAGE_DEVICE_BASE}3"
MENDER_ROOTFS_PART_B = "${MENDER_STORAGE_DEVICE_BASE}5"
MENDER_BOOT_PART = "${MENDER_STORAGE_DEVICE_BASE}6"
MENDER_DATA_PART = "${MENDER_STORAGE_DEVICE_BASE}8" 

#
MENDER_STORAGE_TOTAL_SIZE_MB = "5000"
MENDER_DATA_PART_SIZE_MB = "2048"

MENDER_FEATURES_DISABLE_append = " mender-grub mender-image-uefi"



#IMAGE_INSTALL_append = " mender-client-migrate-configuration"
#PACKAGECONFIG_remove = "split-mender-config"
#MENDER_PERSISTENT_CONFIGURATION_VARS = "RootfsPartA RootfsPartB"
#MENDER_ARTIFACT_EXTRA_ARGS_append = " -v 2"


#
# Machine Selection
#
MACHINE ??= "tinker-board-s"
SSTATE_DIR ?= "/mnt/disks/yocto/share/sstate-cache"
DL_DIR ?= "/mnt/disks/yocto/share/downloads"


#
# Default policy config
#
# The distribution setting controls which policy settings are used as defaults.
# The default value is fine for general Yocto project use, at least initially.
# Ultimately when creating custom policy, people will likely end up subclassing 
# these defaults.
#
DISTRO ?= "poky"

#
# Package Management configuration
#
PACKAGE_CLASSES ?= "package_rpm"


#  "debug-tweaks"   - make an image suitable for development
#                     e.g. ssh root access has a blank password
# We default to enabling the debugging tweaks.
EXTRA_IMAGE_FEATURES ?= "debug-tweaks"


#
#   - 'buildstats' collect build statistics
#   - 'image-mklibs' to reduce shared library files size for an image
#   - 'image-prelink' in order to prelink the filesystem image
USER_CLASSES ?= "buildstats image-mklibs image-prelink"


# By default disable interactive patch resolution (tasks will just fail instead):
PATCHRESOLVE = "noop"

#
# DISKMON
#
BB_DISKMON_DIRS ??= "\
    STOPTASKS,${TMPDIR},1G,100K \
    STOPTASKS,${DL_DIR},1G,100K \
    STOPTASKS,${SSTATE_DIR},1G,100K \
    STOPTASKS,/tmp,100M,100K \
    ABORT,${TMPDIR},100M,1K \
    ABORT,${DL_DIR},100M,1K \
    ABORT,${SSTATE_DIR},100M,1K \
    ABORT,/tmp,10M,1K"


# CONF_VERSION is increased each time build/conf/ changes incompatibly and is used to
# track the version of this file when it was generated. This can safely be ignored if
# this doesn't mean anything to you.
CONF_VERSION = "1"

#
# DISTRO_FEATURES
#
DISTRO_FEATURES_append = " virtualization "

CORE_IMAGE_EXTRA_INSTALL += " kernel-modules "
CORE_IMAGE_EXTRA_INSTALL += " wayland weston "

fdisk -l looks like this: (the whole ram calls confuse me a bit)

Disk /dev/ram0: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes

Disk /dev/ram1: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes

Disk /dev/ram2: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes

Disk /dev/ram3: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes

Disk /dev/ram4: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes

Disk /dev/ram5: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes

Disk /dev/ram6: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes

Disk /dev/ram7: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes

Disk /dev/ram8: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes

Disk /dev/ram9: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes

Disk /dev/ram10: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes

Disk /dev/ram11: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes

Disk /dev/ram12: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes

Disk /dev/ram13: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes

Disk /dev/ram14: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes

Disk /dev/ram15: 64 MiB, 67108864 bytes, 131072 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes

Disk /dev/mmcblk1: 14.57 GiB, 15634268160 bytes, 30535680 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 841AB771-7880-49A1-A72F-2991DEB03AFB

Device Start End Sectors Size Type
/dev/mmcblk1p1 64 8063 8000 3.9M Microsoft basic data
/dev/mmcblk1p2 8064 8191 128 64K Linux filesystem
/dev/mmcblk1p3 8192 16383 8192 4M Linux filesystem
/dev/mmcblk1p4 16384 24575 8192 4M Microsoft basic data
/dev/mmcblk1p5 24576 32767 8192 4M Linux filesystem
/dev/mmcblk1p6 32768 330957 298190 145.6M Linux filesystem
/dev/mmcblk1p7 524288 4400743 3876456 1.9G Linux filesystem
/dev/mmcblk1p8 4400744 8595047 4194304 2G Linux filesystem

I am using WIC for the first time on Yocto side.
Maybe this all still looks a bit messy here (sorry)

Hi @SebSauer why are you using a custom wic file? That will definitely require some extra configuration. Does the default provided by Mender not work for you?

Drew

Hi @drewmoseley i used :

Found this in : Asus Tinker Board

There i used the wic files. Made some small changes (added /data part)
But I don’t think these were crucial changes.

It looks like your partition mapping is not correct. You are setting the root filesystem partitions to 3 and 5 which are both 4M partitions. Is that right?

Drew

Yes — okay that is clearly too little memory, i guess …