I am reaching out to seek assistance with an issue I encountered while attempting to install a mender artifact on my device using the ‘mender install’ command.
When executing the below command :
mender install ./myapp-v2-arm64-artifact.mender
I receive the following error:
root@h3ulcb:~/Docker# mender install ./myapp-v2-arm64-artifact.mender
INFO[0000] Loaded configuration file: /var/lib/mender/mender.conf
INFO[0000] Loaded configuration file: /etc/mender/mender.conf
WARN[0000] Could not resolve path link: /dev/mmcblk0p2 Attempting to continue
WARN[0000] Could not resolve path link: /dev/mmcblk0p3 Attempting to continue
INFO[0000] Output (stderr) from command “fw_printenv”: Cannot read environment, using default
INFO[0000] Output (stderr) from command “fw_printenv”: Cannot read default environment from file
INFO[0000] Output (stderr) from command “fw_printenv”: Cannot read environment, using default
INFO[0000] Output (stderr) from command “fw_printenv”: Cannot read default environment from file
ERRO[0000] Failed to read the current active partition: No match between boot and root partitions.: exit status 243
WARN[0000] Could not resolve path link: /dev/mmcblk0p2 Attempting to continue
WARN[0000] Could not resolve path link: /dev/mmcblk0p3 Attempting to continue
INFO[0000] Output (stderr) from command “fw_printenv”: Cannot read environment, using default
INFO[0000] Output (stderr) from command “fw_printenv”: Cannot read default environment from file
INFO[0000] Output (stderr) from command “fw_printenv”: Cannot read environment, using default
INFO[0000] Output (stderr) from command “fw_printenv”: Cannot read default environment from file
ERRO[0000] Failed to read the current active partition: No match between boot and root partitions.: exit status 243
INFO[0000] Start updating from local image file: [./myapp-v2-arm64-artifact.mender]
Installing Artifact of size 5004800…
INFO[0000] No public key was provided for authenticating the artifact
… - 100 %
INFO[0002] Output (stderr) from command “/usr/share/mender/modules/v3/docker”: Storing reference on running containers for rollback needs to /var/lib/mender/modules/v3/payloads/0000/tree/tmp/prev_containers.list
INFO[0003] Output (stderr) from command “/usr/share/mender/modules/v3/docker”: Stopping all running containers
INFO[0013] Output (stdout) from command “/usr/share/mender/modules/v3/docker”: c1b1889a8887
INFO[0013] Output (stderr) from command “/usr/share/mender/modules/v3/docker”: jq: error: Could not open file /var/lib/mender/modules/v3/payloads/0000/tree/meta-data: No such file or directory
ERRO[0013] Update module terminated abnormally: exit status 2
ERRO[0013] Installation failed: Update module terminated abnormally: exit status 2
Rolling back Artifact…
INFO[0014] Output (stdout) from command “/usr/share/mender/modules/v3/docker”: c1b1889a8887
ERRO[0014] Update module terminated abnormally: exit status 2
could you please help me understand the root cause of this error.
Hi @Deepika,
Thanks for reaching out.
The log indicates that the board either has no or a non-functional Mender integration. The key here is
INFO[0000] Output (stderr) from command “fw_printenv”: Cannot read environment, using default
INFO[0000] Output (stderr) from command “fw_printenv”: Cannot read default environment from file
ERRO[0000] Failed to read the current active partition: No match between boot and root partitions.: exit status 243
which means that the A/B state of the bootloader integration cannot be read, and therefore no root filesystem upgrades are possible.
Depending on the exact board it might be possible to use, or base something on an integration available in meta-mender-community
.
Generally speaking, a u-boot
integration is done like this
Manual U-Boot integration | Mender documentation, and can be verified using the checklist: Integration checklist | Mender documentation
If you share a bit more about the board in question, we can possibly give more detailed answers.
Greetz,
Josef
Thanks for your response.
let me say my end goal. I’m working on deploying container update using the docker update module in standalone mode. I’m not using the rootfs or A/B partition updates.In my board the container of v1 is running. When I give the artifact which contains the container of v2, by routing to update module of docker script it needs to stop the running container and up running new container of v2 . when I performed through the ‘mender install’ command I faced the issue like that.
Below is the configuration for the mender
mender
INHERIT += “mender-full”
IMAGE_FSTYPES += “mender”
MENDER_FEATURES_ENABLE:append = " mender-uboot"
MENDER_FEATURES_DISABLE:append = " mender-grub"
MENDER_UBOOT_AUTO_CONFIGURE = “1”
BOOTENV_SIZE = “0x10000”
MENDER_RESERVED_SPACE_BOOTLOADER_DATA = “262144”
MENDER_STORAGE_DEVICE = “/dev/mmcblk0”
MENDER_BOOT_PART_SIZE_MB = “64”
MENDER_DATA_PART_SIZE_MB = “1024”
MENDER_ARTIFACT_NAME = “release-1”
MENDER_PARTITION_ALIGNMENT = “4096”
MENDER_IMAGE_BOOTLOADER_FILE = “u-boot.bin”
MENDER_IMAGE_BOOTLOADER_BOOTSECTOR_OFFSET = “16”
MENDER_BOOT_PART = “${MENDER_STORAGE_DEVICE}p1”
MENDER_ROOTFS_PART_A = “${MENDER_STORAGE_DEVICE}p2”
MENDER_ROOTFS_PART_B = “${MENDER_STORAGE_DEVICE}p3”
MENDER_DATA_PART = “${MENDER_STORAGE_DEVICE}p4”
MENDER_UBOOT_ENV_STORAGE_DEVICE_OFFSET = “4194304”
MENDER_UBOOT_STORAGE_INTERFACE = “mmc”
MENDER_UBOOT_STORAGE_DEVICE = “0”
MENDER_STORAGE_TOTAL_SIZE_MB = “8192”
IMAGE_OVERHEAD_FACTOR = “1.1”
MENDER_DEVICE_TYPE = “rcar-h3”
can you please let me know how to solve the issue.
Thanks in advance.
Hi @Deepika,
Ok, so this is a Yocto build and you are following this tutorial Docker, right?
Are you using the docker-artifact-gen
script as provided here? mender-update-modules/docker/module-artifact-gen/docker-artifact-gen at master · mendersoftware/mender-update-modules · GitHub
Can you possibly drop the output of mender-artifact read
on the artifact?
Greetz,
Josef
Hi @TheYoctoJester
Thank you for your response.
yes what you mentioned script of update module only I have used it.but little change I did in the script to pull the container locally not from the docker hub. please find my attached docker script.
and here is my the output of the mender-artifact read.
Thanks and Regards,
Deepika U M
Hi @Deepika,
Does it work without your modifications?
Greetz,
Josef
Hi @TheYoctoJester
It may works but I didnt try according to my requirement the artifact created in one device and when deploy into the hardware where meta-mender layer is added to the yocto and trigger the updates to the arm board (rcar -h3ulcb) it has no flexibility of internet so I can’t use the original script fetching image from docker hub.expected output is to get the new version container which is in that artifact .but Its getting roll-back to original container.
can you let me know how to solve the jq: error .
Thanks in advance.
Thanks and Regards,
Deepika
Hi @Deepika,
I understand the use case. Yet I think it would be very useful for isolating the error if you could try the original, unmodified version. In your development setup, I guess you have internet connectivity for the board.
If that works, then we need to work on your additions. If that also fails, then the problem is somewhere else.
Additionally, showing your actual code - not as a screenshot, but the full files of Update Module and generator script - let me try and reproduce too. You can either upload them here, or use some form of a pastebin or repository. As this definitely is not business critical IP, this should not be a problem.
Greetz,
Josef
Hi @TheYoctoJester
Thank you for your response.
I got my expected output .I changed my docker module script. and also in the mender artifact-command.
Thanks and Regards,
Deepika
Hi @Deepika,
So everything is working now?
For the record, we would love to have such an Update Module in GitHub - mendersoftware/mender-update-modules: Community-supported Update Modules for the Mender client so others can also benefit.
Greetz,
Josef