Operating System - HP-UX
1751716 Members
5452 Online
108781 Solutions
New Discussion

Re: abnormal issue when system boot:/sbin/rc could not execute.

 
SOLVED
Go to solution
stephen peng
Valued Contributor

abnormal issue when system boot:/sbin/rc could not execute.

guys,
http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1455121
above thread discribed the issue I met at an rp2430.
When I boot this rp2430, and when it tried to run /sbin/rc, it told:
/sbin/rc[67]: can not execute
/sbin/rc:failed to read row and column info from screen.

HP-UX Start-up in progress
Starting Servicecontrol Manager daemon............[OK]
Starting the Skywin-wg Subsystem........[OK]

everything in /sbin/init.d was not startup, so the os was not completely an os. /sbin/rc and /etc/rc.config were not modified recently.

the 66th and 67th lines of /sbin/rc:
if [ -f /etc/rc.config ]; then
. /etc/rc.config

could you please offer some hints to fix this problem?

thanks a lot!
7 REPLIES 7
Dennis Handly
Acclaimed Contributor

Re: abnormal issue when system boot:/sbin/rc could not execute.

>the 66th and 67th lines of /sbin/rc: . /etc/rc.config
>could you please offer some hints to fix this problem?

This script fragment sources just about EVERYTHING in /etc/rc.config.d. Remove old backup and junk files there.
(Or create a subdirectory.)
Shibin_2
Honored Contributor

Re: abnormal issue when system boot:/sbin/rc could not execute.

Do you have anything like _old or .bak files in /etc/rc.config.d/ ? If so, remove those or move it to somewhere else.

You shouldn't keep those backups in that directory.
Regards
Shibin
James R. Ferguson
Acclaimed Contributor
Solution

Re: abnormal issue when system boot:/sbin/rc could not execute.

Hi Stephen:

As noted, keeping "backup" copies of files in the '/etc/rc.config.d' directory can lead to the behavior you have observed. You can keep backup copies of files here _ONLY_ if you follow the rules documented in '/etc/rc.config'.

One way to expose your problem is to do:

# sh -vx /etc/rc.config 2>&1|more

The actual filename will appear as 'fname=' in the traced output with clear syntax errors like you have seen.

For more on this, see:

You probably have a bogus file in the '/etc/rc.config.d' directory. You can keep backup copies of files here _ONLY_ if you follow the rules documented in '/etc/rc.config'.

One way to expose the problem is to do:

# sh -vx /etc/rc.config 2>&1|more

The actual filename will appear as 'fname=' in the traced output with clear syntax errors like you have seen.

See my further comments in this thread:

http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1350776

Regards!

...JRF...
stephen peng
Valued Contributor

Re: abnormal issue when system boot:/sbin/rc could not execute.

James,
thank you for your reply!
I could never imagine such situation that would cause this issue. I would try your method next week, hopefully it would work out!

regards
stephen
Ismail Azad
Esteemed Contributor

Re: abnormal issue when system boot:/sbin/rc could not execute.

Sir,

Probably your /sbin/init itself is corrupt since /sbin/rc is symbollically linked to it. If the above solutions do not work try booting from a recovery shell and proceed.
Read, read and read... Then read again until you read "between the lines".....
stephen peng
Valued Contributor

Re: abnormal issue when system boot:/sbin/rc could not execute.

Ismail,
You were so right. someone emptied most scripts at /sbin/init.d two years ago. since it was not rebooted all the time, so no one found out what happened.

regards
Stephen
stephen peng
Valued Contributor

Re: abnormal issue when system boot:/sbin/rc could not execute.

thank you all for your kindly reply!