In my embedded system, I've created persistent storage on a separate filesystem 
for log files in /var/log.  This works well, until I do a firmware update.  
When the firmware is updated, the entire root filesystem is rewritten.  This 
means that the /etc/machine-id is also rewritten to a new, random number.  As 
journald stores everything in /var/log/journal/<machine-id>, I get old logs 
that are no longer accessible and not purged, taking up disk space.  Is there 
any way to make the machine-id persistent across firmware updates?

My initial thought would be to make /etc/machine-id into a symlink pointing to 
/var/log/machine-id.  However, that results in a new problem.  On first boot, 
the file wouldn't exist, making an invalid symlink.

What is the proper way to go about keeping the machine-id consistent across 
firmware updates?

Thanks,
Jeremy


________________________________

This message (including any attachments) is intended for the sole use of the 
intended recipient/s and may contain material that is CONFIDENTIAL AND PRIVATE 
COMPANY INFORMATION. If you are not the intended recipient of this message, you 
are hereby notified that you must delete the message without disseminating, 
copying or taking any action in reliance upon it. If you have received this 
message in error, please notify the sender via return e-mail. Thank you.
-- 
_______________________________________________
yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/yocto

Reply via email to