Safe way to shut Debian down?

If none of the more specific forums is the right place to ask

Safe way to shut Debian down?

Postby DebianUser » 2005-12-10 16:02

Hi, just a quick question here...

What do you do when debian Sarge (running the KDE desktop and the 2.6 Linux Kernel) suddenly locks up, hangs or freezes while you are doing something (thus rendering the desktop and all programs unable to be used) and you want to avoid having to shut the computer off manually?.

I've tried CNT/ALT/DELETE and CTRL/ESC to reboot and none of this works so then I end up having to just shut the computer off manually and this has sometimes caused Debian to fail to restart so that I have to completely reinstall it again. Is there a proper or safe way to shut Debian down when this happens or a way to recover the desktop if it becomes unstable?.

Is there even a way to run an "integrity check" (like on Fedora) or "scandisk" (like on Windows)?. As a further footnote, I AM using the "testing" branch of Debian but very conservatively/sparingly and I only download programs from testing when I'm not required to remove other programs or make any changes that would radically alter the system.

Anyway, thank's in advance for any help I can get on these things.

- Regards, DebianUser
DebianUser
 
Posts: 1
Joined: 2005-12-10 15:56

Postby Jeroen » 2005-12-10 16:36

If your computer really locks up, and you have no way to kill the offending program, you can only hard-power it down. On bootup, typically disks will be checked if needed. You can force it with shutdown -r -F now, which will reboot and force a fsck on reboot (see man shutdown).

If X hangs, ctrl+alt+backspace sometimes works, you might try that. Also, logging in remotely via ssh might work even if local direct access is broken.
Jeroen
Debian Developer, Site Admin
Debian Developer, Site Admin
 
Posts: 571
Joined: 2004-04-06 18:19
Location: Utrecht, NL

Postby mikekgr » 2005-12-10 17:17

If the kernel is working but you have not any way to take the control using keyboard or mouse, it is worthy to try:
alt+SysRq+s
alt+SysRq+u
alt+SysRq+b

that means press and hold down Alt key, press and hold down SysRq key and then press 's' key

release all keys

then press and hold down Alt key, press and hold down SysRq key and then press 'u' key

release all keys

then press and hold down Alt key, press and hold down SysRq key and then press 'b' key

If your whole machine hangs, you can do

alt-SysRq-s (sync)

alt-SysRq-u (unmount)

alt-SysRq-b (boot)

Umounting and rebooting in this fashion after a hang should eliminate the necessity to perform an fsck during the subsequent reboot.


hope this can help a little bit

Best Regards,
Mike Kranidis
Last edited by mikekgr on 2005-12-13 13:17, edited 2 times in total.
mikekgr
 
Posts: 56
Joined: 2004-12-24 18:25
Location: Greece

Postby Penguin Skinner » 2005-12-11 18:13

Similar to what Mike posted, above, try this sequence (LeftAlt referring to the left 'alt' key; do not hold down the 'control' key):

LeftAlt+SysRq+r
LeftAlt+SysRq+s
LeftAlt+SysRq+e
LeftAlt+SysRq+i
LeftAlt+SysRq+u
LeftAlt+SysRq+b

FYI, here's what each step of the sequence should do:

r - keyboard in raw mode
s - sync disks
e - terminate all processes
i - kill all processes
u - remount filesystems read-only
b - reboot
Penguin Skinner
 
Posts: 709
Joined: 2005-09-15 20:37
Location: North by Northwest

Postby Arnvidr » 2005-12-12 16:43

What is the h for?
User avatar
Arnvidr
 
Posts: 51
Joined: 2005-12-07 15:08

Postby mikekgr » 2005-12-13 13:12

'h' - Will display help ( actually any other key than those listed
above will display help. but 'h' is easy to remember :-)
mikekgr
 
Posts: 56
Joined: 2004-12-24 18:25
Location: Greece

Postby Arnvidr » 2005-12-15 12:02

I see he took away the h, and added something else. I never knew about these possibilities. Good to know :)
User avatar
Arnvidr
 
Posts: 51
Joined: 2005-12-07 15:08

Postby RenaudM » 2005-12-21 12:06

Most of the time, only X Server is freezed. So simply kill it by typing CTRL-ALT-BACKSPACE (note DELETE instead of BACKSPACE). It is very rare to completly hang the computer, but more frequent to lock X. Try it, I bet it'll work
RenaudM
 
Posts: 10
Joined: 2005-12-20 12:49


Return to General Questions

Who is online

Users browsing this forum: Lysander and 7 guests

fashionable