Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved]file system check forced every time I boot
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
dgulotta
Tux's lil' helper
Tux's lil' helper


Joined: 09 Jan 2006
Posts: 88

PostPosted: Mon Feb 04, 2013 2:53 pm    Post subject: [solved]file system check forced every time I boot Reply with quote

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
View user's profile Send private message
lexflex
Guru
Guru


Joined: 05 Mar 2006
Posts: 363
Location: the Netherlands

PostPosted: Mon Feb 04, 2013 4:01 pm    Post subject: Reply with quote

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
View user's profile Send private message
dgulotta
Tux's lil' helper
Tux's lil' helper


Joined: 09 Jan 2006
Posts: 88

PostPosted: Mon Feb 04, 2013 4:16 pm    Post subject: Reply with quote

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
View user's profile Send private message
darkphader
Veteran
Veteran


Joined: 09 May 2002
Posts: 1217
Location: Motown

PostPosted: Mon Feb 04, 2013 7:39 pm    Post subject: Reply with quote

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
View user's profile Send private message
lexflex
Guru
Guru


Joined: 05 Mar 2006
Posts: 363
Location: the Netherlands

PostPosted: Mon Feb 04, 2013 9:04 pm    Post subject: Reply with quote

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
Code:
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.
Back to top
View user's profile Send private message
dgulotta
Tux's lil' helper
Tux's lil' helper


Joined: 09 Jan 2006
Posts: 88

PostPosted: Tue Feb 05, 2013 4:24 am    Post subject: Reply with quote

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
View user's profile Send private message
dgulotta
Tux's lil' helper
Tux's lil' helper


Joined: 09 Jan 2006
Posts: 88

PostPosted: Wed Feb 06, 2013 3:10 pm    Post subject: Reply with quote

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
View user's profile Send private message
dgulotta
Tux's lil' helper
Tux's lil' helper


Joined: 09 Jan 2006
Posts: 88

PostPosted: Wed Feb 06, 2013 4:38 pm    Post subject: Reply with quote

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
View user's profile Send private message
darkphader
Veteran
Veteran


Joined: 09 May 2002
Posts: 1217
Location: Motown

PostPosted: Wed Feb 06, 2013 4:54 pm    Post subject: Reply with quote

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
View user's profile Send private message
limn
l33t
l33t


Joined: 13 May 2005
Posts: 997

PostPosted: Wed Feb 06, 2013 4:55 pm    Post subject: Reply with quote

You might try removing the journal and adding it back.
Back to top
View user's profile Send private message
dgulotta
Tux's lil' helper
Tux's lil' helper


Joined: 09 Jan 2006
Posts: 88

PostPosted: Wed Feb 06, 2013 4:58 pm    Post subject: Reply with quote

limn wrote:
You might try removing the journal and adding it back.


That fixed the problem, thanks.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum