[ltp] exiting single user mode

Henrique de Moraes Holschuh linux-thinkpad@linux-thinkpad.org
Thu, 6 Mar 2008 16:46:39 -0300


On Thu, 06 Mar 2008, Haines Brown wrote:

1. remount -o ro,remount /
2. sync ; exec /sbin/halt -f -w

I didn't test (2).  If it doesn't work, you could try doing
exec /sbin/init <whatever the kernel would give init>, which will definately
work.

> My first question is: What command am I missing that would have
> avoided this sync problem? I assume not sh3.1$ sync;sync . 

It is not a sync problem.  It is a user error problem added to a damn
cryptic kernel error message that doesn't help anyone ;-)

You CANNOT have userland without a process with pid 1 (init).  If PID 1
dies, the kernel hangs with the message you got.  It doesn't simply reboot
because normally it only happens when something breaks in the bootstrap
logic, and you want it to halt instead of looping forever doing reboots.

> Second question. It seems to me that when I used to get a kernel panic
> I could initiate a reboot with the three finger salute (C-M-Del), but
> that's not working on my Thinkpad. I'm forced a pull the power. Is

That works only if the BIOS is active.

SysRq+SUB  (Sync, Umount, Boot) will work fine if SysRq is enabled on your
kernel.

> there a way to force a shutdown without pulling the plug/battery?
> Power switch has no effect.

Power switch WILL have an effect, yes.  If you hold it pressed, eventually
the EC will step in and do a forced poweroff of the host CPU and most of the
mainboard, which is *BAD* for the disks if their heads are still loaded (and
they will be, unless you did something to avoid it), as that causes
emergency head unloads.

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh