I have NixOS setup on btrfs with a subvolume for /var/logs
, I’m also using an “Erase Your Darlings” set up that remounts a blank root subvolume every boot (I did this following the blog here Encypted Btrfs Root with Opt-in State on NixOS). I don’t think this should be affecting anything as like I mentioned my logs are kept on a separate subvolume, but I think it’s worth mentioning just in case.
journalctl
is not keeping any logs past the current boot on my system, i.e. when i run
$ jurnalctl --list-boots
0 3d297bd3eb774f48bfafc2b28f96b068 Sun 2020-12-20 01:58:44 EST—Sun 2020-12-20 13:31:22 EST
only the one boot (the current boot) shows up. journalctl
on its own will only show the logs from the current boot as well. Persistent journal-ing is enabled, i.e.
$ cat /etc/systemd/journald.conf
[Journal]
Storage=persistent
RateLimitInterval=30s
RateLimitBurst=10000
When I look at where the journal logs are suppose to be stored, they appear to be there, i.e.
$ ls /var/log/journal/
0949408e2f0c46b4be584634ab62ffdb 64c71a9e3de14b2c930a2100848a40b9 b8f01ca74bef48b1a2eb28dad07726a9
0dfe203d27c848dd9368b6b6d8122066 737d9765707d4ca88b08582f1bc8ae5f be7d4b12f4924593acd2a24addda0c80
12da9d63a86149279b29edb0b51ebcdc 77f98be47cf445bca57a7ecc92c07c87 d20f9aad63404b99a9925f63e68c501e
1aff1e7deced4f948285679f200f87bd 7f6204c6aea64a8282754e0ef7067501 dbe5bebe75f14661ac596bf5b875ce0b
24557433f75649c390a3cd1504eaf5ad 942c375fc571427d8b779fa1721f5f42 df705c58a4d14fdd99d080b7b5ee6301
27940ff39f86483ca60246f9966b2d6c 945afdd75021446daa3313de1e9b4e9f e32a7453bcb541b88c0a14133b73b17b
2dbdb9e18d5a4fe2af0868c68242b158 99b26b2ecc7348fd89485113fb1df0b1 e698594a7c0a43b3a972b600a0afab06
492a79ff9ff649189476d80828cdcbb7 9d120ab1ddb14f7e90169d98bdad7dd7 e8f512374d894ce3a25bc012ff5ba224
4a17b10035d443a98146022686f3329c a14d25b8960f4ade92fd81943e398500 f2c065a36dab47fbb47aaf09a8362c34
4eb036b6100e4e78abd019a4c21c8752 b4239c4971084cb5bcbd5ba50303cb60 f6115c46dc3847409030d82a752fd999
52f37a9013384fa8b68960808778cfed b59db280ddae44388a14ab3fc0eb9f87 ffe6a3e0ba194d8cbb8c08b14778edcc
561099a00a264e499bfd3a5a6f4980e7 b7665d1914cd41dc93406d8488004eb0
However not even the current boot that was listed with journalctl --list-boots
appears in there. The permissions for /var/log/journal
are drwxr-sr-x+ 1 root systemd-journal
. It’s like journalctl is keeping its logs somewhere else, but I have no idea of how to find out why. I’m at my wits end here, any help would be greatly appreciated
SOLVED:
Thanks to some help on reddit I figured out I needed to set set /etc/machine-id statically