17

I booted Ubuntu in recovery mode to try and fix a disk error.

However, when I run:

fsck

I just get:

fsck from util-linux 2.31.1

And nothing else happens.

Any fsck command is simply printing 'fsck from util-linux 2.31.1' and exiting, regardless of options and arguments.

This is preventing me from fixing the disk error and being able to recover the system.

MHG
  • 410
  • 1
  • 3
  • 11

2 Answers2

12

The command I needed was fsck.ext4, e.g.

fsck.ext4 -F

This let me fix the disk issues and recover the system.

MHG
  • 410
  • 1
  • 3
  • 11
2

When executing filesystem check you need to specify the filesystem itself in to the command line. Its rarely need to flush the filesystem buffers. To check the filesystem use -f

fsck -f /filesystem

To add explicitly type of the filesystem you can use format:

fsck -t ext4 -f /filesystem
Romeo Ninov
  • 16,541
  • 5
  • 32
  • 44
  • Any `fsck` command is simply printing 'fsck from util-linux 2.31.1' and exiting, regardless of options and arguments. It seems `fsck.ext4` is the required command in this situation. – MHG Nov 05 '18 at 10:59
  • `fsck` usually recognize the filesystem. But its not need to use `fsck.ext4` format, you ac add the type to the `fsck` command itself. See my edited answer – Romeo Ninov Nov 05 '18 at 11:07
  • 2
    `fsck -t ext4 -f /filesystem` also just prints `fsck from util-linux 2.31.1` and exits. – MHG Nov 22 '18 at 13:33
  • I needed to add /dev/sda1 instead of /filesystem. – Virgo May 21 '20 at 06:06
  • 1
    @Virgo, if you do not have records in `/etc/fstab` you should use the device name instead of filesystem mount point – Romeo Ninov May 21 '20 at 06:39