Kernel Boot Option Question

Joseph Salisbury joseph.salisbury at canonical.com
Wed Mar 2 22:13:47 UTC 2011


On 03/01/2011 04:55 AM, Andy Whitcroft wrote:
> On Fri, Feb 25, 2011 at 04:25:56PM -0500, Joseph Salisbury wrote:
>> Hello,
>>
>> There seems to be an issue when a motherboards CMOS clock reports a time
>> and date older than the one that was recorded during the last successful
>> boot.  When this happens the system will fail to boot.
>>
>> Is there a way to get the kernel to ignore a bad date and time from the
>> BIOS at boot up, or an option to disable this check entirely?
> 
> That seems anomolous to me, we routinly write random debug information
> into the RTC for suspend/resume debugging setting the clock to all sorts
> of random times, and that does not trigger this behaviour.  I thought we
> routinly updated the time using the on-disk superblock on boot anyhow.
> If its breaking thats definatly a bug, I'd guess in the fsck handling in
> general.
> 
> -apw

Hi Andy,

Thanks for the feedback.

I performed some additional testing.  From what I've learned, this
probably is not a bug.

Changing the BIOS a month ahead causes the system to not boot with this
error:

fsck from util-linux-ng 2.17.2
/dev/sda1: Superblock last mount time (Sat Apr 2 17:24:33 2011,
     now = Wed Mar 2 1625:52 2011) is in the future.

/dev/sda1: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
     (i.e., without -a or -p options)
mountall: fsck / [260] terminated with status 4
mountall: Filesystem has errors: /

However, if I power cycle and boot again I am given the option to pass
'F' to fsck to fix the errors.  After this, I am then able to boot
normally again.  What I noticed is that after the fsck, the BIOS date is
set back to the original time without any manual changes.  So it appears
the fsck can modify the BIOS time (Maybe using hwclock)?

If this is the expected behaviour, the this is not a bug, just something
new I've learned :-)


BTW, The following steps are what I used:
1. Enter BIOS and set the date ahead by one month.
2. Exit, save BIOS and boot up system(This boot will work and the system
time is a month ahead).
3. Reboot the system.
4. The system will stop due to fsck failure of root disk and report the
error previously mentioned.
5. Power cycle system.
6. Prompted to perform fsck(Same thing if booted in rescue mode).
Selected 'F' to fix.
7. System rebooted and time was corrected(In the BIOS and in the OS).


Thanks,

Joe




More information about the kernel-team mailing list