127 points · by dragonbonheur · 2y ago · 55 comments
Linux -> kexec grub -> NTLDR
Windows -> Winkexec[1] grub -> linux kernel
It was extremely fiddly, and the majority of hardware I threw it at really didn't like complying with what I was trying to do, in spite of the fact that it ought to work, at least on paper.
I know Linux works more reliably for some people and less reliably for some others. It probably has much to do what you do with it. What kind of hardware you are running it on, do you just install it and use it as it is or you are the kind of person like me who likes to change everything to his liking.
I also tend to not like to reinstall my machines. For about 15 years my daily driver was a single Debian unstable installation which was continuously updated until I faced too much problems and had to completely replace it. I would have fixed it all but I just did not have the time and I needed it working.
Randomly in my career so far, notable kernel panic causes were:
- when a spark job finishes and deallocates close to a TB of memory, kernel panic. jobs using below 750GB were typically not seeing this happen, so it was something in there. this just kind of stopped happening after we updated the kernel and spark in a semi-unrelated push, so never really got a root cause here.
- bad hardware
- a spark job that was doing simply insane amounts of shuffle output (which goes to disk) was hitting kernel panics which ended up being related to a kernel bug that only impacted ridiculously high-disk-io-using applications, with some additional spin that made me think "ah so this is basically only affecting spark jobs"
- bad hardware
Did I mention bad hardware? I've spent way too much time hunting down "bugs" that ended up just being a bad mobo and linux was kind enough to inform you of it. But "this is the only program that causes the kernel panics!" and yet when we move it to a temp server for a few days the program mysteriously stops crashing. Another reason I do like "the cloud" - I can just cycle out an ec2 box I suspect is bad instead of fighting with the IT guy about whether the 2 year old expensive server is already busted or not.
Meanwhile, the last time I used Windows (in order to install Linux on a new laptop, lol), it blue screened four times just trying to mount a simple USB flash drive.
It's all kinds of "I don't approve of the idea, but I tip my hat to the engineer that came up with it for sheer ingenuity."
Anyone else getting ChatGPT vibes from this conclusion?
What they're doing requires you to have code execution in the kernel. You're not just over the walls at that point, you've beheaded the king.
Personally I would just want a power off that does not make me guess if will cause the raid volumes to need to rebuild.
But since we are in the realm of possibilities and wishlists, Magic SysRq commands for the windows kernel would rank fairly high. [0]
[0] https://www.kernel.org/doc/html/latest/admin-guide/sysrq.htm...
You could run the Cygwin X server on the Windows side, and run X clients on the Linux side. It worked, and it was fast.
I think it required a lot of work whenever a new Linux kernel came out to put the appropriate "yield" code in, so probably maintenance was abandoned?
The last update on the homepage is a decade old. I wonder if it still works? It's all been made obsolete though by WSL, I reckon.
If it could get that far, getting an older DSL distro or similar is probably not that far behind, honestly. Using a BSoD as an environment bootstrap mechanism is hilariously jank, but I've seen worse in my hacking days.
"I am a random 16 year old who likes messing with computers."
Things like this give me hope for the future!
It would be ironic if trying to save the files you were currently working on overwrote your partition table or filesystem superblock(s) so you were no longer able to access any of your files any more.
Though https://github.com/cnlohr/mini-rv32ima is indeed impressively small. Here's the dispatch switch-case: https://github.com/cnlohr/mini-rv32ima/blob/eeeaaa0609558c84...
A game boy emulator doesn't emulate what ever game you play. It emulates the hardware.