could you try this patch (regenerate your initrd after applying it to /usr/share/initramfs-tools/scripts/local-premount/fixrtc):
--- /usr/share/initramfs-tools/scripts/local-premount/fixrtc 2010-04-26 16:59:13.000000000 +0200 +++ fixrtc 2012-03-06 14:47:49.580000000 +0100 @@ -50,12 +50,19 @@ done
if [ -n "$BROKEN_CLOCK" -a -n "$ROOTDEV" ];then - ROOTDISK=$(readlink -f "$ROOTDEV") && + ROOTDISK=$(readlink -f "$ROOTDEV")
- TIMESTR=$(dumpe2fs -h "$ROOTDISK" 2>/dev/null|grep "Last mount time") && - TIME=${TIMESTR#*:} && + TIMESTR=$(dumpe2fs -h "$ROOTDISK" 2>/dev/null|grep "Last mount time") + TIME=${TIMESTR#*:}
- date --set="${TIME} 1 minute" >/dev/null 2>&1 + hwclock -s + + MOUNTTIME=$(date --utc --date "${TIME}" +%s) + CURDATE=$(date --utc --date "$(date)" +%s) + + if [ "$MOUNTTIME" -gt "$CURDATE" ]; then + date --set="${TIME} 1 minute" >/dev/null 2>&1 + fi fi
# This script is best-effort. If we couldn't fudge the clock as desired,
could you try this patch (regenerate your initrd after applying it to /usr/share/ initramfs- tools/scripts/ local-premount/ fixrtc) :
--- /usr/share/ initramfs- tools/scripts/ local-premount/ fixrtc 2010-04-26 16:59:13.000000000 +0200
+++ fixrtc 2012-03-06 14:47:49.580000000 +0100
@@ -50,12 +50,19 @@
done
if [ -n "$BROKEN_CLOCK" -a -n "$ROOTDEV" ];then
- ROOTDISK=$(readlink -f "$ROOTDEV") &&
+ ROOTDISK=$(readlink -f "$ROOTDEV")
- TIMESTR=$(dumpe2fs -h "$ROOTDISK" 2>/dev/null|grep "Last mount time") &&
- TIME=${TIMESTR#*:} &&
+ TIMESTR=$(dumpe2fs -h "$ROOTDISK" 2>/dev/null|grep "Last mount time")
+ TIME=${TIMESTR#*:}
- date --set="${TIME} 1 minute" >/dev/null 2>&1
+ hwclock -s
+
+ MOUNTTIME=$(date --utc --date "${TIME}" +%s)
+ CURDATE=$(date --utc --date "$(date)" +%s)
+
+ if [ "$MOUNTTIME" -gt "$CURDATE" ]; then
+ date --set="${TIME} 1 minute" >/dev/null 2>&1
+ fi
fi
# This script is best-effort. If we couldn't fudge the clock as desired,