우분투에서 시스템이 정지 되어 버리면 난감하기 그지 없다.
ctrl+alt+del을 열심히 눌러보지만 우분투는 xp가 이니다.
썬마이크로 시스템에서 이에 대한 대책을 마련해 두었다.
이야기가 상당히 복잡해 질것 같지만 제목부터 말하자면 이것을 magiccSysRq 라고 한다.
이야기가 들어가기 전에 가징 쉬운 방법은 ctrl+alt+backspace이다.
그러나 이것은 안전한 방법이 아니다.
데이타를 잃지 않고 하드에 손상이 없는 가장 좋은 방법을 사용하려면 magicsysrq 키를 사용해야한다.
1,손상없이 재부팅
Alt+SysRq+R+S+E+I+U+B
먼저 alt와 print screen키는 끝까지 누르고 있어야 한다.
그런 상태에서 r, s, e, i, u, b를 순서적으로 5초간격으로 한번씩 눌렀다 띈다.
안되면 다시한번
안되면 시간간격을 늘려서 다시
2,손상없이 종료
Alt+SysRq+R+S+E+I+U+O
방법은 위와 같다
각키에 대한 설명은 아래와 같다.
0 – 9 – sets the console log level, controlling which kernel messages will be printed to your console so that you don’t get flooded.
B – restarts the system without making steps to ensure that the conditions are good for a safe reboot, using this key alone is like doing a cold reboot.
E – sends SIGTERM to all processes except init. This means that an attempt is done to end the current processes except init, safely, e.g. saving a document.
F – call oom_kill(Out Of Memory Killer), which will kill a process that is consuming all available memory.
H – displays help about the SysRq keys on a terminal though in actuality you can use any key except for the ones specified, to display help.
I – sends SIGKILL to all processes except init. This means that all the processes except for init are killed, any data in processes that are killed will be lost.
K – kills all processes on the current terminal. It is a bad idea to do this on a console where X is running as the GUI will stop and you can’t see what you type, so you will need to switch to a tty after doing the magic SysRq.
L – sends SIGKILL to all processes, including init. This means that every process including init will be killed, using this key will render your system non-functional and no further magicSysRq keys can be used. So in this case you will have to cold reboot it.
M – dumps memory info to your console.
O – shuts down the system via ACPI or in older systems, APM. As in key “B”, using this key alone is like a cold reboot(Or in this case, a cold shutdown
).
P – dumps the current registers and flags to your console.
Q – dumps all timers info to your console.
R – takes keyboard and mouse control from the X server. This can be useful if the X-Server crashed, you can change to a console and kill the X-Server or check the error log.
NOTE:- The documentation refers to this key’s task as “Turns off keyboard raw mode and sets it to XLATE”, but I suppose it’s safe enough to assume that it takes back control from X.
S – writes all data from the disc cache to the hard-discs, it is a sync and is necessary to reduce the chances of data corruption.
T – dumps a list of current tasks and info to your console.
U – remounts all mounted filesystems read-only. After using this key, you can reboot the system with Alt+SysRq+B without harming the system.
W – dumps uninterruptable (blocked) state tasks.