4

I did a check from a bootable Ubuntu USB stick and ran

sudo fsck -y /dev/sda2

on the main Linux partition in the computer. The output is something like

...
Pass 1B:  Rescanning for multiply-claimed blocks
Error while scanning inodes (207...): Inode checksum does not match inode

/dev/sda2: **** FILE SYSTEM WAS MODIFIED ***
e2fsck: aborted

/dev/sda2: **** FILE SYSTEM WAS MODIFIED ***

Exit-code: 9

Was that it? Or is there a way to repair the drive?

Alex
  • 801

1 Answers1

4

Suggested commands

  • First of all, make sure that the target file system is unmounted.

  • I am usually using the following command line to check/repair ext file systems,

    sudo e2fsck -cf /dev/sdxn
    

    where x is the drive letter and n is the partition number, so in your case

    sudo e2fsck -cf /dev/sda2
    

    unless the device order has been changed.

Options

   -c     This option causes e2fsck to use badblocks(8) program  to  do  a  read-only
          scan  of the device in order to find any bad blocks.  If any bad blocks are
          found, they are added to the bad block inode to  prevent  them  from  being
          allocated  to a file or directory.  If this option is specified twice, then
          the bad block scan will be done using a non-destructive read-write test.

   -f     Force checking even if the file system seems clean.

Exit code

   The exit code returned by e2fsck is the sum of the following conditions:
        0    - No errors
        1    - File system errors corrected
        2    - File system errors corrected, system should
               be rebooted
        4    - File system errors left uncorrected
        8    - Operational error
        16   - Usage or syntax error
        32   - E2fsck canceled by user request
        128  - Shared library error

So in your case, 9=8+1: Operational error and File system errors corrected

Next steps

If the process gets aborted also when you try again, I don't know what could repair the file system. Backup what can be backed up and create a fresh file system.

Maybe the drive has physical defects. You can check for that according to

FSCK reports that filesystem still has errors - what should I do now?

sudodus
  • 46,324
  • 5
  • 88
  • 152