From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1KemHe-0006j8-6k for mharc-grub-devel@gnu.org; Sun, 14 Sep 2008 03:44:38 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KemHc-0006ix-8d for grub-devel@gnu.org; Sun, 14 Sep 2008 03:44:36 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KemHZ-0006dg-8o for grub-devel@gnu.org; Sun, 14 Sep 2008 03:44:34 -0400 Received: from [199.232.76.173] (port=42214 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KemHZ-0006dY-5Z for grub-devel@gnu.org; Sun, 14 Sep 2008 03:44:33 -0400 Received: from mx20.gnu.org ([199.232.41.8]:57983) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KemHY-0004oS-Kc for grub-devel@gnu.org; Sun, 14 Sep 2008 03:44:32 -0400 Received: from mta-out.inet.fi ([195.156.147.13] helo=kirsi2.inet.fi) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KemHU-0005LP-5t for grub-devel@gnu.org; Sun, 14 Sep 2008 03:44:28 -0400 Received: from [127.0.0.1] (84.248.105.254) by kirsi2.inet.fi (8.5.014) id 488DC54E023D2703 for grub-devel@gnu.org; Sun, 14 Sep 2008 10:44:23 +0300 Message-ID: <48CCC0E3.30208@nic.fi> Date: Sun, 14 Sep 2008 10:44:35 +0300 From: =?ISO-8859-1?Q?Vesa_J=E4=E4skel=E4inen?= User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: The development of GRUB 2 References: <78f747be0809102016y7a5a1208t632760e4ee8f0b5f@mail.gmail.com> <48CA801B.6080607@nic.fi> <873ak3am11.fsf@squeak.fifthhorseman.net> In-Reply-To: <873ak3am11.fsf@squeak.fifthhorseman.net> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: Quoted-Printable X-detected-kernel: by mx20.gnu.org: Linux 2.6 (newer, 3) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) Subject: Re: setting the system clock before launching operating system X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Sep 2008 07:44:36 -0000 Daniel Kahn Gillmor wrote: > On Sat 2008-09-13 00:52:47 -0400, Arthur Marsh wrote: >=20 >> Vesa J=E4=E4skel=E4inen 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 pro= cess? >>> 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. >=20 > 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.