You are not logged in.
Hi to everybody!
Everytime I reboot the system the clock is wrong, I can use ntp once booted but it seems that during the but it is not possible:
Tue Oct 9 17:32:55 2012: :: Setting hostname: WORK_GROUP [BUSY] [DONE]
Tue Oct 9 17:32:55 2012: HARDWARECLOCK= is deprecated. See rc.conf(5) and hwclock(8) for details.
Tue Oct 9 17:32:55 2012: :: Adjusting system time and setting kernel time zone [BUSY] TIMEZONE= is deprecated. See rc.conf(5) for details.
Tue Oct 9 17:32:55 2012: [DONE]
Tue Oct 9 17:32:55 2012: :: Starting udev daemon [BUSY] [DONE]
Tue Oct 9 17:32:55 2012: :: Triggering udev uevents [BUSY] [DONE]
Tue Oct 9 17:32:55 2012: :: Loading user-specified modules [BUSY] MODULES= is deprecated. See rc.conf(5) and modules-load.d(5) for details.
Tue Oct 9 17:32:55 2012: [e4rat-preload] Successfully transferred files into page cache
Tue Oct 9 17:32:55 2012: [DONE]
Tue Oct 9 17:32:55 2012: :: Waiting for udev uevents to be processed [BUSY] [DONE]
Tue Oct 9 17:32:55 2012: :: Configuring virtual consoles [BUSY] %G [DONE]
Tue Oct 9 17:32:55 2012: :: Bringing up loopback interface [BUSY] [DONE]
Tue Oct 9 17:32:55 2012: :: Checking filesystems [BUSY] [DONE]
Tue Oct 9 17:32:55 2012: :: Remounting root and API filesystems [BUSY] [DONE]
Tue Oct 9 17:32:55 2012: :: Mounting local filesystems [BUSY] [DONE]
Tue Oct 9 17:32:56 2012: :: Activating swap [BUSY] [DONE]
Tue Oct 9 17:32:56 2012: :: Configuring time zone [BUSY] [DONE]
Tue Oct 9 17:32:56 2012: :: Initializing random seed [BUSY] [DONE]
Tue Oct 9 17:32:56 2012: :: Removing leftover files [BUSY] [DONE]
Tue Oct 9 17:32:56 2012: :: Saving dmesg log [BUSY] [DONE]
Tue Oct 9 17:32:56 2012: INIT: Entering runlevel: 5
Tue Oct 9 17:32:56 2012: :: Starting Syslog-NG [BUSY] [DONE]
Tue Oct 9 17:32:57 2012: :: Starting D-BUS system messagebus [BUSY] [DONE]
Tue Oct 9 17:32:57 2012: :: Starting wicd [BKGD]
Tue Oct 9 17:32:57 2012: :: Starting alsa [BKGD]
Tue Oct 9 17:32:57 2012: :: Starting crond [BKGD]
Tue Oct 9 17:32:57 2012: Found hardware: "HDA-Intel" "VIA VT1708S" "HDA:11060397,104383d6,00100000" "0x1043" "0x83d6"
Tue Oct 9 17:32:57 2012: Hardware is initialized using a generic method
Tue Oct 9 17:32:57 2012: /usr/sbin/alsactl: set_control:1328: failed to obtain info for control #1 (No such file or directory)
Tue Oct 9 17:32:57 2012: /usr/sbin/alsactl: set_control:1328: failed to obtain info for control #2 (No such file or directory)
Tue Oct 9 17:32:57 2012: /usr/sbin/alsactl: set_control:1328: failed to obtain info for control #7 (No such file or directory)
Tue Oct 9 17:32:57 2012: /usr/sbin/alsactl: set_control:1328: failed to obtain info for control #8 (No such file or directory)
Tue Oct 9 17:32:57 2012: /usr/sbin/alsactl: set_control:1328: failed to obtain info for control #21 (No such file or directory)
Tue Oct 9 17:32:57 2012: /usr/sbin/alsactl: set_control:1328: failed to obtain info for control #22 (No such file or directory)
Tue Oct 9 17:32:57 2012: :: Starting preload daemon: [BUSY] [DONE]
Tue Oct 9 17:32:57 2012: :: Starting OpenNTPD [BUSY] [DONE]
Tue Oct 9 17:33:12 2012: Error resolving pool.ntp.org: Name or service not known (-2)
Tue Oct 9 17:33:12 2012: 9 Oct 17:33:12 ntpdate[1000]: Can't find host pool.ntp.org: Name or service not known (-2)
Tue Oct 9 17:33:12 2012: 9 Oct 17:33:12 ntpdate[1000]: no servers can be used, exiting
Tue Oct 9 17:33:12 2012: /etc/rc.local: línea 6: service: no se encontró la orden
Last edited by eherranzr (2012-10-10 08:21:21)
Offline
Please post your /etc/rc.local.
Offline
This is my rc.conf file:
#
# /etc/rc.conf - Main Configuration for Arch Linux
#
# -----------------------------------------------------------------------
# LOCALIZATION
# -----------------------------------------------------------------------
#
# LOCALE: available languages can be listed with the 'locale -a' command
# HARDWARECLOCK: set to "UTC" or "localtime", any other value will result
# in the hardware clock being left untouched (useful for virtualization)
# TIMEZONE: timezones are found in /usr/share/zoneinfo
# KEYMAP: keymaps are found in /usr/share/kbd/keymaps
# CONSOLEFONT: found in /usr/share/kbd/consolefonts (only needed for non-US)
# CONSOLEMAP: found in /usr/share/kbd/consoletrans
# USECOLOR: use ANSI color sequences in startup messages
#
#LOCALE="es_ES.UTF-8"
#HARDWARECLOCK="localtime"
#TIMEZONE="Europe/Madrid"
#KEYMAP="es"
#CONSOLEFONT=
#CONSOLEMAP=
#USECOLOR="yes"
# -----------------------------------------------------------------------
# HARDWARE
# -----------------------------------------------------------------------
#
# MOD_AUTOLOAD: Allow autoloading of modules at boot and when needed
# MOD_BLACKLIST: Prevent udev from loading these modules
# MODULES: Modules to load at boot-up. Prefix with a ! to blacklist.
#
# NOTE: Use of 'MOD_BLACKLIST' is deprecated. Please use ! in the MODULES array.
#
#MOD_AUTOLOAD="yes"
#MOD_BLACKLIST=() #deprecated
#MODULES=(vboxdrv)
# Scan for LVM volume groups at startup, required if you use LVM
#USELVM="no"
# -----------------------------------------------------------------------
# NETWORKING
# -----------------------------------------------------------------------
#
# HOSTNAME: Hostname of machine. Should also be put in /etc/hosts
#
#HOSTNAME="WORK_GROUP"
# Use 'ifconfig -a' or 'ls /sys/class/net/' to see all available interfaces.
#
# Interfaces to start at boot-up (in this order)
# Declare each interface then list in INTERFACES
# - prefix an entry in INTERFACES with a ! to disable it
# - no hyphens in your interface names - Bash doesn't like it
#
# DHCP: Set your interface to "dhcp" (eth0="dhcp")
# Wireless: See network profiles below
#
#Static IP example
#eth0="eth0 192.168.0.2 netmask 255.255.255.0 broadcast 192.168.0.255"
#eth0="dhcp"
#INTERFACES=(eth0)
# Routes to start at boot-up (in this order)
# Declare each route then list in ROUTES
# - prefix an entry in ROUTES with a ! to disable it
#
#gateway="default gw 192.168.0.1"
#ROUTES=(!gateway)
# Enable these network profiles at boot-up. These are only useful
# if you happen to need multiple network configurations (ie, laptop users)
# - set to 'menu' to present a menu during boot-up (dialog package required)
# - prefix an entry with a ! to disable it
#
# Network profiles are found in /etc/network.d
#
# This now requires the netcfg package
#
#NETWORKS=(main)
# -----------------------------------------------------------------------
# DAEMONS
# -----------------------------------------------------------------------
#
# Daemons to start at boot-up (in this order)
# - prefix a daemon with a ! to disable it
# - prefix a daemon with a @ to start it up in the background
#
DAEMONS=(vboxdrv syslog-ng dkms_autoinstaller !network !netfs dbus @wicd @alsa @crond preload openntpd rt5370sta)
As you can see nearly everything is commented because of the new booting method
Offline
I asked for /etc/rc.local, not rc.conf because
Tue Oct 9 17:33:12 2012: /etc/rc.local: línea 6: service: no se encontró la orden
Have you read the warning on https://wiki.archlinux.org/index.php/OpenNTPD ?
Last edited by karol (2012-10-09 19:40:38)
Offline
I asked for /etc/rc.local, not rc.conf because
Tue Oct 9 17:33:12 2012: /etc/rc.local: línea 6: service: no se encontró la orden
Oh sorry!
This is the rc.local:
#!/bin/bash
#
# /etc/rc.local: Local multi-user start-up script.
#
ntpdate pool.ntp.org
service cups stop
exit 0
Have you read the warning on https://wiki.archlinux.org/index.php/OpenNTPD ?
Yes I've read it but I don't know exactly what to do know.
Should I uninstall openNTPD and install something else or I can use it as I only want it to adjust the time?
I'm a bit lost in this subject as tou can see
Thanks for the patience
Regards
Last edited by eherranzr (2012-10-09 19:44:02)
Offline
1. Unless you have a reason for wanting Open NTPD specifically, yes, I would switch to something that's actually being maintained on Linux. In reality, though, something as straight forward as an NTP client doesn't need much in the way of maintenance or updating, so it would be on my "when I get around to it" list.
2. You clock shouldn't be far enough off to notice after a simple reboot. From your rc.conf, I'm guessing the hardware clock is set to local time? Did you also run hwclock --localtime? What does your /etc/adjtime look like
3. If the RTC is too far off, most programs won't write to it, they just update the system (software) time and that's it. Run hwclock --set --date="YYYY-MM-DD hh:mm:ss" to get the RTC within a minute or two.
4. Your startup problem is pretty simple, OpenNTPD is being run within a second of starting up wicd. This isn't enough time for the connection to be up and ready.
Last edited by Scimmia (2012-10-09 22:07:46)
Offline
4. Your startup problem is pretty simple, OpenNTPD is being run within a second of starting up wicd. This isn't enough time for the connection to be up and ready.
https://wiki.archlinux.org/index.php/Op … on_Failure
eherranzr, please post the output of 'hwclock -D' and 'date'.
Offline
First of all, thanks for your answers, it's amazing the support somebody can receive here.
I've just rebooted and it seems to have corrected the time, I'll reboot now again to make sure if it's correct as I did nothing related to te time before rebooting.
1. Unless you have a reason for wanting Open NTPD specifically, yes, I would switch to something that's actually being maintained on Linux. In reality, though, something as straight forward as an NTP client doesn't need much in the way of maintenance or updating, so it would be on my "when I get around to it" list.
Okey, I should uninstall OpenNTPD and install someone else. Which one would you recommend? The simpliest to configure would be okey as I just need to adjust the time during the boot.
2. You clock shouldn't be far enough off to notice after a simple reboot. From your rc.conf, I'm guessing the hardware clock is set to local time? Did you also run hwclock --localtime? What does your /etc/adjtime look like
Yes and this is the output:
mié 10 oct 2012 09:37:26 CEST -0.656681 seconds
And /etc/adjtime contains the following:
-3.484462 1349773172 0.000000
1349773172
LOCAL
3. If the RTC is too far off, most programs won't write to it, they just update the system (software) time and that's it. Run hwclock --set --date="YYYY-MM-DD hh:mm:ss" to get the RTC within a minute or two.
Sorry, I don't understand what you're saying here.
4. Your startup problem is pretty simple, OpenNTPD is being run within a second of starting up wicd. This isn't enough time for the connection to be up and ready.
Scimmia wrote:4. Your startup problem is pretty simple, OpenNTPD is being run within a second of starting up wicd. This isn't enough time for the connection to be up and ready.
https://wiki.archlinux.org/index.php/Op … on_Failure
eherranzr, please post the output of 'hwclock -D' and 'date'.
This is the output of hwclock -D
hwclock from util-linux 2.22
Using /dev interface to clock.
Last drift adjustment done at 1349773172 seconds after 1969
Last calibration done at 1349773172 seconds after 1969
Hardware clock is on local time
Assuming hardware clock is kept in local time.
Waiting for clock tick...
...got clock tick
Time read from Hardware Clock: 2012/10/10 09:41:18
Hw clock time : 2012/10/10 09:41:18 = 1349854878 seconds since 1969
mié 10 oct 2012 09:41:18 CEST -0.985181 seconds
And this is the one for date
mié oct 10 09:42:01 CEST 2012
I'm going to reboot now, if the time continues being correct I'll mark the post as solved although I don't have a solution for the problem as it was resolved "magically"
Regards
Offline
Okey, I should uninstall OpenNTPD and install someone else. Which one would you recommend? The simpliest to configure would be okey as I just need to adjust the time during the boot.
The most popular ones are chrony and ntpd. I've used both, either one will work fine. Chrony has a smaller footprint and handles being disconnected better, but ntpd has been the standard for a long time. Take your pick.
Scimmia wrote:3. If the RTC is too far off, most programs won't write to it, they just update the system (software) time and that's it. Run hwclock --set --date="YYYY-MM-DD hh:mm:ss" to get the RTC within a minute or two.
Sorry, I don't understand what you're saying here.
What I'm saying is that if you're clock is too far off, syncing the time to the internet server will only update the time you're displaying, not the hardware clock that the system reads from when it starts up. You need to get the hardware clock close so that it will be updated from the NTP client.
You're saying that your problem seems to have solved itself, but unless you can disable the ntp daemon completely and not notice, there's something wrong with your system.
Last edited by Scimmia (2012-10-10 07:54:27)
Offline
You're saying that your problem seems to have solved itself, but unless you can disable the ntp daemon completely and not notice, there's something wrong with your system.
I was going to reboot but I realised that you answered so I'm going to disable it.
To disable it what should I do, delete openntpd from the DAEMONS?
DAEMONS=(vboxdrv syslog-ng dkms_autoinstaller !network !netfs dbus @wicd @alsa @crond preload openntpd rt5370sta)
Should I do something else? Maybe commenting the openntpd line in /etc/rc.local?
#!/bin/bash
#
# /etc/rc.local: Local multi-user start-up script.
#
ntpdate pool.ntp.org
service cups stop
exit 0
Offline
yes, put a "!" in front of the openntpd daemon and comment out the ntpdate line and shutdown (not reboot, but shutdown). If the clock is way off after booting back up, something isn't working right.
Offline
yes, put a "!" in front of the openntpd daemon and comment out the ntpdate line and shutdown (not reboot, but shutdown). If the clock is way off after booting back up, something isn't working right.
Okey, everything seems to be ok. I've shutdown the computer and booted it again after commenting the daemos an the ntpd line and everything seems to be correct. The hour is okey (http://time.is/ says that my clock is 3.3 seconds ahead) so everything seems to be solved.
Thanks to everybody.
Offline
eherranzr, please familiarize yourself with the wiki. It has info on why localtime is discouraged https://wiki.archlinux.org/index.php/Time and how to disable a daemon: https://wiki.archlinux.org/index.php/Daemon
Offline