shutdown problem

Gerard Beekmans gerard at linuxfromscratch.org
Mon Jul 30 16:46:02 PDT 2001


On Mon, Jul 30, 2001 at 11:05:11PM +1000, Fergus Belford wrote:
> "Reboot" & "halt" drop me out to init level 6, whereupon I'm asked to supply
> password ( for maintenance). A further issuing of "reboot" works, only all
> mounted partitions (hda2(swap), hda3(LFS) and hda4(RedHat) are umounted
> uncleanly.
> 
> I have tried "shutdown -r now", which gets me to level 6, login & p'word
> again, "umount -a", telinit 2, then reboot. Now hda3(LFS) no longer comes up
> with unclean umount.  Bit long-winded though.
> 
> Sorry about delay in responding.

First let me explain why you are asked for a password. They are caused
by what we call fall-through entries in /etc/inittab. The order in which
run level actions appear in /etc/inittab matters. Here are the entries
for run levels 0 and 6:

	l0:0:wait:/etc/init.d/rc 0
	l6:6:wait:/etc/init.d/rc 6
	<cut some others>
	ft:06:respawn:/sbin/sulogin

When you reboot or halt, init will run "rc 0" or "rc 6" first. Those two
run levels have S999reboot and S999halt scripts which reboot the system,
causing the ft:06:respawn:/sbin/sulogin line never to be reached.

But if S999reboot or S999halt aren't executed, init will read the next
available line and run sulogin.

So for starters, make sure /etc/rc6.d/S999reboot is a valid symlink. Run
"file /etc/rc6.d/S999reboot" and it will tell you if the link is valid
or not (if not, it'll tell you that it's a broken symlink. If it is
valid it'll tell you to which file it points).

My guess it's not a valid symlink for some reason. If it is a valid one,
then reboot, enter password to enter the shell and run
/etc/rc6.d/S999reboot manually and see if there are any errors.

-- 
Gerard Beekmans
www.linuxfromscratch.org

-*- If Linux doesn't have the solution, you have the wrong problem -*-
-- 
Unsubscribe: send email to lfs-discuss-request at linuxfromscratch.org
and put unsubscribe in the subject header of the message



More information about the lfs-dev mailing list