Hello,
I’m upgrading my project from warrior to dunfell.
I’ve generated a yocto-mender image for machine jetson-tx2. The flash is successful. But I have got the following error while I attempt a local update. Can someone help me to get through
INFO[0000] Start updating from local image file: [test-image-custom-jetson-tx2.mender]
Installing Artifact of size 389511680…
INFO[0000] No public key was provided for authenticating the artifact
INFO[0000] Opening device “/dev/mmcblk0p33” for writing
INFO[0000] Native sector size of block device /dev/mmcblk0p33 is 512 bytes. Mender will write in chunks of 1048576 bytes
… - 100 %
INFO[0029] All bytes were successfully written to the new partition
INFO[0029] The optimized block-device writer wrote a total of 3892 frames, where 0 frames did need to be rewritten (i.e., skipped)
INFO[0029] Wrote 4080218112/4080218112 bytes to the inactive partition
INFO[0029] Enabling partition with new image installed to be a boot candidate: 33
INFO[0030] Collected output (stderr) while running script /var/lib/mender/scripts/ArtifactInstall_Leave_80_bl-update
/usr/bin/setup-nv-boot-control: line 19: /etc/nv_boot_control.conf: No such file or directory
chmod: cannot operate on dangling symlink ‘/etc/nv_boot_control.conf’
ERR: bootloader update failed
---------- end of script output
ERRO[0030] ArtifactInstall_Leave script failed: statescript: error executing ‘ArtifactInstall_Leave_80_bl-update’: 1 : exit status 1
Rolling back Artifact…
INFO[0031] Rolling back to the active partition: (1).
ERRO[0031] statescript: error executing ‘ArtifactInstall_Leave_80_bl-update’: 1 : exit status 1
Hi, I will certainly do my very best.
To start off with, it seems one of your State Scripts
are failing.
What happens if you run an update without this state script?
@oleorhagen I’ve following error if I try to run without the StateScripts
ERRO[0030] ArtifactInstall_Leave script failed: statescript: error executing 'ArtifactInstall_Leave_80_bl-update': -1 : fork/exec /var/lib/mender/scripts/ArtifactInstall_Leave_80_bl-update: exec format error
Rolling back Artifact...
I was debugging the statescripts, it’s not only one, install and commit scripts were failing for jetson-tx2 machine and install script were failing for jetson-xavier.
Hi, just to establish a common baseline:
Can you run mender-artifact read <artifact_name>
and post the output?
Mender artifact:
Name: tegra-custom
Format: mender
Version: 3
Signature: no signature
Compatible devices: ‘[jetson-tx2]’
Provides group:
Depends on one of artifact(s): []
Depends on one of group(s): []
State scripts:
ArtifactCommit_Enter_80_bl-check-update
ArtifactInstall_Leave_80_bl-update
ArtifactRollback_Leave_80_bl-rollback
Updates:
0:
Type: rootfs-image
Provides:
rootfs-image.checksum: 2a31f04a8361de5e86067436df5bc23b73356fd0eecb3b6e4e32e5ded7b8d243
rootfs-image.version: tegra-custom
Depends: Nothing
Metadata: Nothing
Files:
name: tegra-custom-jetson-tx2.ext4
size: 4080218112
modified: 2021-03-22 12:05:59 +0100 CET
checksum: 2a31f04a8361de5e86067436df5bc23b73356fd0eecb3b6e4e32e5ded7b8d243
Well, considering the scripts are still in there,
can you pase the scripts here?
Also, a good way to help diagnose State Scripts
are to write to stderr from the script. This will get collected in the client logs, and shown upon error.
@oleorhagen meta-mender-community/meta-mender-tegra/recipes-mender/tegra-state-scripts/files at e4e7c212e92db7edc7cb5bd94499cf48d249a93c · mendersoftware/meta-mender-community · GitHub
Here is the state scripts I’m using. Indeed the state scripts is failing at different points.
List of issues:
-
Can’t operate in a dangling point. Line
-
Sometimes it outputs invalid value than expected. Line
-
Invalid ouptut: Line
-
Invalid output Line
I’ve fixed them myself. And It’s working now
1 Like
@anishmonachan that is great!
We would really love a PR too, if you have fixed issues in the setup
1 Like
And mark the issue as resolved