4 ms·
I'm using Linux since 20 years and used to do this all the time, back when Linux --or more specifically X Window system-- was less stable than today. I'd make s
by TacticalCoder 13y ago
I'm using Linux since 20 years and used to do this all the time, back when Linux --or more specifically X Window system-- was less stable than today. I'd make sure to always compile the kernel with MagicSysRQ (you need it for the combo mentioned in TFA).
It wasn't even mandatory to restart the system: the trick was to use first MagicSysRQ and then issue a "vgareset" (IIRC I couldn't even see what I was typing, but the command was taken into account) and then, miracle: I could unlock frozen X Window sessions (more specifically: kill X, "reset" the GPU and then restart a new X Window session).
Note that very often X is fine: it's just X which is frozen. Heck, if you have another machine on your LAN and allow SSH in, you can SSH and kill X / vgareset without needing MagicSysRQ.
But since quite a few years X is so stable that such hackery ain't needed anymore. Moreover if I recall correctly "vgareset" did only exist for 32 bits system (at least at one point). Nowadays my Linux workstation regularly reaches 6 months of uptime (there are only very rarely know remote root exploits mandating a kernel upgrade) so I've kinda "forgot" how MagicSysRQ works ^ ^
- javanix 13y agoSysrq is kinda neat. You can force a kernel panic by 'echo c > /proc/sysrq' if you really want.
- graylights 13y agoThat is disabled in some distros, it can be toggled via /proc/sys/kernel/sysrq
- arethuza 13y agoWhen I read that I thought of "Stop A" on Sun workstations - and indeed that is mentioned on the wikipedia page: http://en.wikipedia.org/wiki/Magic_SysRq_key http://en.wikipedia.org/wiki/Magic_SysRq_key Mind you I don't think I ever used "Stop A" on a Sun for anything constructive...
- gaius 13y agoI thought Stop-A launched the Forth interpreter ;-)
- matt-attack 13y agoYes, I believe that's true. Stop-A pops you to a prompt (which I believe is all running Forth) where you can do all kinds of cool stuff. It completely suspends the OS. I remember I was once able to TFTP in a custom boot logo at that gets loaded right into the Bios.
- jmj42 13y agoSort of. Stop-A drops you into the firmware prompt (OpenBoot), suspending the OS in the process. OpenBoot, of course implements a forth interpreter shell. Ahh, the good old days... I once implemented a nice little boot device selecting utility in for for some of my Suns. All written in Fourth, and executed by the firmware on every boot.
- arethuza 13y agoActually, I did a lot of RPN development on Suns. Not in Forth but in PostScript within NeWS/OpenWindows developing front ends for large scale Lisp applications.
- mturmon 13y agoAfter stop-A dropped you into the monitor, you could boot into single-user mode with >b -s and then, at the sh prompt, as the single (super) user, edit password # ed /etc/passwd to add in a second root account for yourself. That could be pretty helpful.
- dice 13y ago>Mind you I don't think I ever used "Stop A" on a Sun for anything constructive... Back at the dot-com I worked at, we used to have a SPARCstation 5 that we used for SPARC-II arch builds. It was a nice machine, but it had a dead NVRAM battery so it would lose its configuration every time we lost power in the building (which was a lot, because rolling blackouts used to be a thing in California). Anyway, an interesting quirk about the SPARCstation machines is that the MAC address for the NIC is stored in NVRAM, and when you lose the NVRAM settings it defaults to ff:ff:ff:ff:ff:ff AKA the broadcast address. So by default, on boot, this machine would start sending out DHCP requests and other network traffic with a source address of the broadcast address. The switches we were using did not like that, and would start flooding all of their ports with traffic. The only way we found to fix it was to reboot the switches. So, there is at least one constructive use for "Stop A": you can use it to configure a MAC address on your SS5 so that it doesn't inadvertently bring down the whole network in a massive broadcast storm.
- matt_heimer 13y agoI've also seen one graphical app hang X. If you Ctrl-Alt-F1 and switch to your getty session you can sometimes kill the one app and return to your X session.
- dllthomas 13y agoI remember those days, though ctrl-alt-backspace usually solved things for me.
- jimmaswell 13y agoSlightly off-topic, but was your first language French? The "using since 20 years" seems like something someone with a French background would say.
- michaelmior 13y ago> Note that very often X is fine: it's just X which is frozen You mean "Linux" is fine?