# [Solved] Fail to set system clock

## buptwugh

When the gentoo boot the screen show some message about "Fail to set system clock"

I don't know how to fix it.

Thanks,

WughLast edited by buptwugh on Wed Feb 29, 2012 1:43 am; edited 1 time in total

----------

## aCOSwt

Can you post the output of the following command :

```
ls -ails /dev/rtc
```

----------

## buptwugh

Thanks,

This is the output:

```

NextZone ~ # ls -ails /dev/rtc

ls: cannot access /dev/rtc: No such file or directory

```

----------

## aCOSwt

Hrmmm... that is most probably the problem.

On my system I get /dev/rtc symlinked to /dev/rtc0

In good old times I would have suggested you to mknod rtc but with their new fashioned /dev I no longer know how things are made around here.

Sorry.

----------

## Randy Andy

Hi Folks.

My system gives me:

```
ls -ails /dev/rtc 

3137 0 lrwxrwxrwx 1 root root 4 28. Feb 16:52 /dev/rtc -> rtc0

```

To speak from one's own experience, mostly this fault depends on a wrong kernel configuration.

So check and correct your settings regarding the parameters below, but beware that the right settings could be differ a little regarding your hardware and architecture.

One additional hint out of:

/etc/conf.d/hwclock

# If you want to set the system time to the current hardware clock

# during bootup, then say "YES" here. You do not need this if you are

# running a modern kernel with CONFIG_RTC_HCTOSYS set to y.

#clock_hctosys="YES"

I prefer to use x-config or nconfig or menueconfig to change your kernel settings.

```

CONFIG_RTC_LIB=y

CONFIG_RTC_CLASS=y

CONFIG_RTC_HCTOSYS=y

CONFIG_RTC_HCTOSYS_DEVICE="rtc0"

# CONFIG_RTC_DEBUG is not set

#

# RTC interfaces

#

CONFIG_RTC_INTF_SYSFS=y

CONFIG_RTC_INTF_PROC=y

CONFIG_RTC_INTF_DEV=y

# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set

# CONFIG_RTC_DRV_TEST is not set

#

# I2C RTC drivers

#

# CONFIG_RTC_DRV_DS1307 is not set

# CONFIG_RTC_DRV_DS1374 is not set

# CONFIG_RTC_DRV_DS1672 is not set

# CONFIG_RTC_DRV_DS3232 is not set

# CONFIG_RTC_DRV_MAX6900 is not set

# CONFIG_RTC_DRV_RS5C372 is not set

# CONFIG_RTC_DRV_ISL1208 is not set

# CONFIG_RTC_DRV_ISL12022 is not set

# CONFIG_RTC_DRV_X1205 is not set

# CONFIG_RTC_DRV_PCF8563 is not set

# CONFIG_RTC_DRV_PCF8583 is not set

# CONFIG_RTC_DRV_M41T80 is not set

# CONFIG_RTC_DRV_BQ32K is not set

# CONFIG_RTC_DRV_S35390A is not set

# CONFIG_RTC_DRV_FM3130 is not set

# CONFIG_RTC_DRV_RX8581 is not set

# CONFIG_RTC_DRV_RX8025 is not set

# CONFIG_RTC_DRV_EM3027 is not set

# CONFIG_RTC_DRV_RV3029C2 is not set

#

# SPI RTC drivers

#

#

# Platform RTC drivers

#

CONFIG_RTC_DRV_CMOS=y

# CONFIG_RTC_DRV_DS1286 is not set

# CONFIG_RTC_DRV_DS1511 is not set

# CONFIG_RTC_DRV_DS1553 is not set

# CONFIG_RTC_DRV_DS1742 is not set

# CONFIG_RTC_DRV_STK17TA8 is not set

# CONFIG_RTC_DRV_M48T86 is not set

# CONFIG_RTC_DRV_M48T35 is not set

# CONFIG_RTC_DRV_M48T59 is not set

# CONFIG_RTC_DRV_MSM6242 is not set

# CONFIG_RTC_DRV_BQ4802 is not set

# CONFIG_RTC_DRV_RP5C01 is not set

# CONFIG_RTC_DRV_V3020 is not set

#

# on-CPU RTC drivers

```

Much success,

Andy.

----------

## buptwugh

Thank Randy Andy,aCOSwt

I have solved the warning by recompiling the kernel.

----------

