Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Safe way to shut Debian down?

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
DebianUser
Posts: 1
Joined: 2005-12-10 15:56

Safe way to shut Debian down?

#1 Post by DebianUser »

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

Jeroen
Debian Developer, Site Admin
Debian Developer, Site Admin
Posts: 483
Joined: 2004-04-06 18:19
Location: Utrecht, NL
Contact:

#2 Post by Jeroen »

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.

mikekgr
Posts: 56
Joined: 2004-12-24 18:25
Location: Greece

#3 Post by mikekgr »

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.

Penguin Skinner
Posts: 709
Joined: 2005-09-15 20:37
Location: North by Northwest

#4 Post by Penguin Skinner »

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

User avatar
Arnvidr
Posts: 50
Joined: 2005-12-07 15:08

#5 Post by Arnvidr »

What is the h for?

mikekgr
Posts: 56
Joined: 2004-12-24 18:25
Location: Greece

#6 Post by mikekgr »

'h' - Will display help ( actually any other key than those listed
above will display help. but 'h' is easy to remember :-)

User avatar
Arnvidr
Posts: 50
Joined: 2005-12-07 15:08

#7 Post by Arnvidr »

I see he took away the h, and added something else. I never knew about these possibilities. Good to know :)

RenaudM
Posts: 10
Joined: 2005-12-20 12:49

#8 Post by RenaudM »

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

Post Reply