fsck leaves system unusable after changing the time backwards and rebooting

Solution Verified - Updated -

Issue

  • The date/time on the system were changed backwards by a user to a point before the last mount time of filesystem. After changing the date/time the system is then rebooted, due to power outage or user command etc. On reboot, fsck sees that the last mount time was in the future and blocks until the user enters a root password and runs fsck manually on the console.

  • We need some way to prevent this scenario from leaving the system unusable. Our current workaround is to edit /etc/fstab file to disable fsck checking for a single reboot after the user sets the date/time, but this means we have no fsck checking at all for that reboot, and we’re still vulnerable to hitting the above scenario due to an unplanned reboot between setting the time and configuring fstab.

Environment

  • Red Hat Enterprise Linux 4
  • Red Hat Enterprise Linux 5
  • Red Hat Enterprise Linux 6
  • Red Hat Enterprise Linux 7
  • Ext3 or Ext4 file system

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content