Description of problem: hwclock fails to set the system time from the RTC since the kernel driver for /dev/rtc isn't loaded yet. Version-Release number of selected component (if applicable): initscripts-8.62-1.x86_64 How reproducible: always Steps to Reproduce: 1. UTC=false in /etc/sysconfig/clock (not strictly necessary) 2. chkconfg ntpd off (not strictly necessary either) 3. Boot the system and watch the messages. 4. Note that clock is incorrect, especially if you don't have UTC=true set. Actual results: No usable clock interface found. Cannot access the Hardware Clock via any known method. Clock is incorrect by the UTC offset, or sometimes completely wrong. Expected results: Correct system time set from RTC. Additional info: Here is the bootup output from debugging with the included patch which also runs hwclock again after start_udev, where it succeeds: SELinux: Disabled at runtime. audit(1201454801.799:2): selinux=0 auid=4294967295 INIT: version 2.86 booting Welcome to Fedora Press 'I' to enter interactive startup. + update_boot_stage RCclock + '[' yes = yes -a -x /usr/bin/rhgb-client ']' + /usr/bin/rhgb-client --update=RCclock + return 0 + ARC=0 + SRM=0 + UTC=0 + '[' -f /etc/sysconfig/clock ']' + . /etc/sysconfig/clock ++ ZONE=America/New_York ++ UTC=false ++ ARC=false + '[' '' = GMT ']' + '[' '' = ARC ']' + CLOCKDEF= + CLOCKFLAGS=' --hctosys' + case "$UTC" in + CLOCKFLAGS=' --hctosys --localtime' + CLOCKDEF=' (localtime)' + case "$ARC" in + case "$SRM" in + ls -l /dev/rtc crw------- 1 root root 10, 135 2008-01-27 12:26 /dev/rtc + grep rtc + lsmod + '[' -x /sbin/hwclock ']' + /sbin/hwclock --debug --hctosys --localtime hwclock from util-linux-ng 2.13.1-rc2 hwclock: Open of /dev/rtc failed, errno=2: No such file or directory. No usable clock interface found. Cannot access the Hardware Clock via any known method. ++ date + action 'Setting clock (localtime): Sun Jan 27 12:26:43 EST 2008' /bin/true + /sbin/start_udev Starting udev: udevd-event[1396]: node_symlink: device node '/dev/rtc' already exists, link to '/dev/rtc0' will not overwrite it [ OK ] + '[' -x /sbin/hwclock ']' + /sbin/hwclock --debug --hctosys --localtime hwclock from util-linux-ng 2.13.1-rc2 Using /dev interface to clock. Assuming hardware clock is kept in local time. Waiting for clock tick... /dev/rtc0 does not have interrupt functions. Waiting in loop for time from /dev/rtc0 to change ...got clock tick Time read from Hardware Clock: 2008/01/27 17:26:48 Hw clock time : 2008/01/27 17:26:48 = 1201472808 seconds since 1969 Calling settimeofday: tv.tv_sec = 1201472808, tv.tv_usec = 0 tz.tz_minuteswest = 300 ++ date + action 'Setting clock (localtime): Sun Jan 27 17:26:48 EST 2008' /bin/true ... + /bin/dmesg -n 3 ++ cat /proc/cmdline + cmdline='ro root=/dev/l.sys/root single' + '[' -f /proc/sys/kernel/modprobe ']' + strstr 'ro root=/dev/l.sys/root single' nomodules + '[' 'ro root=/dev/l.sys/root single' = 'ro root=/dev/l.sys/root single' ']' + return 1 + '[' -f /proc/modules ']' + sysctl -w kernel.modprobe=/sbin/modprobe + touch /dev/.in_sysinit + '[' -x /bin/taskset ']' + strstr 'ro root=/dev/l.sys/root single' default_affinity= + '[' 'ro root=/dev/l.sys/root single' = 'ro root=/dev/l.sys/root single' ']' + return 1 ++ pidof nash + nashpid=505 + '[' -n 505 ']' + kill 505 + unset nashpid + /sbin/start_udev Starting udev: udevd-event[1396]: node_symlink: device node '/dev/rtc' already exists, link to '/dev/rtc0' will not overwrite it [ OK ] + '[' -x /sbin/hwclock ']' + /sbin/hwclock --debug --hctosys --localtime hwclock from util-linux-ng 2.13.1-rc2 Using /dev interface to clock. Assuming hardware clock is kept in local time. Waiting for clock tick... /dev/rtc0 does not have interrupt functions. Waiting in loop for time from /dev/rtc0 to change ...got clock tick Time read from Hardware Clock: 2008/01/27 17:26:48 Hw clock time : 2008/01/27 17:26:48 = 1201472808 seconds since 1969 Calling settimeofday: tv.tv_sec = 1201472808, tv.tv_usec = 0 tz.tz_minuteswest = 300 ++ date + action 'Setting clock (localtime): Sun Jan 27 17:26:48 EST 2008' /bin/true
Created attachment 293087 [details] patch to debug initscripts hwclock setting
This would be simpler to fix by having the clock built-in; otherwise we need to shuffle around quite a bit, and I'd rather have the clock set as early as possible.
rtc-cmos is now built-in.