# turn off fsck [SOLVED]

## bjlockie

Can I turn off fsck?

It does it twice when it boots (but the first is aborted due to an error).

Then it says 'Entering runlevel 3' and does a full fsck (it doesn't abort) on a 500GB drive.

It happens about 90% of the time but i hate the unneeded fsck.

----------

## LesCoke

In your /etc/fstab file:

The sixth field specifies the order that file-systems are checked.  The root should normally have a 1 here (according to man fstab); however a value of zero can be used to disable checking.

You are saying that the check occurs on every boot?  Unless the file-system has been tuned to specifically perform the check on every boot, I would say it sounds like the file-system is not being properly unmounted at shutdown/restart?  Reason I say this is that fsck usually only occurs if the file-system was not unmounted properly leaving the unclean flag set; otherwise, fsck is only forced if it has been N days since last fsck (as set using fs tune parameters).  Is shutdown/restart hanging?

I use JFS and it does replay the journal on every boot, but it doesn't do a serious check unless that discovers a problem.

Which file-system(s) are you using?  Which one is doing the fsck's?

Les

----------

## bjlockie

 *LesCoke wrote:*   

> In your /etc/fstab file:
> 
> The sixth field specifies the order that file-systems are checked.  The root should normally have a 1 here (according to man fstab); however a value of zero can be used to disable checking.
> 
> You are saying that the check occurs on every boot?  Unless the file-system has been tuned to specifically perform the check on every boot, I would say it sounds like the file-system is not being properly unmounted at shutdown/restart?  Reason I say this is that fsck usually only occurs if the file-system was not unmounted properly leaving the unclean flag set; otherwise, fsck is only forced if it has been N days since last fsck (as set using fs tune parameters).  Is shutdown/restart hanging?
> ...

 

The first fsck says the boot block date is in the future and then it fixes that but aborts but says I have to run fsck manually.

The runlevel 3 does a serious fsck.

I am using ext3.

KDE-4.3

kernel-2.6.31.6

Shutdown doesn't hang but I boot into a console and run kdm so when it shuts down, kde asks if I want to about the root console login.

I'm not sure forcefully quitting that login is the problem but previous kde's never asked me.

----------

## NeddySeagoon

bjlockie,

I suspect your clock setting is wrong ... the problem scenario goes like this.

Your BIOS clock is in error, so that at startup when fsck runs, sometimes the time/date on the boot is in the future.

This suggests that your BIOS clock and/or timezone are incorrect.  As the system boots, its gets correct time from ntp.

However, fsck has to run before the network is started and ntp time obtained.

Check you time setup.  The settings you should use depend on wether you dual boot with Windows or not.

Don't prevent fsck running - fix the root cause.

----------

## bjlockie

 *NeddySeagoon wrote:*   

> bjlockie,
> 
> I suspect your clock setting is wrong ... the problem scenario goes like this.
> 
> Your BIOS clock is in error, so that at startup when fsck runs, sometimes the time/date on the boot is in the future.
> ...

 

Makes sense.

I think my system is UTC+0 when it boots but after ntp sets the time to UTC+5 (whatever EST is).

I don't use Windows.

After it is done booting:

$ date

Fri Nov 27 19:44:43 EST 2009

$ ls -l /etc/timezone

-rw-r--r-- 1 root root 8 Oct 27  2008 /etc/timezone

$ more /etc/timezone

EST5EDT

----------

## Odysseus

 *bjlockie wrote:*   

>  *LesCoke wrote:*   In your /etc/fstab file:
> 
> The sixth field specifies the order that file-systems are checked.  The root should normally have a 1 here (according to man fstab); however a value of zero can be used to disable checking.
> 
> You are saying that the check occurs on every boot?  Unless the file-system has been tuned to specifically perform the check on every boot, I would say it sounds like the file-system is not being properly unmounted at shutdown/restart?  Reason I say this is that fsck usually only occurs if the file-system was not unmounted properly leaving the unclean flag set; otherwise, fsck is only forced if it has been N days since last fsck (as set using fs tune parameters).  Is shutdown/restart hanging?
> ...

 

There are several posts and work-a-rounds on the board relating to this. I'm running a dual boot system and my system clock is set to local time for Windows.  I had this issue and resolved it by changing the boot order slightly so that the clock was synced before the file system is checked. After doing so no more errors. 

I found the solution by searching the forum "fsck boot block future". I found the solution on this thread https://forums.gentoo.org/viewtopic-t-549678-highlight-boot+block+date+future.html and involves a longstanding bug reported here https://bugs.gentoo.org/142850

In a nutshell to resolve this, you need to edit a couple of lines in your /sbin/rc file so that your clock is checked before the file system is checked. After doing so you'll be good to go.

In your case however, since you aren't running Windows, an easier solution may just be to set your BIOS time and all files or symbolic-links in your system relating to time, to "UTC", so that they are all consistent. Then the errors should go away. 

In KDE you can independently set your user's time via the clock widget. That way you have easily accessible your local time without effecting how your system keeps time. Just remember to keep the "Date and Time" in KDE "System Settings"  to the UTC time and you'll be good to go.

I hope this helps.

Ciao

----------

## NeddySeagoon

bjlockie,

Your BIOS should be set to UTC time.  You are UTC-5, provided you are not on daylight saving time now, so add 5 hours to your local time

and set your BIOS time to that.

Copy the file /usr/share/zoneinfo/<city-near-you> to /etc/localtime  <city-near-you> my be in a further subdirectory.

If you use baselayout2, put  <city-near-you> into /etc/timezone like mine  

```
Europe/London
```

If you use baselayout1, set your timezone in /etc/conf.d/hwclock ... following the comments in the file.

To test, remove ntp-client and ntpd from the default runlevel and reboot.

The BIOS time will be adjusted by your timezone. The 

```
date 
```

command should give your correct local time and 

```
date -u
```

will show UTC.  There may be some small errors, as ntp-client and ntpd are not adjusting your clock.

Provided that works put ntp-client and ntpd back in the defualt runlevel.

----------

