Bug 1198761 - fsck runs on every OS start up if LOCAL time is used
Summary: fsck runs on every OS start up if LOCAL time is used
Keywords:
Status: CLOSED DUPLICATE of bug 1201978
Alias: None
Product: Fedora
Classification: Fedora
Component: systemd
Version: 21
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: systemd-maint
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-03-04 19:04 UTC by Vasil Draganov
Modified: 2015-04-19 23:39 UTC (History)
15 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-03-18 22:09:25 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
boot.log (16.66 KB, application/octet-stream)
2015-03-04 19:04 UTC, Vasil Draganov
no flags Details

Description Vasil Draganov 2015-03-04 19:04:22 UTC
Created attachment 998022 [details]
boot.log

Description of problem:

When system is started fsck is executed on the root partition with the messages shown bellow. 
/dev/sdaX: Superblock last write time is in the future.
(by less than a day, probably due to the hardware clock being incorrectly set).  FIXED.
/dev/sdaX: 329699/4481024 files (1.6% non-contiguous), 4874832/17919744 blocks


How reproducible:
Every time the OS is booted, if system uses Local time instead of UTC.  

Steps to Reproduce:
1.In system-config-date make sure "System clock uses UTC" is unchecked.
2.Reboot.

Additional info:
All it does is running fsck on every system boot, therefore, leading to a delay while fsck is scanning (approximately 1 min in my case). If I start system-config-date and mark "System clock uses UTC", the problem is gone.
I've upgraded from 20-21 today and then the problem appeared. I'm dualbooting Fedora and Windows, that's why I had chosen Local time. But it was like that for 3 years and the problem popped up just after the upgrade.
I've attached the boot.log just in case.
The hardware clock is the identical with the system clock (hwclock -c). It is synchronized automatically, though I've tried it manually also (hwclock -w). /etc/adjtime is correct depending on the settings in system-config-date - I mean UTC or LOCAL.

It's not so bad, Windows can be made to live with UTC too, but it used to work before so I decided to post it as a bug.

Thank you for the time spared, in advance.

P.S. I didn't know which component to choose while posting this bug, so I've chosen randomly.

Comment 1 Dennis Gilmore 2015-03-05 00:15:35 UTC
reassigning to systemd

Comment 2 Ricardo Garcia 2015-03-16 22:38:13 UTC
I have the same problem (Fedora 21). In fact, I asked about it in the unofficial Fedora forums:

http://forums.fedoraforum.org/showthread.php?t=303490

I've been running some experiments with dracut and it seems simply including /etc/adjtime in the initrd fixes the issue.

dracut --include /etc/adjtime /etc/adjtime --force

This bug seems to be related to #1201978. It's worth noting the Fedora installer detects if Windows seems to be installed in the computer and, in that case, configures the system to use local time.

Comment 3 Vasil Draganov 2015-03-17 12:36:44 UTC
Hi Ricardo,
making an image with dracut, as you have shown above, does the trick! Just tested it on a VM with newly installed F21.

After installation and changing hwclock to localtime, fsck began to scan the system drive every time on bootup.
Running "dracut --include /etc/adjtime /etc/adjtime --force" solved the problem.

Many thanks for your comment Ricardo!

Comment 4 Vasil Draganov 2015-03-17 12:52:57 UTC
Building an initramfs image for every new kernel is not a permanent solution, though!

Comment 5 Ricardo Garcia 2015-03-17 19:50:25 UTC
dracut should probably include adjtime in the initrd by default in Fedora, but in the mean time you can automate that yourself to avoid rebuilding the initrd all the time. Please correct me if there are better ways. I'm just getting myself acquainted with both Fedora and dracut.

Create /etc/dracut.conf.d/adjtime.conf with the following line:

install_items+=/etc/adjtime

That should do it.

Comment 6 Vasil Draganov 2015-03-18 11:23:22 UTC
I don't much about dracut, apart from what it does. I've never used it before. I didn't have time to dig in so far. What you've suggested should work, judging from the dracut.conf man page. I'll try it on the VM.
On my laptop I've switched to UTC.

Comment 7 Till Maas 2015-03-18 22:09:25 UTC

*** This bug has been marked as a duplicate of bug 1201978 ***

Comment 8 deadrat 2015-04-07 16:25:55 UTC
I have this issue. I have asked a question regarding this in Ask Fedora. The post can be found here: https://ask.fedoraproject.org/en/question/66041/fedora-21-is-very-slow-on-startup


Note You need to log in before you can comment on or make changes to this bug.