# [solved]file system check forced every time I boot

## dgulotta

Recently, my system crashed and I had to boot from a CD in order to repair the filesystem.  It appeared that the filesystem was successfully repaired, but since then I always get "/dev/sda2 contains a filesystem with errors, check forced" every time I boot.  The check never finds anything wrong, and the system boots successfully.  How can I convince my system that it doesn't need to run the check on every boot?Last edited by dgulotta on Wed Feb 06, 2013 4:58 pm; edited 1 time in total

----------

## lexflex

Did you change your /etc/fstab  when repairing your system?

Depending on the values of the last two numbers in the line for /dev/sda2 a fscheck is forced on startup I think.

(If the last value is set to zero there is no automatic check on boot)

Alex.

----------

## dgulotta

No, I didn't change /etc/fstab.  Even if it checks the filesystem every time, it shouldn't be claiming there are errors every time.  Anyway, the fstab entry is:

```
/dev/sda2               /               ext3            noatime         0 1

```

----------

## darkphader

Think you may need to do an offline fsck. Boot from a sysrescuecd and check the filesystem.

----------

## lexflex

 *dgulotta wrote:*   

> Even if it checks the filesystem every time, it shouldn't be claiming there are errors every time.  

 

Mm yeah, you are right.

Next to trying an offline scan as suggested, you might also try to use smartctl

Use 

```
smartctl -h
```

 to see all option, it can give more information about the disk itself and includes some test (smartctl --test /dev/sda) to check if your disk is alright.

----------

## dgulotta

 *darkphader wrote:*   

> Think you may need to do an offline fsck. Boot from a sysrescuecd and check the filesystem.

 

I did that once already when I repaired the file system, but I suppose it won't hurt to try again.

----------

## dgulotta

I ran fsck from a live cd, and it reported that the filesystem was clean.  But when I boot from disk, I still get  "/dev/sda2 contains a filesystem with errors, check forced".

----------

## dgulotta

I tried mounting and then unmounting the filesystem from the livecd.  fsck reports the filesystem as clean beforehand and as having errors afterward.  The dmesg contains:

```

EXT3-fs (sda2): warning: ext3_clear_journal_err: Filesystem error recorded from previous mount: IO failure

EXT3-fs (sda2): warning: ext3_clear_journal_err: Marking fs in need of filesystem check.

EXT3-fs (sda2): warning: mounting fs with errors, running e2fsck is recommended

```

So it appears that there is something weird going on with the journal that fsck doesn't detect, but mount does.

----------

## darkphader

Maybe your drive is going bad. Have you run smartctl (from smartmontools) against it?

----------

## limn

You might try removing the journal and adding it back.

----------

## dgulotta

 *limn wrote:*   

> You might try removing the journal and adding it back.

 

That fixed the problem, thanks.

----------

