RobertCNelson / omap-image-builder

omap image builder
http://elinux.org/BeagleBoardUbuntu
MIT License
152 stars 201 forks source link

systemd-journald race condition due to /etc/machine-id regeneration #141

Closed jtetrault closed 3 years ago

jtetrault commented 3 years ago

Hey, I think this is the appropriate repo for this issue (at least, it can be resolved in this repo).

There seems to be a minor race condition on first boot, that causes journalctl to just spit out "No journal files were found" until the service / system is rebooted. I traced this down to /etc/machine-id being deleted and regenerated by the generic-startup.sh script in the boot-scripts repo.

Basically, this is what happens:

I deleted /etc/machine-id from a flasher sd card, used it to flash a BBE, and did not see the above problem on the first boot. So I think all that's required is to add a rm -f /etc/machine-id somewhere in chroot.sh

RobertCNelson commented 3 years ago

Thanks @jtetrault i just added to the same location as teh ssh trigger file..

RobertCNelson commented 3 years ago

also fixed the flashing script to do the sam.e..

jtetrault commented 3 years ago

Thank you!