LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
楼主: Akrit

系统无法启动:setting system clock use hardware clock(UTC)

[复制链接]
 楼主| 发表于 2008-10-20 11:56:19 | 显示全部楼层
Post by waterloo2005;1896356
楼主,我也遇到和你一样的问题

后来 把 clock 从boot runlevel中取消,就再也没碰到这种情况了
rc-update del clock boot

我记不得是clock还是time了

你试一下


呵呵,相当干脆的解决办法:cool:

不过恐怕是有副作用的:
see:
nile@UN /etc/init.d $ sudo ./clock usesme
bootmisc dcron
nile@UN /etc/init.d $ sudo ./clock needsme
syslog-ng

这个服务是被依赖的,不过具体有什么影响就不清楚了
实在没法时也算是一种解决方法吧
回复 支持 反对

使用道具 举报

发表于 2008-10-20 14:42:42 | 显示全部楼层
Post by Akrit;1896329
刚才reboot了两次,暂时没出现什么问题
不过发现/dev/rtc和/dev/rtc0依然存在,不知为什么?

BTW:顺便弱弱的问一下,为什么我机器上没有/var/log/kern.log?

我的问题是没有 rtc0,可能是你的板未使用hpet。。那也没啥问题,原因你可以看下 demsg|grep -i rtc

我的目前是将
  1. Location:                                                             │  
  2.   │     -> Device Drivers                                                   │  
  3.   │       -> Real Time Clock (RTC_CLASS [=m])
复制代码
编成模块,这样里面的子项目 "Set system time from RTC on startup and resume" 就不可用,也就是N,怀疑就是这个闹的
Real Time Clock 里的其它模块也大都是 N
目前为止,没有再死鸡过了

至于 /var/log/kern.log 是因为你没有配置 syslog-ng
鉴于目前gentoo-wiki 不能访问,你可以参考我的: #cat /etc/syslog-ng/syslog-ng.conf
  1. options { chain_hostnames(off); sync(0); stats(43200); };
  2. #source where to read log
  3. source src { unix-stream("/dev/log" max-connections(256)); internal(); };
  4. source kernsrc { file("/proc/kmsg"); };
  5. #define destinations
  6. destination authlog { file("/var/log/auth.log"); };
  7. destination syslog { file("/var/log/syslog"); };
  8. destination cron { file("/var/log/cron.log"); };
  9. destination daemon { file("/var/log/daemon.log"); };
  10. destination kern { file("/var/log/kern.log"); };
  11. destination lpr { file("/var/log/lpr.log"); };
  12. destination user { file("/var/log/user.log"); };
  13. destination mail { file("/var/log/mail.log"); };
  14. destination mailinfo { file("/var/log/mail.info"); };
  15. destination mailwarn { file("/var/log/mail.warn"); };
  16. destination mailerr { file("/var/log/mail.err"); };
  17. destination newscrit { file("/var/log/news/news.crit"); };
  18. destination newserr { file("/var/log/news/news.err"); };
  19. destination newsnotice { file("/var/log/news/news.notice"); };
  20. destination debug { file("/var/log/debug"); };
  21. destination messages { file("/var/log/messages"); };
  22. destination console { usertty("root"); };
  23. destination console_all { file("/dev/tty12"); };
  24. destination xconsole { pipe("/dev/xconsole"); };
  25. #create filters
  26. filter f_authpriv { facility(auth, authpriv); };
  27. filter f_syslog { not facility(authpriv, mail); };
  28. filter f_cron { facility(cron); };
  29. filter f_daemon { facility(daemon); };
  30. filter f_kern { facility(kern); };
  31. filter f_lpr { facility(lpr); };
  32. filter f_mail { facility(mail); };
  33. filter f_user { facility(user); };
  34. filter f_debug { not facility(auth, authpriv, news, mail); };
  35. filter f_messages { level(info..warn)
  36.         and not facility(auth, authpriv, mail, news); };
  37. filter f_emergency { level(emerg); };
  38. filter f_info { level(info); };
  39. filter f_notice { level(notice); };
  40. filter f_warn { level(warn); };
  41. filter f_crit { level(crit); };
  42. filter f_err { level(err); };
  43. filter f_failed { match("failed"); };
  44. filter f_denied { match("denied"); };
  45. #connect filter and destination
  46. log { source(src); filter(f_authpriv); destination(authlog); };
  47. log { source(src); filter(f_syslog); destination(syslog); };
  48. log { source(src); filter(f_cron); destination(cron); };
  49. log { source(src); filter(f_daemon); destination(daemon); };
  50. log { source(kernsrc); filter(f_kern); destination(kern); };
  51. log { source(src); filter(f_lpr); destination(lpr); };
  52. log { source(src); filter(f_mail); destination(mail); };
  53. log { source(src); filter(f_user); destination(user); };
  54. log { source(src); filter(f_mail); filter(f_info); destination(mailinfo); };
  55. log { source(src); filter(f_mail); filter(f_warn); destination(mailwarn); };
  56. log { source(src); filter(f_mail); filter(f_err); destination(mailerr); };
  57. log { source(src); filter(f_debug); destination(debug); };
  58. log { source(src); filter(f_messages); destination(messages); };
  59. log { source(src); filter(f_emergency); destination(console); };
  60. #default log
  61. log { source(src); destination(console_all); };
复制代码

另外,这是 #cat /etc/logrotate.d/syslog-ng,logrotate是用于自动滚动日志的工具(由cron加载,这两个东东安装手册里都有),免的无限增长
  1. # $Header: /var/cvsroot/gentoo-x86/app-admin/syslog-ng/files/syslog-ng.logrotate,v 1.2 2004/07/18 02:25:02 dragonheart Exp $
  2. #
  3. # Syslog-ng logrotate snippet for Gentoo Linux
  4. # contributed by Michael Sterrett
  5. #
  6. /var/log/messages /var/log/auth.log /var/log/syslog /var/log/cron.log /var/log/daemon.log /var/log/kern.log /var/log/user.log /var/log/debug {
  7.     sharedscripts
  8.     postrotate
  9.         /etc/init.d/syslog-ng reload > /dev/null 2>&1 || true
  10.     endscript
  11. }
复制代码

ps:
clock (baselayout2 为hwclock)还是很重要的,是将时间调整到机器当前的时间,否则就只有借助ntp-client,如果也没使用,那么时间就会不对的。。特别是对当时启动的服务。。

至于ntp-client 我是设置在 /etc/cron.daily/ 里做为每日任务,并不推荐放在启动里,那样在每次重启时还要=它连接到远程对时,没网络时更要命(虽然设置了timeout还是浪费那几秒)。。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-10-20 18:48:48 | 显示全部楼层
先严重赞一下arli兄,好久没见过如此详细的解答了,感动ing:Coffee:

看了一下“Set system time from RTC on startup and resume”的描述,感觉确实很可能是这家伙闹的,于是把RTC编成模块又编译了一下内核,估计应该没什么问题了。先观察个十天半月,有问题再随时汇报

copy了ls的syslog-ng配置,又安装了logrotate

然后:
./syslog-ng restart
* Service syslog-ng stopping
* Service syslog-ng stopped
* Service syslog-ng starting
Failed to start syslog-ng                                                [ !! ]

晕,一会儿reboot一下试试:yun:
回复 支持 反对

使用道具 举报

发表于 2008-10-20 19:49:01 | 显示全部楼层
用 debian 的时候出过这样的 rtc 问题:
select() to /dev/rtc to wait for clock tick timed out

有个解决的帖子在这里,想来可以给楼主一个参考吧:)
http://blog.sina.com.cn/s/blog_541a3cf101009ddp.html
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-10-20 23:25:01 | 显示全部楼层
HO HO HO,Here are Good news and Bad news!

Good news:重启后kern.log出现了,syslog-ng的错误也不见了:thank

Bad news:机器相当给面子,才第一次重启就被“setting system clock....”卡了个七荤八素,原以为是内核没编译好

  1. zcat /proc/config.gz | grep CONFIG_RTC_CLASS
  2. CONFIG_RTC_CLASS=m
  3. zcat /proc/config.gz | grep CONFIG_RTC_HCTOSYS
复制代码

革命尚未成功,同志仍需努力
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-10-20 23:27:34 | 显示全部楼层
Post by zhou3345;1896648
用 debian 的时候出过这样的 rtc 问题:
select() to /dev/rtc to wait for clock tick timed out

有个解决的帖子在这里,想来可以给楼主一个参考吧:)
http://blog.sina.com.cn/s/blog_541a3cf101009ddp.html


谢谢啊,不过那个人貌似比我RP好一些,只是时间错了,却不会卡死.......:question:
回复 支持 反对

使用道具 举报

发表于 2008-10-20 23:31:09 | 显示全部楼层
CONFIG_HPET_EMULATE_RTC=y
CONFIG_RTC=y
CONFIG_HPET_RTC_IRQ=y
CONFIG_SND_RTCTIMER=m
这是我的内核设置,从没卡过。
rtc每块主板都有。
回复 支持 反对

使用道具 举报

发表于 2008-10-20 23:58:01 | 显示全部楼层
Post by druggo;1896752
CONFIG_HPET_EMULATE_RTC=y
CONFIG_RTC=y
CONFIG_HPET_RTC_IRQ=y
CONFIG_SND_RTCTIMER=m
这是我的内核设置,从没卡过。
rtc每块主板都有。

sorry 是我表达不清,我改下我的贴吧,本意是说他有rtc 没hpet
在新的南桥片都有HPET了,不会再使用 cmos 那个 rtc了,如果还使用“传统”的rtc芯片,除非系统不支持hpet
Post by zhou3345;1896648
用 debian 的时候出过这样的 rtc 问题:
select() to /dev/rtc to wait for clock tick timed out

有个解决的帖子在这里,想来可以给楼主一个参考吧:)
http://blog.sina.com.cn/s/blog_541a3cf101009ddp.html

我的情况怪在于,重启多少次都正常。systohc 多少次也正常,就是死在冷开机那次(光标不闪了,死的彻底),

死机我是怀疑启动时内核去读 rtc(映射到cmos那个) 导致的死机,照理是不应该,一直没搞明白。。那会还没日志。。

Set system time from RTC on startup and resume 去掉后,目前还未死机过。。不知道fsck 是否会有问题,试些日子再说吧
回复 支持 反对

使用道具 举报

发表于 2008-10-21 10:04:34 | 显示全部楼层
手工运行
hwclock --hctosys
看是什么情况,如果爆慢,试试加个参数--directisa
回复 支持 反对

使用道具 举报

发表于 2008-10-21 10:24:31 | 显示全部楼层
我也在试试,还没出过卡的现象
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表