Where are fsck results logged at boot time, after /forcefsck?
Possibly you are affected by this bug: "Does not log fsck invocations in /var/log/fsck/"
For Ubuntu 14.xx:
I found some fsck logs in /var/log/upstart/mountall.log
.
For Ubuntu 16.04 and 18.04 root partitions
You're likely looking for /run/initramfs/fsck.log
.
An fsck of the root filesystem necessarily happens before the root filesystem has been mounted as writable, so the filesystem check occurs early in the boot process while the system is still running from the initramfs. An fsck log is written to a RAM-backed filesystem (tmpfs) that is available for writing at this time, and it continues to be available after boot at /run/initramfs/fsck.log
. This is volatile storage, so fsck logs are lost once the system reboots. It would be nice if these logs were copied to non-volatile storage after the root filesystem is mounted as writable, but this does not appear to be the case.
Here's an example:
$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 238.5G 0 disk
├─sda1 8:1 0 512M 0 part /boot/efi
└─sda2 8:2 0 238G 0 part /
$ cat /run/initramfs/fsck.log
Log of fsck -C -a -V -t ext4 /dev/sda2
Fri Nov 30 22:35:21 2018
fsck from util-linux 2.31.1
[/sbin/fsck.ext4 (1) -- /dev/sda2] fsck.ext4 -a -C0 /dev/sda2
/dev/sda2: clean, 653295/15597568 files, 6658147/62383360 blocks
Fri Nov 30 22:35:21 2018
----------------
For Ubuntu 16.04
The command
journalctl -b --no-pager | grep systemd-fsck
reports non root partition file system checks.similar to this:
Mar 22 15:06:26 64bitUbuntu systemd-fsck[750]: /dev/sdb1: clean, 146223/121454592 files, 356711795/485818368 blocks
For root partition checks at boot issue the command
more /var/log/boot.log
Provides results similar to this:
/dev/sda2: clean, 349091/1954064 files, 2379983/7814912 blocks
For Ubuntu 18.04
The command journalctl -b --no-pager | grep systemd-fsck
and grep systemd-fsck /var/log/syslog
both report non root partition file system checks.similar to this:
Sep 25 16:06:29 me-Z370-HD3P systemd-fsck[615]: Scratch: clean, 19/6520832 files, 555602/26081280 blocks
Sep 25 16:06:29 me-Z370-HD3P systemd-fsck[609]: /dev/sda1: clean, 47014/89374720 files, 294970235/357492992 blocks
Sep 25 16:06:29 me-Z370-HD3P systemd-fsck[613]: /dev/sda5: clean, 6707/32727040 files, 7464312/130885120 blocks
Checks of root partitions mounted by UUID results don't appear to be logged even if forced.