[Bug 1696981] Re: fixrtc is ineffective when there is no battery for the RTC
Stefan Bader
stefan.bader at canonical.com
Wed Sep 6 11:06:55 UTC 2017
Looking at the complete fixrtc-mount script (the part which was fixed in bug #1623125 makes me think that this would fix your problem as well. And that with much less required change. That script checks not only mount but also create time of the fs. If create time is more recent than mount time, then it will set the time to that. And the time of creating the Ubuntu Core image should be recent enough to meet any expectations of the certificates. What I think has happened is that the "n/a" result was causing date to return an error. And because the scripts are executed with "-e" this would stop execution right there and the time was not set at all.
With the check for "n/a" as the change is in its original form, it would set mount time to 1999 but then use the create time which is newer. And since that is done pre-mount, this will set mount time to create time, too.
So right now I tend to mark this bug as duplicate of bug #1623125, then
get that fix in (preferred because it would be much smaller/simpler).
Should this turn out to not be enough, we still can un-dup and look for
a bigger solution. Thank you for your efforts, and sorry for me being so
resistant. I am just trying to fix the problem with as little change as
possible. The less change, the less one can break.
--
You received this bug notification because you are a member of Ubuntu
Sponsors Team, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/1696981
Title:
fixrtc is ineffective when there is no battery for the RTC
Status in initramfs-tools package in Ubuntu:
Incomplete
Bug description:
When there is no battery for the RTC, fixrtc is not able to find a
good enough date. To fix the clock, this script is using the last time
the root filesystem was mounted, but as that is done before there is
any network, and as after a reboot/poweroff the RTC time is always
reset (because time is not kept due to lack of battery), the mount
time will never be good.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/initramfs-tools/+bug/1696981/+subscriptions
More information about the Ubuntu-sponsors
mailing list