Key file does not have key “VERSION_ID” in group “os-release”
Hi,
I recently asked in the dev channel by mistake about updating
os-release contents so that a date is included that shows when the image was created. For example, silverblue does the following formatting style and is preserved in blue-build systems if you don't override the PRETTY_NAME entry.
Fedora Silverblue 43.20251105.0
I was told this wasn't supported, and since I wanted this same formatting, I tried doing my own modification with the following:
This logically seemed like it wouldn't break the system, and AFAIK the os-release formatting is exactly as it should be. Any attempt to boot into this system however results in the following error:
There must be some other step I'm missing here. Any advice? Likewise, any chance this timestamping feature could be added to the nu script for the os-release module?4 Replies
You're using
> /etc/os-release which overwrites the file entirely. I'd suggest piping through tee to see what's being put into the fileSolution
So
| tee /etc/os-release insteadAh, you're right that
tee is the correct way to do this here. I wasn't aware of how the > redirect will truncate the target file first before running the sed operation, effectively nuking the file. Thanks for the help.I really should have tested this on a local file for inplace overwrites first, instead of writing it to another file and doing a diff locally.