# (Solved)System hangs when booting( setting system clock)

## jazzi

Sometimes when booting it will hangs in 

```
Setting system clock using hardware clock(local time)
```

sometimes it will pass this step successfully, problems happened after I upgrade my kernel to 2.6.25-r7

```
$ uname -r

2.6.25-gentoo-r7
```

I set Shanghai as my local time and edit /etc/confi.d/clock, in kernel I've build 

```
[*]RTC Timer support

   [*]Use RTC as sequencer timer
```

```
cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
```

/etc/conf.d/clock

 *Quote:*   

> CLOCK="local"
> 
> TIMEZONE="Asia/Shanghai"

 

What information I need to provide? please tell me. I appreciate.

jazziLast edited by jazzi on Sun Aug 03, 2008 5:39 am; edited 1 time in total

----------

## jazzi

It's a so qurious problem that I never met in 2.6.24-r8.

Is that the problem of new kernel? When I upgrade to a new kernel, what should I do, only emerge world?

----------

## guivaloz

I installed kernel verision 2.6.25-r7 in two laptops and one desktop. The three hangs on the "Setting system clock using hardware clock" message. I will return to kernel 2.6.24-r8, may be don't have that problem.

This is my /etc/localtime

```
cp /usr/share/zoneinfo/Mexico/General /etc/localtime
```

And my /etc/conf.d/clock

```
CLOCK="UTC"

TIMEZONE="Mexico/General"
```

Another post of this problem is in https://forums.gentoo.org/viewtopic-t-702366-highlight-clock.html

----------

## jazzi

 *guivaloz wrote:*   

> I installed kernel verision 2.6.25-r7 in two laptops and one desktop. The three hangs on the "Setting system clock using hardware clock" message. I will return to kernel 2.6.24-r8, may be don't have that problem.

 

Hi quivaloz, how is your try going on? when you return to kernel -r8, is everything OK? If it works, I'll do that too.

----------

## cgmd

 *jazzi wrote:*   

> Sometimes when booting it will hangs in 
> 
> ```
> Setting system clock using hardware clock(local time)
> ```
> ...

 

I have the same identical problem, using gentoo-2.6.25-r6...  :Confused: 

----------

## guivaloz

At this moment, kernel 2.6.24-gentoo-r8 in a desktop computer (VIA pc3500g) and the laptop (Dell Inspiron 9300) don't hangs in several reboots.

----------

## jazzi

 *guivaloz wrote:*   

> At this moment, kernel 2.6.24-gentoo-r8 in a desktop computer (VIA pc3500g) and the laptop (Dell Inspiron 9300) don't hangs in several reboots.

 

So that maybe it's the bug of new kernel. Besides, how to emerge old kernel?

----------

## DaggyStyle

strange, I had this issue on my amd64 up until 24 since I've switched to 25, I'm free of that hang.

I use tuxonice 2.6.25-r7 and no RTC timer support in the kernel

----------

## guivaloz

To install the previous kernel...

```
emerge =gentoo-sources-2.6.24-r8
```

Look at http://packages.gentoo.org/package/sys-kernel/gentoo-sources to identify stables kernels.

I'm using 2.6.24-r8 without problems in three computers.

----------

## jazzi

THANKS guivaloz, I've downgrade to 2.6.24-r8 now and everything seems fine. 

I think the new kernel is not a gift for both of us.  :Very Happy: 

----------

## guivaloz

I am testing a new configuration in kernel 2.6.25-r7. In https://bugs.gentoo.org/show_bug.cgi?id=232343 says that the rtc

module was splitted in various rtc-[something] modules.

I desactivated Enhanced Real Time Clock Support, activated Real Time Clock and PC-style 'CMOS'.

```
Device Drivers  --->

  Character devices  --->

    < > Enhanced Real Time Clock Support

  <*> Real Time Clock  --->

    [*]   Set system time from RTC on startup and resume (NEW)

    (rtc0)  RTC used to set the system time (NEW)

      *** RTC interfaces ***

    [*]   /sys/class/rtc/rtcN (sysfs) (NEW) 

    [*]   /proc/driver/rtc (procfs for rtc0) (NEW)

    [*]   /dev/rtcN (character devices) (NEW)

      *** Platform RTC drivers ***

    <*>   PC-style 'CMOS'
```

After some reboots it doesn't hang at Setting system clock using hardware clock. If you can test it, please tell me your results.

UPDATE: Don't work. I will back to the previous kernel.

----------

## Chris W

I've seen this, intermittently, on 2.6.25-gentoo-r7 and -r8 .  The first time was yesterday after some weeks of running -r7.  May actually be something outside the kernel not playing nice.

----------

## darkarchon

I have been having the same occasional problem in 2.6.25-gentoo-r8. The system will just hang at "Setting system clock using hardware clock(local time)". 

/etc/conf.d/clock

```
CLOCK="local"

TIMEZONE="CST6CDT"
```

----------

## lightning

I also used to have (or still I do) this problem after upgrading to 2.6.25-r8, I did not remove elder kernels 2.6.24*. When the problem appeared first time I've immediately tried to boot previous kernel - same problem, even sometimes booting hang up earlier during first level kernel booting. 

System was booting with no problems after couple of restarts like a lottery. 

Now I am after several world updates (still use 2.6.25-r :Cool:  and issue did not appear with last about 5-10 reboots. I advice to update entire system and this probably will help.

----------

## pste

I've had this issue both on my "old" family system (P4 3.6GHz - kernel 2.6.25-r?) and on a totally fresh test install on a macbook pro (early 2008 model), which makes me think it doesn't have anything to do with weather or not the system is completely updated or not. I mean the new install was made with an emerge -e world after the first booting to new system, that is it should be consistently compiled...

They both do have CLOCK set to "local" and Enhanced Real Time Clock in kernel, which makes me think guivaloz is on the right track, have you came up to something?

The problem, from one point, is that is doesn't hang every time, so it is hard to know if it's fixed or not. The good thing is that the system is usable  :Smile: 

I don't know if it at all has something to do with this or if anyone can make something out of it, but I kind of have a feeling (no statistics available) that it hangs with higher probability after a filesystem check - anyone get any new ideas?

/pste

----------

## DNAspark99

same issue here;

2.6.26-hardened-r2

no fix yet?

----------

## lightning

since i have updated world the problem never happened again in my system

----------

## DNAspark99

still an issue on my systems. 

My temp solution was to just remove 'clock' from the boot runlevel - but it keeps re-appearing??!

----------

## Stupendoussteve

I have not had this issue with 2.6.27, did with 25.

----------

## guivaloz

Stupendoussteve is right. Emerge the newest kernel 2.6.27-r3. First, in /etc/portage/package.keywords add the following line to permit install a unstable kernel.

```

sys-kernel/gentoo-sources

```

Emerge gentoo-sources-2.6.27-r3

```

# emerge -p =gentoo-sources-2.6.27-r3

```

Using the following configuration...

```

Processor type and features  --->

  [*] HPET Timer Support

  [*] Local APIC support on uniprocessors

  [*]   IO-APIC support on uniprocessors

Device Drivers  --->

  <*> Real Time Clock  --->

    [*]   /sys/class/rtc/rtcN (sysfs)

    [*]   /proc/driver/rtc (procfs for rtc0)

    [*]   /dev/rtcN (character devices)

    <*>   PC-style 'CMOS'

```

At dmesg I get a favorable message:

```

# dmesg | egrep '(hpet|rtc)'

[    0.112083] hpet clockevent registered

[    0.112090] hpet0: at MMIO 0xfed00000, IRQs 2, 8, 0

[    0.112304] hpet0: 3 64-bit timers, 14318180 Hz

[    1.798757] rtc_cmos 00:06: rtc core: registered rtc_cmos as rtc0

[    1.798853] rtc0: alarms up to one month, y3k, hpet irqs

[    1.834233] Using IPI Shortcut mode

```

I was using this kernel 2.6.27 for a week in two diffent laptops (both hangs with 2.6.25) without problem.

----------

