Re: [gentoo-user] Re: System won't boot if CMOS clock is slow

2013-01-18 Thread William Kenworthy
On 19/01/13 06:36, Neil Bothwick wrote:
> On Fri, 18 Jan 2013 18:08:50 + (UTC), Grant Edwards wrote:
> 
 By default, ntpd doesn't seem to want to do
 a step correction to fix large clock errors on startup (there's
 probably an option for that).  
>>>
>>> That's for ntp-client to do.  
>>
>> In additon to being a server, ntpd _is_ an ntp client.
> 
> But ntpd will not handle large jumps in time, such as when booting with a
> broken CMOS clock. So you run /etc/init.d/ntp-client as well, which gets
> the clock right at boot time, then ntpd can keep it right.
> 
>> Are you talking about running ntpclient
>> (http://doolittle.icarus.com/ntpclient) instead of ntpd?
> 
> No.
> 
> % qlist net-misc/ntp | grep init.d
> /etc/init.d/ntpd
> /etc/init.d/ntp-client
> 
> 

It can handle large jumps, check out this in the "man ntp.conf":

tinker panic 0

or the -g option to ntpd (again, its in a man page.)

Basicly, you just need to read and configure it ... I have it working
even on a raspberry pi which has HW clock :)

Even the slew rate, or slew/jump can be set.

BillK






[gentoo-user] Re: System won't boot if CMOS clock is slow

2013-01-18 Thread Grant Edwards
On 2013-01-18, Neil Bothwick  wrote:
> On Fri, 18 Jan 2013 18:08:50 + (UTC), Grant Edwards wrote:
>
>> >> By default, ntpd doesn't seem to want to do
>> >> a step correction to fix large clock errors on startup (there's
>> >> probably an option for that).  
>> >
>> > That's for ntp-client to do.  
>> 
>> In additon to being a server, ntpd _is_ an ntp client.
>
> But ntpd will not handle large jumps in time, such as when booting
> with a broken CMOS clock. So you run /etc/init.d/ntp-client as well,
> which gets the clock right at boot time, then ntpd can keep it right.

Doh!

I couldn't find a package named ntp-client or a program named
ntp-client and didn't think to look in /etc/init.d...

-- 
Grant Edwards   grant.b.edwardsYow! If Robert Di Niro
  at   assassinates Walter Slezak,
  gmail.comwill Jodie Foster marry
   Bonzo??




Re: [gentoo-user] Re: System won't boot if CMOS clock is slow

2013-01-18 Thread Neil Bothwick
On Fri, 18 Jan 2013 18:08:50 + (UTC), Grant Edwards wrote:

> >> By default, ntpd doesn't seem to want to do
> >> a step correction to fix large clock errors on startup (there's
> >> probably an option for that).  
> >
> > That's for ntp-client to do.  
> 
> In additon to being a server, ntpd _is_ an ntp client.

But ntpd will not handle large jumps in time, such as when booting with a
broken CMOS clock. So you run /etc/init.d/ntp-client as well, which gets
the clock right at boot time, then ntpd can keep it right.

> Are you talking about running ntpclient
> (http://doolittle.icarus.com/ntpclient) instead of ntpd?

No.

% qlist net-misc/ntp | grep init.d
/etc/init.d/ntpd
/etc/init.d/ntp-client


-- 
Neil Bothwick

Did you hear about the blind prostitute? You have to hand it to her.


signature.asc
Description: PGP signature


[gentoo-user] Re: System won't boot if CMOS clock is slow

2013-01-18 Thread Grant Edwards
On 2013-01-17, Neil Bothwick  wrote:
> On Thu, 17 Jan 2013 22:47:17 + (UTC), Grant Edwards wrote:
>
>> By default, ntpd doesn't seem to want to do
>> a step correction to fix large clock errors on startup (there's
>> probably an option for that).
>
> That's for ntp-client to do.

In additon to being a server, ntpd _is_ an ntp client.

Are you talking about running ntpclient
(http://doolittle.icarus.com/ntpclient) instead of ntpd?

-- 
Grant Edwards   grant.b.edwardsYow! I invented skydiving
  at   in 1989!
  gmail.com




Re: [gentoo-user] Re: System won't boot if CMOS clock is slow

2013-01-17 Thread Neil Bothwick
On Thu, 17 Jan 2013 22:47:17 + (UTC), Grant Edwards wrote:

> By default, ntpd doesn't seem to want to do
> a step correction to fix large clock errors on startup (there's
> probably an option for that).

That's for ntp-client to do.


-- 
Neil Bothwick

Everything should be made as simple as possible, but no simpler.


signature.asc
Description: PGP signature


[gentoo-user] Re: System won't boot if CMOS clock is slow

2013-01-17 Thread Grant Edwards
On 2013-01-17, Stroller  wrote:
>
> On 16 January 2013, at 16:43, Grant Edwards wrote:
>
>> I'm having problems with one of my Gentoo systems who's motherboard
>> clock is a little slow.  When the system comes up, the system time is
>> set from the motherboard clock.  If that's slow, something in the init
>> system seems to panic because some file or other has a timestamp in
>> the future.
>
> You've had lots of other suggestions here, but I think this is
> handled fine if you add ntp to the default runlevel (and assuming the
> system can connect to the net).

It doesn't help problems that occur before ntpd has started and had a
chance to slew the clock.  By default, ntpd doesn't seem to want to do
a step correction to fix large clock errors on startup (there's
probably an option for that).

FWIW, I recently identified one rather obscure CMOS-clock-related
problem scenario (this isn't what happened the other day, but it did
waste about half a day a few months back):

 1) Your CMOS clock is ahead of the "real" time by several hours for
some reason. There are a number of ways this can happen:
dual-booting between systems that disagree over UTC vs localtime
for the CMOS clock, broken ntpd config, mismanaged timezone
settings, etc.

 2) Kernel comes up and sets system time from CMOS clock.

 3) Root filesystem gets fsck'ed because it's been mounted 28 times,
and filesystem meta-data gets timestamp that is actually several
hours in the future.

 4) System reboots after fsck is finished.

 5) Before the recently fsck'ed filesystem gets mounted, the CMOS
clock gets reset to the correct time (by dual booting, booting
from a rescue CD, or by simply running the BIOS setup and fixing
it).

 6) The system boots again, and when it tries to mount the root
filesystem, the filesystem meta-data has a timestamp that's in the
future so the ext3 code in the kernel refuses to mount it.

 7) You futz around verifying that you have a good root fs backup,
looking at S.M.A.R.T logs and all sorts of other irrelevant things
for several hours trying to figure out what's wrong.

 8) The universe catches up to the filesystem meta-data timestamp, and
suddenly, mysteriously, everything works fine.

-- 
Grant Edwards   grant.b.edwardsYow! You mean you don't
  at   want to watch WRESTLING
  gmail.comfrom ATLANTA?




Re: [gentoo-user] Re: System won't boot if CMOS clock is slow

2013-01-17 Thread Alan McKinnon
On Thu, 17 Jan 2013 14:45:13 -0600
Bruce Hill  wrote:

> On Thu, Jan 17, 2013 at 02:35:50PM -0600, Paul Hartman wrote:
> > 
> > I already had that set. :) I'm not talking about clearing the screen
> > at the login prompt; it clears mid-OpenRC during/after the udev step
> > (as Grant also described), though in my case it does not halt but
> > continues printing the rest of the OpenRC messages and eventually
> > gets to the login prompt. I'm thinking it may be fbcondecor
> > responsible for the blanking there. I'll need to experiment more
> > with it.
> 
> When KMS kicks in?

I've never seen KMS clear the screen there for either nvidia or radeon
cards so I doubt it's that. All it does at that point that is visible
to the user is set the resolution and paint on the $GO_FAST stripes.

Now fbcondecor, that's a likely area to look in. I personally no
longer use fancy fb and boot splash type things (I like my Alt-F1
console to look like a console and not get in my way) so I doubt I can
be of much help further on this. 

-- 
Alan McKinnon
alan.mckin...@gmail.com




Re: [gentoo-user] Re: System won't boot if CMOS clock is slow

2013-01-17 Thread Bruce Hill
On Thu, Jan 17, 2013 at 02:35:50PM -0600, Paul Hartman wrote:
> 
> I already had that set. :) I'm not talking about clearing the screen
> at the login prompt; it clears mid-OpenRC during/after the udev step
> (as Grant also described), though in my case it does not halt but
> continues printing the rest of the OpenRC messages and eventually gets
> to the login prompt. I'm thinking it may be fbcondecor responsible for
> the blanking there. I'll need to experiment more with it.

When KMS kicks in?
-- 
Happy Penguin Computers   >')
126 Fenco Drive   ( \
Tupelo, MS 38801   ^^
supp...@happypenguincomputers.com
662-269-2706 662-205-6424
http://happypenguincomputers.com/

Don't top-post: http://en.wikipedia.org/wiki/Top_post#Top-posting



Re: [gentoo-user] Re: System won't boot if CMOS clock is slow

2013-01-17 Thread Paul Hartman
On Wed, Jan 16, 2013 at 2:52 PM, Alan McKinnon  wrote:
> On Wed, 16 Jan 2013 14:29:04 -0600
> Paul Hartman  wrote:
>
>> On Wed, Jan 16, 2013 at 1:36 PM, Grant Edwards
>>  wrote:
>> >
>> > But, in the failures I've been seeing today, it's not getting to
>> > agetty. The "clear screen and halt" happens at the "waiting for udev
>> > events" step...
>>
>> FWIW I have also noticed on my machine that somewhere in the middle of
>> the OpenRC boot process, the screen gets cleared. Haven't completely
>> tracked it down yet.
>
> In /etc/inittab you need to change stuff like this
>
> c1:12345:respawn:/sbin/agetty 38400 tty1 linux
>
> to this
>
> c1:12345:respawn:/sbin/agetty 38400 tty1 linux --noclear
>
>
> There's a clear elog about this at the end of the util-linux emerge,
> perhaps you missed it

I already had that set. :) I'm not talking about clearing the screen
at the login prompt; it clears mid-OpenRC during/after the udev step
(as Grant also described), though in my case it does not halt but
continues printing the rest of the OpenRC messages and eventually gets
to the login prompt. I'm thinking it may be fbcondecor responsible for
the blanking there. I'll need to experiment more with it.



Re: [gentoo-user] Re: System won't boot if CMOS clock is slow

2013-01-17 Thread Kevin Chadwick
> So it is Linux' fault, that your mate used crap Hardware? That is great!
> let us blame it for the weather too. And stubbed toes.

Well the point was that if OpenBSD had an auto update function I could
have installed that and he would still be using OpenBSD happily. If
Linux did what OpenBSD does then he would be a happy linux user, well
aside from wanting Itunes, though I'm under the impression that's been
sorted quite well now.

As far as he was concerned he had a fscking watch, what's wrong with
this fscking piece of.. or words to that affect and really he was right.

The alternative was Vista which took and I mean no joke like 15 mins to
finish booting, despite a cleanup and the drive checked out ok. He had
just started a gym and couldn't afford extra ram at the time.

No need to get touchy, simply real facts, better aired than ignored. Not
a great loss or anything.

-- 
___

'Write programs that do one thing and do it well. Write programs to work
together. Write programs to handle text streams, because that is a
universal interface'

(Doug McIlroy)
___



Re: [gentoo-user] Re: System won't boot if CMOS clock is slow

2013-01-17 Thread Volker Armin Hemmann
So it is Linux' fault, that your mate used crap Hardware? That is great!
let us blame it for the weather too. And stubbed toes.
Am 16.01.2013 21:43 schrieb "Kevin Chadwick" :

> > I have had systems in the past who refused to boot because the
> > motherboard time was off, and at first it looked like that was the
> > problem again.
>
> OpenBSD takes the time from the filesystem in that case and boots. I
> wish linux did. I had a mate who used to ring me up everytime his mother
> in law unplugged the laptop and it was a laptop that's cmos was a pain
> to replace. I believe he ended up in 2034 or something after a few
> months because I told him the bios key and meant he could avoid
> fsck that sometimes gave him various problems =-)
>
> He was anti slow machines (Vista) and liked linux after being
> skeptical. I can't see him trying linux again now :-(
>
> --
> ___
>
> 'Write programs that do one thing and do it well. Write programs to work
> together. Write programs to handle text streams, because that is a
> universal interface'
>
> (Doug McIlroy)
> ___
>
>


Re: [gentoo-user] Re: System won't boot if CMOS clock is slow

2013-01-16 Thread Alan McKinnon
On Wed, 16 Jan 2013 14:29:04 -0600
Paul Hartman  wrote:

> On Wed, Jan 16, 2013 at 1:36 PM, Grant Edwards
>  wrote:
> >
> > But, in the failures I've been seeing today, it's not getting to
> > agetty. The "clear screen and halt" happens at the "waiting for udev
> > events" step...
> 
> FWIW I have also noticed on my machine that somewhere in the middle of
> the OpenRC boot process, the screen gets cleared. Haven't completely
> tracked it down yet.

In /etc/inittab you need to change stuff like this

c1:12345:respawn:/sbin/agetty 38400 tty1 linux

to this

c1:12345:respawn:/sbin/agetty 38400 tty1 linux --noclear


There's a clear elog about this at the end of the util-linux emerge,
perhaps you missed it



> 
> You can enable logging in your rc.conf to log all of the openrc
> output, that might help you see what was on-screen before it got
> cleared away. You also might be able to enable interactive mode and go
> through it step-by-step to see what's happening in real-time at your
> own pace.
> 



-- 
Alan McKinnon
alan.mckin...@gmail.com




Re: [gentoo-user] Re: System won't boot if CMOS clock is slow

2013-01-16 Thread Kevin Chadwick
> I have had systems in the past who refused to boot because the
> motherboard time was off, and at first it looked like that was the
> problem again.

OpenBSD takes the time from the filesystem in that case and boots. I
wish linux did. I had a mate who used to ring me up everytime his mother
in law unplugged the laptop and it was a laptop that's cmos was a pain
to replace. I believe he ended up in 2034 or something after a few
months because I told him the bios key and meant he could avoid
fsck that sometimes gave him various problems =-)

He was anti slow machines (Vista) and liked linux after being
skeptical. I can't see him trying linux again now :-(

-- 
___

'Write programs that do one thing and do it well. Write programs to work
together. Write programs to handle text streams, because that is a
universal interface'

(Doug McIlroy)
___



Re: [gentoo-user] Re: System won't boot if CMOS clock is slow

2013-01-16 Thread Paul Hartman
On Wed, Jan 16, 2013 at 1:36 PM, Grant Edwards
 wrote:
>
> But, in the failures I've been seeing today, it's not getting to
> agetty. The "clear screen and halt" happens at the "waiting for udev
> events" step...

FWIW I have also noticed on my machine that somewhere in the middle of
the OpenRC boot process, the screen gets cleared. Haven't completely
tracked it down yet.

You can enable logging in your rc.conf to log all of the openrc
output, that might help you see what was on-screen before it got
cleared away. You also might be able to enable interactive mode and go
through it step-by-step to see what's happening in real-time at your
own pace.



[gentoo-user] Re: System won't boot if CMOS clock is slow

2013-01-16 Thread Grant Edwards
On 2013-01-16, Bruce Hill  wrote:
> On Wed, Jan 16, 2013 at 04:43:16PM +, Grant Edwards wrote:
>> I'm having problems with one of my Gentoo systems who's motherboard
>> clock is a little slow.  When the system comes up, the system time is
>> set from the motherboard clock.  If that's slow, something in the init
>> system seems to panic because some file or other has a timestamp in
>> the future.
>> 
>> Just to make it extra convenient, it clears the console screen when
>> that happens so there's no actual record of what went wrong or which
>> component in th init process is failing.
>> 
>> Going into the BIOS setup and setting the time ahead a minute or two
>> will allow the system to start up normally.
>> 
>> Is there any way to disable this "feature"?
>
> Replace your CMOS battery.

I'll try that.

I enabled init logging and did more testing, and I now don't think
it's actually the motherboard clock that's causing the problem. It
seems that a second reboot without changing the clock usually fixes
the problem also.

I have had systems in the past who refused to boot because the
motherboard time was off, and at first it looked like that was the
problem again.

> Default behavior of agetty is to clear now. In /etc/inittab make sure you have
> --noclear in tty1 like this:

Yup, figured that one out once I realized that in the normal case it's
agetty rather than the init system itself that clears the screen.

But, in the failures I've been seeing today, it's not getting to
agetty. The "clear screen and halt" happens at the "waiting for udev
events" step...

-- 
Grant Edwards   grant.b.edwardsYow! You should all JUMP
  at   UP AND DOWN for TWO HOURS
  gmail.comwhile I decide on a NEW
   CAREER!!