0

I want to check my filesystem. It has to be unmounted, so I found that I should

$ sudo touch /forcefsck
$ reboot

I did that on Sat Dec 30 10:02 2017 (approx.) After rebooting, this is what I get (pasting only the relevant info)

My partitions:

$ sudo fdisk -l
Device     Boot Id Type
/dev/sda2  *    83 Linux
/dev/sda3        5 Extended
/dev/sda4       83 Linux
/dev/sda5       82 Linux swap / Solaris
/dev/sda6       83 Linux
/dev/sda7       83 Linux

Where is each one mounted (could have used other commands, I know):

$ df -h
Filesystem   Mounted on
/dev/sda6    /
/dev/sda4    /mnt/old-home
/dev/sda7    /home
/dev/sda2    /boot

Last time each parittion was checked:

$ sudo tune2fs -l /dev/sda2 | grep -i check
Last checked:             Sat Dec 30 10:02:48 2017
Check interval:           0 (<none>)
$ sudo tune2fs -l /dev/sda4 | grep -i check
Last checked:             Thu Nov  3 17:39:51 2016
Check interval:           0 (<none>)
$ sudo tune2fs -l /dev/sda6 | grep -i check
Last checked:             Fri Nov  4 12:08:31 2016
Check interval:           0 (<none>)
$ sudo tune2fs -l /dev/sda7 | grep -i check
Last checked:             Sat Dec 30 10:02:04 2017
Check interval:           0 (<none>)

I expected /dev/sda6 (i.e., /) to be checked, but it was not.

Is that correct?

What is the correct way to check /? I think I am currently unable to boot from a Live CD/USB.

1 Answers1

1

You can set the Maximum mount count to 1 and reboot which should start the fsck.

Before doing so, note down the default value you get with the command as follows. In the following example we will use /dev/sda6 as an example.

tune2fs -l /dev/sda6 | grep 'Maximum mount count'

Then set the value to 1.

tune2fs -c 1 /dev/sda6

Then reboot and the filesystem check should start.

Thomas
  • 6,433