fsck leaves system unusable after changing the time backwards and rebooting
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 runsfsck
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 disablefsck
checking for a single reboot after the user sets the date/time, but this means we have nofsck
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.