All of lore.kernel.org
 help / color / mirror / Atom feed
* setting the system clock before launching operating system
@ 2008-09-11  3:16 Geoff Karl
  2008-09-12 14:43 ` Vesa Jääskeläinen
  0 siblings, 1 reply; 6+ messages in thread
From: Geoff Karl @ 2008-09-11  3:16 UTC (permalink / raw)
  To: grub-devel

Hi everyone.

I would like to be able to set the clock to a particular time
automatically before launching an operating system.

Anyone have any ideas if this can be done during the boot loader process?

thanks,

Geoff



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: setting the system clock before launching operating system
  2008-09-11  3:16 setting the system clock before launching operating system Geoff Karl
@ 2008-09-12 14:43 ` Vesa Jääskeläinen
  2008-09-13  4:52   ` Arthur Marsh
  0 siblings, 1 reply; 6+ messages in thread
From: Vesa Jääskeläinen @ 2008-09-12 14:43 UTC (permalink / raw)
  To: The development of GRUB 2

Geoff Karl wrote:
> I would like to be able to set the clock to a particular time
> automatically before launching an operating system.
> 
> Anyone have any ideas if this can be done during the boot loader process?

Yes it can be done. But why?



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: setting the system clock before launching operating system
  2008-09-12 14:43 ` Vesa Jääskeläinen
@ 2008-09-13  4:52   ` Arthur Marsh
  2008-09-13 19:22     ` Daniel Kahn Gillmor
  0 siblings, 1 reply; 6+ messages in thread
From: Arthur Marsh @ 2008-09-13  4:52 UTC (permalink / raw)
  To: grub-devel

Vesa Jääskeläinen wrote, on 2008-09-13 00:13:
> Geoff Karl wrote:
>> I would like to be able to set the clock to a particular time
>> automatically before launching an operating system.
>>
>> Anyone have any ideas if this can be done during the boot loader process?
> 
> Yes it can be done. But why?

Some machines (e.g. a Compaq Armada 1750) don't have the option to set 
the time via BIOS or set-up boot floppy.

When the time had been lost, I'd have start-up problems with fsck 
checking when the file system had last been checked.

Being able to set the time in grub or a program directly launchable from 
grub would help avoid these problems.

Arthur.




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: setting the system clock before launching operating system
  2008-09-13  4:52   ` Arthur Marsh
@ 2008-09-13 19:22     ` Daniel Kahn Gillmor
  2008-09-14  7:44       ` Vesa Jääskeläinen
  0 siblings, 1 reply; 6+ messages in thread
From: Daniel Kahn Gillmor @ 2008-09-13 19:22 UTC (permalink / raw)
  To: The development of GRUB 2

[-- Attachment #1: Type: text/plain, Size: 1416 bytes --]

On Sat 2008-09-13 00:52:47 -0400, Arthur Marsh wrote:

> Vesa Jääskeläinen wrote, on 2008-09-13 00:13:
>> Geoff Karl wrote:
>>> I would like to be able to set the clock to a particular time
>>> automatically before launching an operating system.
>>>
>>> Anyone have any ideas if this can be done during the boot loader process?
>>
>> Yes it can be done. But why?
>
> Some machines (e.g. a Compaq Armada 1750) don't have the option to set
> the time via BIOS or set-up boot floppy.
>
> When the time had been lost, I'd have start-up problems with fsck
> checking when the file system had last been checked.

The same is true for many older PowerPC machines whose mainboard
batteries have begun to fail.  Being able to automate the bootloader
to say "look, if the hardware clock thinks it is 1904 (or 1900, or
1970, or anytime before the turn of the century) it is probably wrong;
set it to at least 2008" at every boot would be pretty useful.

This is especially useful on 32-bit architectures with a default
hardware epoch date so far in the past that crappier NTP
implementations think that it's actually in the future.  I've dealt
with this at the OS level (for various OSes) on older PowerPC
machines, and it's doable, but a pain.  Being able to guarantee that
no matter what OS you're booting, the initial clock will be at least
set to time X would be pretty handy.

    --dkg

[-- Attachment #2: Type: application/pgp-signature, Size: 826 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: setting the system clock before launching operating system
  2008-09-13 19:22     ` Daniel Kahn Gillmor
@ 2008-09-14  7:44       ` Vesa Jääskeläinen
  2008-09-14 16:29         ` Robert Millan
  0 siblings, 1 reply; 6+ messages in thread
From: Vesa Jääskeläinen @ 2008-09-14  7:44 UTC (permalink / raw)
  To: The development of GRUB 2

Daniel Kahn Gillmor wrote:
> On Sat 2008-09-13 00:52:47 -0400, Arthur Marsh wrote:
> 
>> Vesa Jääskeläinen wrote, on 2008-09-13 00:13:
>>> Geoff Karl wrote:
>>>> I would like to be able to set the clock to a particular time
>>>> automatically before launching an operating system.
>>>>
>>>> Anyone have any ideas if this can be done during the boot loader process?
>>> Yes it can be done. But why?
>> Some machines (e.g. a Compaq Armada 1750) don't have the option to set
>> the time via BIOS or set-up boot floppy.
>>
>> When the time had been lost, I'd have start-up problems with fsck
>> checking when the file system had last been checked.
> 
> The same is true for many older PowerPC machines whose mainboard
> batteries have begun to fail.  Being able to automate the bootloader
> to say "look, if the hardware clock thinks it is 1904 (or 1900, or
> 1970, or anytime before the turn of the century) it is probably wrong;
> set it to at least 2008" at every boot would be pretty useful.

Well... replace the battery ;)

> This is especially useful on 32-bit architectures with a default
> hardware epoch date so far in the past that crappier NTP
> implementations think that it's actually in the future.  I've dealt
> with this at the OS level (for various OSes) on older PowerPC
> machines, and it's doable, but a pain.  Being able to guarantee that
> no matter what OS you're booting, the initial clock will be at least
> set to time X would be pretty handy.

...and update your NTP software ;)

Should we one day support NTP time synchronization within GRUB 2, then
it would be usable. Personally I do not see need for this.

I would propose that you use your OS startup script to handle this case
in case you refuse to/can't replace your battery.




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: setting the system clock before launching operating system
  2008-09-14  7:44       ` Vesa Jääskeläinen
@ 2008-09-14 16:29         ` Robert Millan
  0 siblings, 0 replies; 6+ messages in thread
From: Robert Millan @ 2008-09-14 16:29 UTC (permalink / raw)
  To: The development of GRUB 2

On Sun, Sep 14, 2008 at 10:44:35AM +0300, Vesa Jääskeläinen wrote:
> Daniel Kahn Gillmor wrote:
> > On Sat 2008-09-13 00:52:47 -0400, Arthur Marsh wrote:
> > 
> >> Vesa Jääskeläinen wrote, on 2008-09-13 00:13:
> >>> Geoff Karl wrote:
> >>>> I would like to be able to set the clock to a particular time
> >>>> automatically before launching an operating system.
> >>>>
> >>>> Anyone have any ideas if this can be done during the boot loader process?
> >>> Yes it can be done. But why?
> >> Some machines (e.g. a Compaq Armada 1750) don't have the option to set
> >> the time via BIOS or set-up boot floppy.
> >>
> >> When the time had been lost, I'd have start-up problems with fsck
> >> checking when the file system had last been checked.
> > 
> > The same is true for many older PowerPC machines whose mainboard
> > batteries have begun to fail.  Being able to automate the bootloader
> > to say "look, if the hardware clock thinks it is 1904 (or 1900, or
> > 1970, or anytime before the turn of the century) it is probably wrong;
> > set it to at least 2008" at every boot would be pretty useful.
> 
> Well... replace the battery ;)
> 
> > This is especially useful on 32-bit architectures with a default
> > hardware epoch date so far in the past that crappier NTP
> > implementations think that it's actually in the future.  I've dealt
> > with this at the OS level (for various OSes) on older PowerPC
> > machines, and it's doable, but a pain.  Being able to guarantee that
> > no matter what OS you're booting, the initial clock will be at least
> > set to time X would be pretty handy.
> 
> ...and update your NTP software ;)
> 
> Should we one day support NTP time synchronization within GRUB 2, then
> it would be usable. Personally I do not see need for this.
> 
> I would propose that you use your OS startup script to handle this case
> in case you refuse to/can't replace your battery.

I agree. Having ad-hoc code to workaround limitations somewhere else sucks.

But if we can support it simply by having an interface to get/set the date
(which we already do), and generic scripting support, why not?

-- 
Robert Millan

  The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and
  how) you may access your data; but nobody's threatening your freedom: we
  still allow you to remove your data and not access it at all."



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-09-14 16:31 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-11  3:16 setting the system clock before launching operating system Geoff Karl
2008-09-12 14:43 ` Vesa Jääskeläinen
2008-09-13  4:52   ` Arthur Marsh
2008-09-13 19:22     ` Daniel Kahn Gillmor
2008-09-14  7:44       ` Vesa Jääskeläinen
2008-09-14 16:29         ` Robert Millan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.