View previous topic :: View next topic |
Author |
Message |
dgulotta Tux's lil' helper
Joined: 09 Jan 2006 Posts: 88
|
Posted: Mon Feb 04, 2013 2:53 pm Post subject: [solved]file system check forced every time I boot |
|
|
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 |
|
Back to top |
|
|
lexflex Guru
Joined: 05 Mar 2006 Posts: 363 Location: the Netherlands
|
Posted: Mon Feb 04, 2013 4:01 pm Post subject: |
|
|
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. |
|
Back to top |
|
|
dgulotta Tux's lil' helper
Joined: 09 Jan 2006 Posts: 88
|
Posted: Mon Feb 04, 2013 4:16 pm Post subject: |
|
|
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:
Code: | /dev/sda2 / ext3 noatime 0 1
|
|
|
Back to top |
|
|
darkphader Veteran
Joined: 09 May 2002 Posts: 1217 Location: Motown
|
Posted: Mon Feb 04, 2013 7:39 pm Post subject: |
|
|
Think you may need to do an offline fsck. Boot from a sysrescuecd and check the filesystem. _________________ WYSIWYG - What You See Is What You Grep |
|
Back to top |
|
|
lexflex Guru
Joined: 05 Mar 2006 Posts: 363 Location: the Netherlands
|
Posted: Mon Feb 04, 2013 9:04 pm Post subject: |
|
|
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 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. |
|
Back to top |
|
|
dgulotta Tux's lil' helper
Joined: 09 Jan 2006 Posts: 88
|
Posted: Tue Feb 05, 2013 4:24 am Post subject: |
|
|
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. |
|
Back to top |
|
|
dgulotta Tux's lil' helper
Joined: 09 Jan 2006 Posts: 88
|
Posted: Wed Feb 06, 2013 3:10 pm Post subject: |
|
|
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". |
|
Back to top |
|
|
dgulotta Tux's lil' helper
Joined: 09 Jan 2006 Posts: 88
|
Posted: Wed Feb 06, 2013 4:38 pm Post subject: |
|
|
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:
Code: |
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. |
|
Back to top |
|
|
darkphader Veteran
Joined: 09 May 2002 Posts: 1217 Location: Motown
|
Posted: Wed Feb 06, 2013 4:54 pm Post subject: |
|
|
Maybe your drive is going bad. Have you run smartctl (from smartmontools) against it? _________________ WYSIWYG - What You See Is What You Grep |
|
Back to top |
|
|
limn l33t
Joined: 13 May 2005 Posts: 997
|
Posted: Wed Feb 06, 2013 4:55 pm Post subject: |
|
|
You might try removing the journal and adding it back. |
|
Back to top |
|
|
dgulotta Tux's lil' helper
Joined: 09 Jan 2006 Posts: 88
|
Posted: Wed Feb 06, 2013 4:58 pm Post subject: |
|
|
limn wrote: | You might try removing the journal and adding it back. |
That fixed the problem, thanks. |
|
Back to top |
|
|
|