1835185 Members
2046 Online
110077 Solutions
New Discussion

Run level after boot

 
SOLVED
Go to solution
Luke Morgan
Frequent Advisor

Run level after boot

Hi,
I have a critical server running 10.20

Rebooted it last night using shutdown -r 1
and it rebooted ok but started up seemingly in single user mode.
who -r showed that it was at run level 3, but I wasn't prompted to log in, no network services were working and /home and others had not been mounted.
init 3 solved the problem and brought the server up to run level 3 and (touch wood :} )
everything is fine.
I checked /etc/inittab and the top line reads
init:3:initdefault:

Any ideas why that might have happened?

Thanks

Luke
12 REPLIES 12
melvyn burnard
Honored Contributor

Re: Run level after boot

first point, your critical server is runing an OS that is no longer supported
second point, check what /etc/rc.log shows.
My house is the bank's, my money the wife's, But my opinions belong to me, not HP!
twang
Honored Contributor

Re: Run level after boot

checl /etc/rc.log and see what applications started at current run level.
Michael Tully
Honored Contributor

Re: Run level after boot

Your problem seems to have stemmed from 'shutdown -r 1' seemingly has placed your system into single user mode (some people say run level one).
The -r does actually mean run level. Have a look at the man page 'man 1m shutdown'

The correct procedure to reboot your system is

# cd /
# shutdown -r -y 0 (using no numbers for -r)

From your /etc/inittab file, the line init:3 is actually the default run level when your system is fully up, meaning the scripts running in /sbin/rc1.d , /sbin/rc2.d & /sbin/rc3.d
Anyone for a Mutiny ?
Luke Morgan
Frequent Advisor

Re: Run level after boot

Thank you all.

Melvyn, I am aware it is no supported and I have made those 'above' me aware quite some time ago.

Melvyn and twang, thank you, I am currently looking through the log file.

Michael, I had a look at the man page and according to that, shutdown -r 0 will reboot the server. The man page states that -r is to reboot. However, the command you have stated would work too, so I thank you for the suggestion.

Luke
Ravi_8
Honored Contributor
Solution

Re: Run level after boot

Hi Luke

since you have issued command
#shutdown -r 1
system goes to run level 1 wherein no netwok services available, mount -a would have mounted all file systems.

init:3:initdefault meaning that
whenever you isuue reboot/shutdown -r, system will comeup to run level 3 by default (unless you interrupt the boot process)
never give up
melvyn burnard
Honored Contributor

Re: Run level after boot

blast! missed the -r1 bit.
This would have taken the system down to run level 1, which is not really what you want to do, as already pointed out by other respondents.

My house is the bank's, my money the wife's, But my opinions belong to me, not HP!
Luke Morgan
Frequent Advisor

Re: Run level after boot

It is documented here to use shutdown -r 1.
I thought that it meant to shutdown and reboot in 1 second.

I will be revising the documentation to shutdown -r

Many thanks to you all for your help.

Luke
Ravi_8
Honored Contributor

Re: Run level after boot

Hi Luke

#shutdown -h now
will completely halt the system
#reboot or
#shutdown -r now

will reboot the machine
never give up
Caesar_3
Esteemed Contributor

Re: Run level after boot

Hello!

As the shutdown without parameters goes to
single mode the -r X goes to X runlevel.

For reboot use shutdown -ry 0

Caesar
Richard Ace_1
Advisor

Re: Run level after boot

JUST A NOTE TO BE AWARE

Using

#reboot

Is a dirty way of rebooting the system from Run Level 3, as I beleive it does not run through the run scripts and shuts down things neatly. It just kills the processes off and unmount the File Systems and shuts down.

Though

#reboot

Is ok to issue from Run Level 1

Though the other two commands are fine.

Cheers

Rich
Joe Robinson_2
Super Advisor

Re: Run level after boot

was looking at this thread this morning, I have a similiar problem. my inittab is correct, and the rc.log looks fine (starting all it should be) however, CDE isn't starting at the console, it just goes to a root prompt; doing 'init 3' does start CDE, so I (seemingly) don't have reason to suspect any of those scripts in run-level 3. Suggestions, anyone?

Thanks in adavnce,
Joe
Pete Randall
Outstanding Contributor

Re: Run level after boot

Joe,

I would have to suggest that you start another thread, perhaps referring back to this one. With the magic bunny already assigned to this one, your response will be better with a new thread and you'll also be able to assign points to those who help you.


Pete


Pete