-
Notifications
You must be signed in to change notification settings - Fork 9
initrd-setup-root: Set up more /var directories from packages #60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where the base_image_var.conf
and var.conf
come from?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All these files are under /sysroot/usr/lib/tmpfiles.d/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, sounds like we should not add
var.conf
directly 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.
systemd-tmpfiles --root=/sysroot --create \ | ||
baselayout.conf baselayout-usr.conf \ | ||
baselayout-home.conf | ||
baselayout-home.conf base_image_var.conf \ | ||
var.conf |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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