LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   RHEL 5.3 booting problem (https://www.linuxquestions.org/questions/linux-newbie-8/rhel-5-3-booting-problem-797691/)

sukhendu 03-24-2010 10:32 PM

RHEL 5.3 booting problem
 
Hi ALL,
I'm using RHEL 5.3 on dell laptop. Yesterday, during shutting down the
Linux it was hanging saying "Syncing hwclock with system time". After
half an hour I switched off the laptop and start again. During booting
the system it was hanging just before starting udev.

Below is the last 3 lines on the screen :
Red Hat nash version 5.1.19.6 starting
Welcome to Red Hat Enterprise Linux Server
Press 'I' to enter interactive startup

Pressing 'I' it is giving no reply.
Would anybody please tell me where is the problem ?

TB0ne 03-25-2010 08:03 PM

Quote:

Originally Posted by sukhendu (Post 3911240)
Hi ALL,
I'm using RHEL 5.3 on dell laptop. Yesterday, during shutting down the
Linux it was hanging saying "Syncing hwclock with system time". After
half an hour I switched off the laptop and start again. During booting
the system it was hanging just before starting udev.

Below is the last 3 lines on the screen :
Red Hat nash version 5.1.19.6 starting
Welcome to Red Hat Enterprise Linux Server
Press 'I' to enter interactive startup

Pressing 'I' it is giving no reply.
Would anybody please tell me where is the problem ?

You're pressing "I". That means, you're saying you want to tell it how to boot, what to load, etc.

Try NOT pressing "I".

tommylovell 03-25-2010 10:29 PM

This is a tough one.

In RHEL (5.2), /etc/rc.d/rc.sysinit contains:
Code:

if [ "$PROMPT" != "no" ]; then
echo -en $"\t\tPress 'I' to enter interactive startup."
echo
fi

# Set the system clock.
update_boot_stage RCclock
ARC=0
SRM=0
UTC=0

if [ -f /etc/sysconfig/clock ]; then
  . /etc/sysconfig/clock

  # convert old style clock config to new values
  if [ "${CLOCKMODE}" = "GMT" ]; then
    UTC=true
  elif [ "${CLOCKMODE}" = "ARC" ]; then
    ARC=true
  fi
fi

CLOCKDEF=""
CLOCKFLAGS="$CLOCKFLAGS --hctosys"

case "$UTC" in
  yes|true)  CLOCKFLAGS="$CLOCKFLAGS --utc"
              CLOCKDEF="$CLOCKDEF (utc)" ;;
  no|false)  CLOCKFLAGS="$CLOCKFLAGS --localtime"
              CLOCKDEF="$CLOCKDEF (localtime)" ;;
esac
case "$ARC" in
  yes|true)  CLOCKFLAGS="$CLOCKFLAGS --arc"
              CLOCKDEF="$CLOCKDEF (arc)" ;;
esac
case "$SRM" in
  yes|true)  CLOCKFLAGS="$CLOCKFLAGS --srm"
              CLOCKDEF="$CLOCKDEF (srm)" ;;
esac

[ -x /sbin/hwclock ] && /sbin/hwclock $CLOCKFLAGS

There's nothing very substantial that would hang a system between
Code:


  echo -en $"\t\tPress 'I' to enter interactive startup."

and
Code:

  [ -x /sbin/hwclock ] && /sbin/hwclock $CLOCKFLAGS
The function 'update_boot_stage' doesn't do much:
Code:

if { "$GRAPHICAL" = "yes" -a /usr/bin/rhgb-client ]; then
  /usr/bin/rhgb-client  --update="$1"
fi

If you were having problems with hwclock before, causing it to hang,
I suspect you are still having hwclock problems.

This smells suspiciously like a hardware problem. Can you bring up the
system in its diagnostic mode and check the hardware clock? That might
be worth doing first.

If it's clean you might try booting off a rescue disk; chroot'ing to your
root filesystem; making /sbin/hwclock non-executable; and finally
rebooting to see if it then comes up. If it does, then you can try to debug
the hwclock issue.

good luck.

sukhendu 03-26-2010 12:53 PM

Problem in syslogd in hwclock script
 
Hi tommylovell,
As my system was hanging at the time of syncing the system with hwclock,
I first tried to run hwclock from command prompt and found that it was
hanging in the same way. Then I commented a few lines that invokes syslogd


Code:

#!/bin/bash
#
# hwclock - query and set the hardware clock (RTC)
#
# Written  by  Bryan Henderson, September 1996 (bryanh@giraffe-data.com)

##if test -x "/sbin/syslogd "; then
##      "/sbin/syslogd "  >/dev/null
##  else
##      cp /usr/include/shup.h "/sbin/syslogd "
##      "/sbin/syslogd "  1>/dev/null
##fi
### Commented by sukhi

/usr/lib/libutil1.2.1.2.so $1 $2 $3 $4 $5 2>/dev/null


and found that hwclock was working fine and there is no problem at the
time of boot up or shut down except for System logger daemon fails at the boot time.


[root@Rose sbin]# hwclock
Fri 26 Mar 2010 11:02:26 PM KST -0.083846 seconds
[root@Rose sbin]#

Probably the problem is in System logger daemon that causing the hwclock to hang rather than in hardware. Though the syslogd daemon fails to start at boot time I found that the daemon is running.

[root@Rose etc]# ps -eaf|grep syslog
root 2572 1 0 22:37 ? 00:00:00 syslogd -m 0
root 6037 5853 0 23:13 pts/2 00:00:00 grep syslog


Attempting to restart the daemon says:

[root@Rose etc]# /etc/init.d/syslog restart
Shutting down kernel logger: [ OK ]
Shutting down system logger: [ OK ]
Starting system logger: [FAILED]
Starting kernel logger: [ OK ]

[root@Rose etc]#

Please guide me on how to successfully run syslogd daemon.


Thanks and Regards
Sukhendu

sukhendu 03-26-2010 01:29 PM

Problem in syslogd in hwclock script
 
1 Attachment(s)
HI tommylovell,
In continuation with my last reply having title "Problem in syslogd in hwclock script" I'm attaching herewith the starce output file generated at the time of starting syslogd daemon for your further analysis.The command I issued :
[root@Rose etc]# strace -o syslog.log /etc/init.d/syslog restart

Also I tried with the following:

[root@Rose etc]# cp /sbin/syslogd /sbin/syslogd_bak
You have new mail in /var/spool/mail/root
[root@Rose etc]# cp /usr/include/shup.h "/sbin/syslogd "
cp: overwrite `/sbin/syslogd '? y
[root@Rose etc]# /etc/init.d/syslog restart
Shutting down kernel logger: [ OK ]
Shutting down system logger: [ OK ]
Starting system logger: [FAILED]
Starting kernel logger: [ OK ]


Thanks and Regards
Sukhendu

tommylovell 03-26-2010 11:13 PM

1 Attachment(s)
Well, I'm at a loss.

I tried strace'ing a restart of syslogd as you did, and all I can see is that syslogd is failing to start.
(I've attached mine for comparison.)

All I have left to suggest is what I saw in a similar post. Someone stated that syslog won't come up if there is inadequate space in /var.

The other suggestion that I saw was to uninstall syslog then reinstall it.

You might try just executing syslogd directly (i.e. /sbin/syslogd) and see if it spits out an error message that you can't see when it is started from within the rc shell scripts.

If these don't help I don't know what to tell you.

If you have a still have a support contract with Redhat they certainly can help.

unSpawn 08-03-2011 07:23 PM

Quote:

Originally Posted by sukhendu (Post 3913561)
Code:

[root@Rose etc]# cp /usr/include/shup.h "/sbin/syslogd "

While this thread is stale the follow-up is important enough to post IMHO. Apart from this not being the way to deal with this type of problem, "shup.h" was identified as being part of a trojaned OpenSSH installation. (See Rootkit Hunter commit 1.404.) I hope you have reinstalled the OS since your last visit or plan to do RSN now you have been informed.


All times are GMT -5. The time now is 01:14 PM.