initrd-setup-root: Set up more /var directories from packages#60
initrd-setup-root: Set up more /var directories from packages#60pothos merged 1 commit intoflatcar-masterfrom
Conversation
This pulls in flatcar/bootengine#60 to fix the persisting of the journal on first boot.
| baselayout-home.conf base_image_var.conf \ | ||
| var.conf |
There was a problem hiding this comment.
Where the base_image_var.conf and var.conf come from?
There was a problem hiding this comment.
All these files are under /sysroot/usr/lib/tmpfiles.d/
There was a problem hiding this comment.
I got an error from the initramfs when trying to apply this conf:
bash-5.1# systemd-tmpfiles --root=/sysroot --create var.conf
/sysroot/usr/lib/tmpfiles.d/var.conf:15: Failed to resolve group 'utmp'.
There was a problem hiding this comment.
Sorry for the confusion. I meant that I know that baselayout-home.conf comes from our baselayout project, but I don't know from which project base_image_var.conf and var.conf come from. I couldn't find them in systemd, init or baselayout. That's why I'm asking.
There was a problem hiding this comment.
base_image_var.conf is generated based on package contents, var.conf comes from systemd.
Ok, sounds like we should not add var.conf directly but only copy the wanted line somehow
There was a problem hiding this comment.
Ok, sounds like we should not add
var.confdirectly but only copy the wanted line somehow
flatcar-tmpfiles in baselayout could also copy the utmp group to solve the issue Mathieu had.
This pulls in flatcar/bootengine#60 and flatcar/baselayout#29 to fix the persisting of the journal on first boot.
This pulls in flatcar/bootengine#60 and flatcar/baselayout#29 to fix the persisting of the journal on first boot.
| baselayout.conf baselayout-usr.conf \ | ||
| baselayout-home.conf | ||
| baselayout-home.conf base_image_var.conf \ | ||
| var.conf |
There was a problem hiding this comment.
| var.conf | |
| systemd-tmpfiles --root=/sysroot --create var.conf --exclude-prefix /var/log/wtmp --exclude-prefix /var/log/btmp --exclude-prefix /var/log/lastlog |
There was a problem hiding this comment.
Ah, interesting, I went with flatcar/baselayout#29 to only work on Flatcar-specific things and be independent from systemd changes
|
Note: it's possible to quickly identify if the system is persisting logs by running: |
This pulls in flatcar/bootengine#60 and flatcar/baselayout#29 to fix the persisting of the journal on first boot.
This pulls in flatcar/bootengine#60 and flatcar/baselayout#29 to fix the persisting of the journal on first boot.
This pulls in flatcar/bootengine#60 and flatcar/baselayout#29 to fix the persisting of the journal on first boot.
|
Looks ok now: After the reboot I also see the first boot: |
This pulls in flatcar/bootengine#60 and flatcar/baselayout#29 to fix the persisting of the journal on first boot.
The base_image_var.conf contents are generated during image build and don't originally come from tmpfiles rules but from package installation. For those rules coming from a package's tmpfiles I think t's enough to let them do the job at their regular boot stage but for those not from tmpfiles we don't really know whether this works for them, so I added it as precaution. Also, add info on where /var/log/journal gets set up.
This pulls in flatcar/bootengine#60 and flatcar/baselayout#29 to fix the persisting of the journal on first boot.
This pulls in flatcar/bootengine#60 and flatcar/baselayout#29 to fix the persisting of the journal on first boot.
This pulls in flatcar/bootengine#60 and flatcar/baselayout#29 to fix the persisting of the journal on first boot.
This pulls in flatcar/bootengine#60 and flatcar/baselayout#29 to fix the persisting of the journal on first boot.
This pulls in flatcar/bootengine#60 and flatcar/baselayout#29 to fix the persisting of the journal on first boot.
This pulls in flatcar/bootengine#60 and flatcar/baselayout#29 to fix the persisting of the journal on first boot.
This pulls in flatcar/bootengine#60 and flatcar/baselayout#29 to fix the persisting of the journal on first boot.
The base_image_var.conf contents are generated during image build and
don't originally come from tmpfiles rules but from package
installation. For those rules coming from a package's tmpfiles I think
t's enough to let them do the job at their regular boot stage but for
those not from tmpfiles we don't really know whether this works for
them, so I added it as precaution. Also, add info on where
/var/log/journal gets set up.
How to use
Backport to Alpha
Testing done
Done