Jump to content
  • 0
Sandro

Errors with /etc/init.d/hwclock

Question


Hi To All Dear _Funtoo Users.

ci74771ht ~ # cat /etc/conf.d/hwclock 
# Set CLOCK to "UTC" if your Hardware Clock is set to UTC (also known as
# Greenwich Mean Time).  If that clock is set to the local time, then
# set CLOCK to "local".  Note that if you dual boot with Windows, then
# you should set it to "local".
clock="local"
 
# If you want the hwclock script to set the system time (software clock)
# to match the current hardware clock during bootup, leave this
# commented out.
# However, you can set this to "NO" ifyou are running a modern kernel
# with CONFIG_RTC_HCTOSYS set to y and your hardware clock set to UTC.
clock_hctosys="YES"
 
# If you do not want to set the hardware clock to the current system
# time (software clock) during shutdown, set this to no.
clock_systohc="YES"
 
# If you wish to pass any other arguments to hwclock during bootup,
# you may do so here. Alpha users may wish to use --arc or --srm here.
clock_args=""
 
But I got errors either at startup then in the shutdown:
 

hwclock: Cannot access the Hardware Clock via any known method.
hwclock: Use the --debug option to see the details of our search for an access method.
 * ERROR: hwclock failed to stop
hwclock: Cannot access the Hardware Clock via any known method.
hwclock: Use the --debug option to see the details of our search for an access method.
 
There is a way to solve ?
 
Thank You !!!!

Share this post


Link to post
Share on other sites

4 answers to this question

Recommended Posts

  • 0

So.... the trouble is in my kernel-config ?

Yes!

Configure the kernel with menuconfig following this path:

Device Drivers

Real Time Clock

*** Platform RTC drivers ***

PC-style 'CMOS'

I compile as <M> kernel module.

Rebuild kernel and install.

Share this post


Link to post
Share on other sites
  • 0

hwclock communicates with cmos clock on bios motherboard using /dev/rtc
 

funtoo rj # hwclock --debug
hwclock from util-linux 2.25.2
hwclock: cannot open /dev/rtc: No such file or directory
No usable clock interface found.
hwclock: Cannot access the Hardware Clock via any known method.

funtoo rj # ls /dev/r*
/dev/ram0   /dev/ram11  /dev/ram14  /dev/ram3  /dev/ram6  /dev/ram9
/dev/ram1   /dev/ram12  /dev/ram15  /dev/ram4  /dev/ram7  /dev/random
/dev/ram10  /dev/ram13  /dev/ram2   /dev/ram5  /dev/ram8

Device Drivers/Real Time Clock/*** Platform RTC drivers ***/PC-style 'CMOS'

funtoo rj # modinfo rtc-cmos
filename:       /lib/modules/4.0.5-gentoo/kernel/drivers/rtc/rtc-cmos.ko
license:        GPL
description:    Driver for PC-style 'CMOS' RTCs
author:         David Brownell
alias:          platform:rtc_cmos
alias:          acpi*:PNP0B02:*
alias:          pnp:dPNP0b02*
alias:          acpi*:PNP0B01:*
alias:          pnp:dPNP0b01*
alias:          acpi*:PNP0B00:*
alias:          pnp:dPNP0b00*
depends:        
intree:         Y
vermagic:       4.0.5-gentoo SMP mod_unload modversions 

When rtc-cmos loads system creates /dev/rtc and /dev/rtc0

funtoo rj # ls /dev/r*
/dev/ram0   /dev/ram12  /dev/ram2  /dev/ram6  /dev/random
/dev/ram1   /dev/ram13  /dev/ram3  /dev/ram7  /dev/rtc
/dev/ram10  /dev/ram14  /dev/ram4  /dev/ram8  /dev/rtc0
/dev/ram11  /dev/ram15  /dev/ram5  /dev/ram9

funtoo rj # hwclock --debug
hwclock from util-linux 2.25.2
Using the /dev interface to the clock.
Assuming hardware clock is kept in UTC time.
Waiting for clock tick...
...got clock tick
Time read from Hardware Clock: 2015/08/30 23:39:43
Hw clock time : 2015/08/30 23:39:43 = 1440977983 seconds since 1969
Sun 30 Aug 2015 07:39:43 PM EDT  -0.328634 seconds

Share this post


Link to post
Share on other sites
  • 0

Thanx for answer; but: I've these outputs:

ci74771ht ~ # hwclock --debug
hwclock da util-linux 2.25.2
hwclock: impossibile aprire /dev/rtc: File o directory non esistente
Impossibile trovare un'interfaccia clock utilizzabile.
hwclock: Cannot access the Hardware Clock via any known method.
ci74771ht ~ # modinfo rtc-cmos

modinfo: ERROR: Module rtc-cmos not found.

ci74771ht ~ # ls /dev/r*
/dev/ram0   /dev/ram12  /dev/ram2  /dev/ram6  /dev/random
/dev/ram1   /dev/ram13  /dev/ram3  /dev/ram7  /dev/rfkill
/dev/ram10  /dev/ram14  /dev/ram4  /dev/ram8  /dev/root
/dev/ram11  /dev/ram15  /dev/ram5  /dev/ram9
 
 
util-linux is installed.
 
So.... the trouble is in my kernel-config ?

(forgive my ignorance) !!!! :(

Share this post


Link to post
Share on other sites
  • 0

Great cardinal :)

 

Now it's ok.

 

No errors on startup & shutdown !

ci74771ht sandro # hwclock --debug
hwclock da util-linux 2.25.2
Using the /dev interface to the clock.
Si presuppone che il clock hardware sia mantenuto nell'orario UTC.
Attesa del segnale dal clock...
...ricevuto segnale dal clock
Orario letto dal clock hardware: 2015/09/02 20:41:22
Orario clock hardware : 2015/09/02 20:41:22 = 1441226482 secondi dal 1969
mer 02 set 2015 22:41:22 CEST  -0.439976 secondi

Thank YOu Very Much :) !!!!!!!!!!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...