I need to change the default configuration of journald on Ubuntu Core 16 so that I can see docker daemon logs from previous boots.
However, /etc/systemd/journald.conf is on a read-only file system, and all information I have found regarding making changes to such a file fail.
The standard advice is to sudo mount -o remount,rw /
, but this gives me the error message mount: cannot remount /dev/root read-write, is write-protected
The ubuntu core documentation indicates that the udisks2 snap should be used for disk management, but from reading the documentation on that software, I can't really ascertain that this functionality is available.
Most other use-cases for modifying /etc files seem to be resolved by manipulating substitutes.
Best Answer
For multiple boot logs (How to find previous boot log after Ubuntu 16.04 restarts?) you don't need read/write access to
/etc
. You need read/write access to/var/log
which you should have already.To summarize the link:
Display list of previous boots
After boot history has accumulated, use:
Display last boot log
Pay close attention to the parameter
-b-1
it is different than other references you may see.Keep log file size down with
vacuum
I have a monthly
cron
job setup to keep log files down to 200MB in size: Systemd logs (`journalctl`) are too large and slow. This not only decreases storage requirements but speeds up search across all boot logs.For example to reduce 312 MB consumption down to 200 MB (or less) use: