Guest anon Posted November 11, 2002 Report Share Posted November 11, 2002 Author Tom Berger. The Magic SysRq Key This feature allows you to do some basic maintenance tasks even if the rest of the system isn't responding. It is enabled by default on Mandrake Linux. In particular, it allows you to shutdown your system properly, thus avoiding the risk of file system corruption when simply turning the machine off with media still being mounted. The 'SysRq' sequence involves pressing three keys at once, theleft ALT key, the 'SysRq' key (also labeled 'PrtSc' or 'F13') and a letter key: 1. <ALT> <SysRq> <r> puts the keyboard in 'raw' mode. This might be helpful in cases where the graphical interface does not respond to keyboard or mouse commands any more. Having pressed that sequence, press <ALT> <CTRL> <BACKSPACE> simultaneously. This will try to kill the X server and drops you onto the console (i.e. it's the emergency key combination to switch from runlevel 5 to runlevel 3). 2. <ALT> <SysRq> <s> attempts to write all unsaved data to disk ('sync' the disk) to prevent file corruption. 3. <ALT> <SysRq> <e> sends a termination signal to all processes, except for 'init'. 4. <ALT> <SysRq> <i> sends a kill signal to all processes, except for init, thus terminating all processes which ignored the termination signal. 5. <ALT> <SysRq> <u> remounts all mounted file systems read-only. This prevents file system corruption. 6. <ALT> <SysRq> <b> reboots the system. Alternatively, replace the 'b' with an 'o' to turn the machine off. If you look at this sequence, you see that you are - apart from the first step - actually emulating the 'init' shutdown process. Therefore it is important that you press these sequences in the correct order (e.g. that you 'sync' the drives before remounting them): Raw -Sync - tErm - kIll -Umount - reBoot. A possible mnemonic phrase: 'Raising Skinny Elephants Is Utterly Boring'. Mandrake Linux user Louis suggested this phrase, which is a bit more on topic: 'Remembering the Sequence Entirely Is Useful Buddy'. Quote Link to comment Share on other sites More sharing options...
Glitz Posted November 11, 2002 Report Share Posted November 11, 2002 I personally like to add and additional sync right after terminate and after kill. Sometimes crashed programs (like Nvidia drivers and X) come back to life and start accessing the hard drive. The extra syncs can often prevent an e2fsck. Glitz. Quote Link to comment Share on other sites More sharing options...
Guest Fatman Posted November 21, 2002 Report Share Posted November 21, 2002 This feature allows you to do some basic maintenance tasks even if the rest of the system isn't responding. It is enabled by default on Mandrake Linux. In particular, it allows you to shutdown your system properly, thus avoiding the risk of file system corruption when simply turning the machine off with media still being mounted. Doesn't seem to work with me. I can't get anything to happen, not even raw mode. What could be wrong? I mean, apart from the crash condition, obviously. Quote Link to comment Share on other sites More sharing options...
Glitz Posted November 23, 2002 Report Share Posted November 23, 2002 Make sure you are holding down all three keys at the same time (eg. press the ALT, SYSRQ, and R keys at the same time). If you are doing this then it means that either your system has crashed very badly (this can happen and even the sysrq keys wont work) or the option is disabled in the kernel (it is usually enabled in default kernels). Glitz. Quote Link to comment Share on other sites More sharing options...
Guest Fatman Posted November 24, 2002 Report Share Posted November 24, 2002 I'm using the default Mandrake 9 kernel. So I'm getting very bad crashes, which cause the Caps Lock and Scroll Lock indicators to blink. I assume this is some kind of syndrome, but I can't read it. Maybe this is some kind of hardware fault as it's quite old [6/7 years] but I'd prefer not to believe that. What could be the cause in terms of software? I assume not many things could produce a crash this serious. Quote Link to comment Share on other sites More sharing options...
Guest davebsr Posted November 26, 2002 Report Share Posted November 26, 2002 Let's say I get down to console with init only running. Can I get back? What do I do to get back to a full system? Quote Link to comment Share on other sites More sharing options...
Guest Maciek Posted December 1, 2002 Report Share Posted December 1, 2002 After I installed RH8 I realised that SysRq was disabled (when the system crashed, of course). Not sure why, maybe it's related to "security level". Simply changed the "kernel.sysrq" option in /etc/sysctl.conf and it worked again. Quote Link to comment Share on other sites More sharing options...
Guest aliensub Posted December 1, 2002 Report Share Posted December 1, 2002 Davebsr: just write (as root) telinit 5 This will get you back to X Quote Link to comment Share on other sites More sharing options...
Guest AlanR Posted April 19, 2006 Report Share Posted April 19, 2006 Hi Everyone I have Madriva 10.2 and 10.1 on a laptop and workstation , the key commands work fine on 10.1 (Workstation) but when i try them on a the Dell laptop 10.2 all i get is Changing Logging level, is there something i'm missing ? do i have to change some setting ? also just to note to get the sysRq key i have to hold down function - will this make a difference ? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.