92
this post was submitted on 07 Nov 2023
92 points (97.9% liked)
Linux
48208 readers
1640 users here now
From Wikipedia, the free encyclopedia
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.
Rules
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
- No misinformation
- No NSFW content
- No hate speech, bigotry, etc
Related Communities
Community icon by Alpár-Etele Méder, licensed under CC BY 3.0
founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
When would this be triggered? Could it be used during kennel panics?
No, kernel immediately stops execution of all normal processes once it gets into a kernel panic, and there's no way for processes to hook into this functionality. It is intended to be the emergency stop state when the kernel realizes it doesn't know what's going on and it would be dangerous to continue executing. So it does the bare minimum to report the issue and then stops even its own execution.
There's also a softer variant of the kernel panic called kernel oops that should let the user choose to continue if they think the risk of data corruption doesn't outweigh losing all data currently in memory. But just like the kernel panic, it is handled completely inside the kernel and userspace is frozen until the user chooses to continue.
This is intended for situations where systemd runs into an unrecoverable issue while booting (for example you have misconfigured fstab and a required disk is missing). Without this, you just get thrown into the terminal with some error messages that might not make much sense to you if you don't have a decent understanding of Linux. Now, you get a more newbie friendly message and a QR code that should bring you somewhere you can learn more about possible causes and troubleshooting steps.
Yeah, that makes sense. So it's for the situations where you end up in an emergency shell.
Some better presentation of kernel panic would be nice (which I think is the closest equivalent to a Windows BSoD), but I guess it would require kernel support.