I have a machine which is a QEMU x86_64 with VirtIO Storage based on meta-mender kirkstone-v2022.09.
Just before starting the systemd network, I check and set if a hostname variable exist in the grub env and if not i’m writing it to keep the hostname stable between firmware upgrade.
At the boot my script is doing something like
hostname = grub-mender-grubenv-print hostname.
if -z $hostname
generate_random()
grub-mender-grubenv-set hostname “my-machineRANDOM” <==== FAIL AT FIRST BOOT !!! (computed checksum did NOT match)
fi
I suspect that my script is running at the same time as another service which is also editing this file but I don’t know which one. Also it’s seems that the grub-mender-grubenv-set is not thread safe
This is something that I can reproduce easily.
But it seems strange
I can’t say that I do, no. Nothing official from the Mender products would do this, as far as I’m aware.
One possibility would be to go through all the active systemd units and see if any of those access it. OTOH if the fix works, then I guess we don’t need to worry about it.