You are not logged in.
Hi. I've noticed something strange: if I hard reset my PC, the root partition Last write time changes before rc.sysinit is executed and when "/" is still readonly.
I inserted "date" command in the begiining of rc.sysinit and
tune2fs -l /dev/mapper/isw_ebaifefjbf_Volume0p9 | grep "Last write time"
after udev starts (so tune2fs can access my disks).
If the first command (date) prints: 15:00:10
then the second command prints: Last write time: xxx xxx xxx 15:00:09
Who can write data to the disk before mounting readwrite and before rc.sysinit checks the partition?
Arch 64, xfce4
Offline
I'm not entirely sure if this could be related, but I found your post just as I was about to post myself...
My issue is as follows:
I've noticed that after a hard-reset, on reboot I'm asked to manually check my partitions (all ext4). The root partition always displays an error about 'last write in future' , which as far as I can understand triggers the promt for a manual chkdsk.
To give an example, the time my system crashed was 15:06, reboot time was maybe 15:10, last write was reported for 17:06.
My system time is bound to localtime, and is as such not utc, however I'm not sure that Germany's localtime +2h is utc, so maybe it isn't relevant anyway..
Beetles and bacteria are vastly more successful than humans in terms of survival.
Offline
hungerfish, same problem as mine. I also got this "superblock last write time is in the future" message, when I had HARDWARECLOCK="localtime".
If you don't have dualboot, you can go back to HARDWARECLOCK="UTC" and forget about this error.
At the beginning the system thinks hwclock is UTC. Then the startup scripts do something with the dirty root partition, and only after that the root partition gets mounted 'ro' and the timezone info is read from it.
In your case, the time "15:06" is written to the disk as UTC and then reported to you converted to German time "17:06".
btw, do you have a soft raid?
Last edited by leniviy (2009-10-11 18:13:05)
Arch 64, xfce4
Offline
Sadly I do dualboot, so I need localtime.
Is there anyway to work around this? I never got this kind of error using other distros, so it should be possible somehow!?!
And, no, I don't have a soft raid...
Beetles and bacteria are vastly more successful than humans in terms of survival.
Offline
well, this behaviour seems to be hidden in the 'init'. No chance to change it, but there may be a workaround: temporary adjust system time in the rc.sysinit right before the filesystem is checked and then set it back.
Last edited by leniviy (2009-10-11 21:26:49)
Arch 64, xfce4
Offline
There should be away to 'tell' the system, or in this case the chkdsk-tool, 'what time' it is, without the need for the init-stuff to come up. This is begging for a 'fault' in how the timestamps are evaluated, because as mentioned before, I never got this with other distros. Maybe its to-do with some Ext4 feature, because I was using Ext3 up until recently, so maybe thats where the difference lies...but this is just annoying!
(Obviously the hard-locking part is the real bummer here, but it does happen...)
Beetles and bacteria are vastly more successful than humans in terms of survival.
Offline
OK. Here's the plan "A" . You have to modify /etc/rc.sysinit in 2 places.
1) find
# Set clock early to fix some bugs with filesystem checks
# Clock is set again later to match rc.conf
if [ -n "$HWCLOCK_PARAMS" -a -f /etc/localtime ]; then
/sbin/hwclock $HWCLOCK_PARAMS --noadjfile
fi
and replace it with this:
# Set clock early to fix some bugs with filesystem checks
# Clock is set again later to match rc.conf
SETCLOCKONEMORETIME=
if [ -n "$HWCLOCK_PARAMS" -a -f /etc/localtime ]; then
# don't set the clock early if rtc is localtime and local time > UTC
if [ "$HARDWARECLOCK" = "localtime" -a "`date +%z`" -gt "0" ]; then
echo "Not setting clock early"
SETCLOCKONEMORETIME=1
else
/sbin/hwclock $HWCLOCK_PARAMS --noadjfile
fi
fi
2) find
stat_busy "Mounting Local Filesystems"
and replace it with this:
if [ -n "$HWCLOCK_PARAMS" -a -f /etc/localtime ]; then
if [ "$SETCLOCKONEMORETIME" = "1" ]; then
/sbin/hwclock $HWCLOCK_PARAMS --noadjfile
fi
fi
stat_busy "Mounting Local Filesystems"
***********************************************
double check the syntax because if this file is broken, the system won't boot. Don't hardreset this time, reboot normally for once.
Arch 64, xfce4
Offline