Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Gentoo: User

fsck date problem during boot

 

 

Gentoo user RSS feed   Index | Next | Previous | View Threaded


reader at newsguy

Nov 4, 2009, 8:20 AM

Post #1 of 15 (754 views)
Permalink
fsck date problem during boot

I've been fiddling with a new kernel, and have had several occasions
to reboot lately.

If I mounted /boot to cp the new kernel etc over, I have a problem on
reboot for sure.

Somehow the date of last fsck on /boot is seen as `in the future' so
fsck fails on /dev/had1 (/boot).

Which means nearly all other boot time services also fail. So I end
up logging into a system with no services running and only `/' mounted.

At that point, I run fsck /dev/hda1 which finds a date error, fixes it
and then reboot... this time everything works, and if I don't mount
/boot a reboot just works... but if I end up having to fiddle further
with kernel, mount /boot to copy over etc. On reboot the same problem
occurs.

I tried to get ahead of the game by umounting /boot after cp over
kernel and running fsck on it before reboot. fsck doesn't find a
problem. But at reboot... the same problem occurs.

What it means is every reboot requires 2 reboots (if I mounted /boot)

I'm guessing its some kind of timing problem with events during boot.
But not sure what to do about it.

The clock can't be getting that far off in a few seconds, and is reset
when ntp-client runs. So I don't understand the error saying `in the
future'.


stroller at stellar

Nov 4, 2009, 9:10 AM

Post #2 of 15 (747 views)
Permalink
Re: fsck date problem during boot [In reply to]

On 4 Nov 2009, at 15:45, Harry Putnam wrote:
> ...
> Somehow the date of last fsck on /boot is seen as `in the future' so
> fsck fails on /dev/had1 (/boot).

The first thing I would want to check is the motherboard battery. Is
the time correct if you reboot and immediately enter BIOS?

Stroller.


reader at newsguy

Nov 4, 2009, 12:20 PM

Post #3 of 15 (746 views)
Permalink
Re: fsck date problem during boot [In reply to]

Stroller <stroller [at] stellar> writes:

> On 4 Nov 2009, at 15:45, Harry Putnam wrote:
>> ...
>> Somehow the date of last fsck on /boot is seen as `in the future' so
>> fsck fails on /dev/had1 (/boot).
>
> The first thing I would want to check is the motherboard battery. Is
> the time correct if you reboot and immediately enter BIOS?

That was a pretty good help but apparently not all the story.

When I checked bios, the clock was exactly 1 hr fast (didn't pick up
the end of daylight saving time I guess).

Reset the clock and tested with 2 more reboots, each time mounting
/boot and fiddling around with files.

Each time the same failure occurs. I check bios time again. Its
right.

Here is the (edited) output form fsck

Superblock last mount time (Wed Nov 4 18:05:13 2009,
now = Wed Nov 4 12:11:49 2009) is in the future.
Fix<y>? yes

[...]
------- --------- ---=--- --------- --------
Superblock last mount time (Wed Nov 4 18:14:54 2009,
now = Wed Nov 4 12:18:01 2009) is in the future.
Fix<y>? yes

[...]

so still somehow, those last mount dates are way wrong.

I hope I'm checking the right thing in bios. Its under cmos and shows
the time ticking away. You can adjust all columns. with +/-.


w41ter at gmail

Nov 4, 2009, 12:20 PM

Post #4 of 15 (743 views)
Permalink
Re: fsck date problem during boot [In reply to]

On 11/04/2009 10:43 AM, Harry Putnam wrote:
> Stroller <stroller [at] stellar> writes:
>
>> On 4 Nov 2009, at 15:45, Harry Putnam wrote:
>>> ...
>>> Somehow the date of last fsck on /boot is seen as `in the future' so
>>> fsck fails on /dev/had1 (/boot).
>>
>> The first thing I would want to check is the motherboard battery. Is
>> the time correct if you reboot and immediately enter BIOS?
>
> That was a pretty good help but apparently not all the story.
>
> When I checked bios, the clock was exactly 1 hr fast (didn't pick up
> the end of daylight saving time I guess).
>
> Reset the clock and tested with 2 more reboots, each time mounting
> /boot and fiddling around with files.
>
> Each time the same failure occurs. I check bios time again. Its
> right.
>
> Here is the (edited) output form fsck
>
> Superblock last mount time (Wed Nov 4 18:05:13 2009,
> now = Wed Nov 4 12:11:49 2009) is in the future.
> Fix<y>? yes
>
> [...]
> ------- --------- ---=--- --------- --------
> Superblock last mount time (Wed Nov 4 18:14:54 2009,
> now = Wed Nov 4 12:18:01 2009) is in the future.
> Fix<y>? yes
>
> [...]
>
> so still somehow, those last mount dates are way wrong.
>
> I hope I'm checking the right thing in bios. Its under cmos and shows
> the time ticking away. You can adjust all columns. with +/-.

Is your bios clock set to UTC, and do you have /etc/localtime pointing to
your correct timezone? e.g. /etc/localtime -> /usr/share/zoneinfo/PST8PDT.

If all that is correct, then I'm guessing the problem will fix itself
if you just wait an hour :o)


rdalek1967 at gmail

Nov 4, 2009, 4:20 PM

Post #5 of 15 (737 views)
Permalink
Re: Re: fsck date problem during boot [In reply to]

Harry Putnam wrote:
> Stroller <stroller [at] stellar> writes:
>
>
>> On 4 Nov 2009, at 15:45, Harry Putnam wrote:
>>
>>> ...
>>> Somehow the date of last fsck on /boot is seen as `in the future' so
>>> fsck fails on /dev/had1 (/boot).
>>>
>> The first thing I would want to check is the motherboard battery. Is
>> the time correct if you reboot and immediately enter BIOS?
>>
>
> That was a pretty good help but apparently not all the story.
>
> When I checked bios, the clock was exactly 1 hr fast (didn't pick up
> the end of daylight saving time I guess).
>
> Reset the clock and tested with 2 more reboots, each time mounting
> /boot and fiddling around with files.
>
> Each time the same failure occurs. I check bios time again. Its
> right.
>
> Here is the (edited) output form fsck
>
> Superblock last mount time (Wed Nov 4 18:05:13 2009,
> now = Wed Nov 4 12:11:49 2009) is in the future.
> Fix<y>? yes
>
> [...]
> ------- --------- ---=--- --------- --------
> Superblock last mount time (Wed Nov 4 18:14:54 2009,
> now = Wed Nov 4 12:18:01 2009) is in the future.
> Fix<y>? yes
>
> [...]
>
> so still somehow, those last mount dates are way wrong.
>
> I hope I'm checking the right thing in bios. Its under cmos and shows
> the time ticking away. You can adjust all columns. with +/-.
>
>

I can't recall exactly how I did this but there is a command to tell the
OS to set the clock on the mobo to the system time when shutting down.
That way everything should sync up when you reboot, except for that tiny
little bit if you shutdown completely for a few days or something. The
command is hwclock. I can't recall where I put the thing because I am
logged into KDE 4 and I can't find nothing in here yet. It's pretty but
it is different so I'm lost.

I *think* I put it in the rc file or something. I remember the file is
run during shutdown tho. That may help if you know which file that is.

Hope that helps.

Dale

:-) :-)


mellitussum at verizon

Nov 4, 2009, 4:28 PM

Post #6 of 15 (734 views)
Permalink
Re: Re: fsck date problem during boot [In reply to]

Dale wrote:
> Harry Putnam wrote:
>
>> Stroller <stroller [at] stellar> writes:
>>
>>
>>
>>> On 4 Nov 2009, at 15:45, Harry Putnam wrote:
>>>
>>>
>>>> ...
>>>> Somehow the date of last fsck on /boot is seen as `in the future' so
>>>> fsck fails on /dev/had1 (/boot).
>>>>
>>>>
>>> The first thing I would want to check is the motherboard battery. Is
>>> the time correct if you reboot and immediately enter BIOS?
>>>
>>>
>> That was a pretty good help but apparently not all the story.
>>
>> When I checked bios, the clock was exactly 1 hr fast (didn't pick up
>> the end of daylight saving time I guess).
>>
>> Reset the clock and tested with 2 more reboots, each time mounting
>> /boot and fiddling around with files.
>>
>> Each time the same failure occurs. I check bios time again. Its
>> right.
>>
>> Here is the (edited) output form fsck
>>
>> Superblock last mount time (Wed Nov 4 18:05:13 2009,
>> now = Wed Nov 4 12:11:49 2009) is in the future.
>> Fix<y>? yes
>>
>> [...]
>> ------- --------- ---=--- --------- --------
>> Superblock last mount time (Wed Nov 4 18:14:54 2009,
>> now = Wed Nov 4 12:18:01 2009) is in the future.
>> Fix<y>? yes
>>
>> [...]
>>
>> so still somehow, those last mount dates are way wrong.
>>
>> I hope I'm checking the right thing in bios. Its under cmos and shows
>> the time ticking away. You can adjust all columns. with +/-.
>>
>>
>>
>
> I can't recall exactly how I did this but there is a command to tell the
> OS to set the clock on the mobo to the system time when shutting down.
> That way everything should sync up when you reboot, except for that tiny
> little bit if you shutdown completely for a few days or something. The
> command is hwclock. I can't recall where I put the thing because I am
> logged into KDE 4 and I can't find nothing in here yet. It's pretty but
> it is different so I'm lost.
>
> I *think* I put it in the rc file or something. I remember the file is
> run during shutdown tho. That may help if you know which file that is.
>
> Hope that helps.
>
> Dale
>
> :-) :-)
>
>
>
It's in /etc/conf.d/clock (or /etc/conf.d/hwclock for baselayout
2/openrc), and it's called CLOCK_SYSTOHC. Set it to yes to write the
system time to hardware on shutdown.


gentoo at sattvik

Nov 4, 2009, 4:40 PM

Post #7 of 15 (739 views)
Permalink
Re: Re: fsck date problem during boot [In reply to]

On Wed, Nov 04, 2009 at 06:20:25PM -0600, Dale wrote:
> I can't recall exactly how I did this but there is a command to tell the
> OS to set the clock on the mobo to the system time when shutting down.
> That way everything should sync up when you reboot, except for that tiny
> little bit if you shutdown completely for a few days or something. The
> command is hwclock. I can't recall where I put the thing because I am
> logged into KDE 4 and I can't find nothing in here yet. It's pretty but
> it is different so I'm lost.
>
> I *think* I put it in the rc file or something. I remember the file is
> run during shutdown tho. That may help if you know which file that is.

I believe you are talking about the 'clock_systohc' setting in
'/etc/conf.d/hwclock'.


If none of these things help, you could always try disabling time-based
forced checks using tune2fs's option '-i 0d'. You can read the man page
for how to do it.


Sincerely,

Daniel Solano Gómez


rdalek1967 at gmail

Nov 4, 2009, 8:05 PM

Post #8 of 15 (737 views)
Permalink
Re: Re: fsck date problem during boot [In reply to]

Chris Reffett wrote:
> Dale wrote:
>> Harry Putnam wrote:
>>
>>> Stroller <stroller [at] stellar> writes:
>>>
>>>
>>>
>>>> On 4 Nov 2009, at 15:45, Harry Putnam wrote:
>>>>
>>>>
>>>>> ...
>>>>> Somehow the date of last fsck on /boot is seen as `in the future' so
>>>>> fsck fails on /dev/had1 (/boot).
>>>>>
>>>>>
>>>> The first thing I would want to check is the motherboard battery. Is
>>>> the time correct if you reboot and immediately enter BIOS?
>>>>
>>>>
>>> That was a pretty good help but apparently not all the story.
>>>
>>> When I checked bios, the clock was exactly 1 hr fast (didn't pick up
>>> the end of daylight saving time I guess).
>>>
>>> Reset the clock and tested with 2 more reboots, each time mounting
>>> /boot and fiddling around with files.
>>>
>>> Each time the same failure occurs. I check bios time again. Its
>>> right.
>>>
>>> Here is the (edited) output form fsck
>>>
>>> Superblock last mount time (Wed Nov 4 18:05:13 2009,
>>> now = Wed Nov 4 12:11:49 2009) is in the future.
>>> Fix<y>? yes
>>>
>>> [...]
>>> ------- --------- ---=--- --------- --------
>>> Superblock last mount time (Wed Nov 4 18:14:54 2009,
>>> now = Wed Nov 4 12:18:01 2009) is in the future.
>>> Fix<y>? yes
>>>
>>> [...]
>>>
>>> so still somehow, those last mount dates are way wrong.
>>>
>>> I hope I'm checking the right thing in bios. Its under cmos and shows
>>> the time ticking away. You can adjust all columns. with +/-.
>>>
>>>
>>>
>>
>> I can't recall exactly how I did this but there is a command to tell the
>> OS to set the clock on the mobo to the system time when shutting down.
>> That way everything should sync up when you reboot, except for that tiny
>> little bit if you shutdown completely for a few days or something. The
>> command is hwclock. I can't recall where I put the thing because I am
>> logged into KDE 4 and I can't find nothing in here yet. It's pretty but
>> it is different so I'm lost.
>>
>> I *think* I put it in the rc file or something. I remember the file is
>> run during shutdown tho. That may help if you know which file that is.
>>
>> Hope that helps.
>>
>> Dale
>>
>> :-) :-)
>>
>>
>>
> It's in /etc/conf.d/clock (or /etc/conf.d/hwclock for baselayout
> 2/openrc), and it's called CLOCK_SYSTOHC. Set it to yes to write the
> system time to hardware on shutdown.

I think I did it the hard way then. I put the command in a file
somewhere that runs during shutdown.

More than one way to skin a cat a guess.

Dale

:-) :-)


peter at humphrey

Nov 5, 2009, 3:22 AM

Post #9 of 15 (739 views)
Permalink
Re: fsck date problem during boot [In reply to]

On Wednesday 04 November 2009 15:45:19 Harry Putnam wrote:

> Somehow the date of last fsck on /boot is seen as `in the future' so
> fsck fails on /dev/had1 (/boot).

On my box I have both a standard amd64 system with kde-3.5 and a test system
all ~amd64 with kde-4. If I boot into the standard system, then shut it down
and boot into the test system within an hour of having started the standard
system I get the same "in the future" error on every partition.

The standard system has baselayout-1 and the test system has baselayout-2; I
think there's some problem between these two.

--
Rgds
Peter


neil at digimed

Nov 5, 2009, 5:26 AM

Post #10 of 15 (731 views)
Permalink
Re: fsck date problem during boot [In reply to]

On Thu, 5 Nov 2009 11:22:04 +0000, Peter Humphrey wrote:

> On my box I have both a standard amd64 system with kde-3.5 and a test
> system all ~amd64 with kde-4. If I boot into the standard system, then
> shut it down and boot into the test system within an hour of having
> started the standard system I get the same "in the future" error on
> every partition.

Have you checked the timezone settings in the two KDEs?


--
Neil Bothwick

Joystick: (n.) a device essential for performing business tasks and
training exercises esp. favored by pilots, tank commanders, riverboat
gamblers, and medieval warlords.
Attachments: signature.asc (0.19 KB)


reader at newsguy

Nov 5, 2009, 8:20 AM

Post #11 of 15 (733 views)
Permalink
Re: fsck date problem during boot [In reply to]

walt <w41ter [at] gmail> writes:

[...]

> Is your bios clock set to UTC, and do you have /etc/localtime pointing to

Haa.. there it is. Yes to UTC. But that must have been the case all along
and this just started recently. So, as others have pointed out in the
thread, it must be related to the base-1/base-2 changes.

> your correct timezone? e.g. /etc/localtime -> /usr/share/zoneinfo/PST8PDT.

Local time zone is correct (chicago)

Next time I reboot, I'll check to see if I can change the UTC in bios,
but I don't think I saw such an option when I looked there yesterday.
I wasn't looking for that either though.

But I'm guessing the setting in /etc/conf.d/hwclock to set the
hardware to system at shutdown will fix this, long as I'm not shutdown
very long. I think the setting holds a while.

I'll test it by setting it with `hwclock --set' and see how long it takes to
return to the utc time.


reader at newsguy

Nov 5, 2009, 8:20 AM

Post #12 of 15 (736 views)
Permalink
Re: fsck date problem during boot [In reply to]

Just a note in case other have gotten the idea to set
/etc/conf.d/hwclock to clock_systohc="yes"

You might want to read some of the hwclock manpage, particularly the
section:
Automatic Hardware Clock Synchronization By the Kernel

Where it warns not to use that setting in some cases:

If your system runs with 11 minute mode on, don't use hwclock
--adjust or hwclock --hctosys. You'll just make a mess. It is
acceptable to use a hwclock --hctosys at startup time to get a
reasonable System Time until your system is able to set the System
Time from the external source and start 11 minute mode.

The 11 minute mode referred to is when the kernel is setting the
hardware clock every 11 minutes


peter at humphrey

Nov 6, 2009, 5:52 AM

Post #13 of 15 (731 views)
Permalink
Re: fsck date problem during boot [In reply to]

On Thursday 05 November 2009 13:26:48 Neil Bothwick wrote:
> On Thu, 5 Nov 2009 11:22:04 +0000, Peter Humphrey wrote:
> > On my box I have both a standard amd64 system with kde-3.5 and a test
> > system all ~amd64 with kde-4. If I boot into the standard system, then
> > shut it down and boot into the test system within an hour of having
> > started the standard system I get the same "in the future" error on
> > every partition.
>
> Have you checked the timezone settings in the two KDEs?

I have systohc=yes in both (ignoring the case difference between baselayout
versions) and I have clock=local in both (because there's a rarely used Win
XP partition as well). The baselayout-1 system has TIMEZONE= (i.e.empty) but
I can't see where to set the time zone in the baselayout-2 system.

--
Rgds
Peter


jarausch at igpm

Nov 6, 2009, 7:36 AM

Post #14 of 15 (729 views)
Permalink
Re: fsck date problem during boot [In reply to]

On 6 Nov, Peter Humphrey wrote:
> On Thursday 05 November 2009 13:26:48 Neil Bothwick wrote:
>> On Thu, 5 Nov 2009 11:22:04 +0000, Peter Humphrey wrote:
>> > On my box I have both a standard amd64 system with kde-3.5 and a test
>> > system all ~amd64 with kde-4. If I boot into the standard system, then
>> > shut it down and boot into the test system within an hour of having
>> > started the standard system I get the same "in the future" error on
>> > every partition.
>>
>> Have you checked the timezone settings in the two KDEs?
>
> I have systohc=yes in both (ignoring the case difference between baselayout
> versions) and I have clock=local in both (because there's a rarely used Win
> XP partition as well). The baselayout-1 system has TIMEZONE= (i.e.empty) but
> I can't see where to set the time zone in the baselayout-2 system.
>
e.g.
echo "Europe/Berlin" >/etc/timezone
works here just fine (baselayout-2.0.1)

Helmut.

--
Helmut Jarausch

Lehrstuhl fuer Numerische Mathematik
RWTH - Aachen University
D 52056 Aachen, Germany


billie at gentoo

Nov 6, 2009, 8:21 AM

Post #15 of 15 (732 views)
Permalink
Re: fsck date problem during boot [In reply to]

2009/11/6 Peter Humphrey <peter [at] humphrey>:
>>
>> Have you checked the timezone settings in the two KDEs?
>
> I have systohc=yes in both (ignoring the case difference between baselayout
> versions) and I have clock=local in both (because there's a rarely used Win
> XP partition as well). The baselayout-1 system has TIMEZONE= (i.e.empty) but
> I can't see where to set the time zone in the baselayout-2 system.

With baselayout-2 and openrc. Just set your timezone in /etc/timezone.
For baselayout-2 and openrc there is an upgrade guide [1] which covers
this.
With baselayout-1 edit /etc/conf.d/clock and set the TIMEZONE variable.

This ensures that /etc/localtime is set accordingly after updates of
sys-libs/timezone-data.

[1] http://www.gentoo.org/doc/en/openrc-migration.xml

--
Daniel Pielmeier

Gentoo user RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.