This made me remember that one time several years ago when I was wondering if there was any way to change that font and learned there was some sort of service that allowed you to do that in boot time, but the downside was that there was some sort of what it's known at frontend web development as "FOUT" (flash of unstyled text) and you could avoid that by converting your .pcf font to C code and patch it into the kernel code, but at that point I gave up.
Linux
A community for everything relating to the GNU/Linux operating system (except the memes!)
Also, check out:
Original icon base courtesy of lewing@isc.tamu.edu and The GIMP
Thanks! Also I'm always disabling anti alias in my terminal and editor console text, see: https://gitlab.melroy.org/melroy/dotfiles/-/blob/main/home/melroy/.config/fontconfig/fonts.conf?ref_type=heads (I'm using mono fonts)
Shouls fonts be rendered in the kernel?
How else are you going to display anything at boot time?
Boot means initramfs plus kernel. Any other part could do that, doesnt need to run in kernelspace. I dont think the initramfs runs in kernel mode either.
Linux is a big huge thing that is all very highly privileged. It works, very well, but it is kind of a security mess.
initramfs is a compressed filesystem, not an execution context. But it must be possible to print text even before initramfs loads, e.g. to display an error if it fails.
And if you don't have an initramfs?
Found the Gentoo user
Nah I'm just old
The Gentoo user who does not encrypt their boot drive
I use an encrypted rootfs without "an initramfs". Just requires some advanced fuckery.
A little known fun fact is that almost all kernels have a tiny stub-initram built into the kernel file. This is added when initram support is enabled, and is loaded before dedicated files are. It is however possible to supply your own initram directory or archive during kernel build to replace this built-in initram, so you can bake it in without leaving a separate file. No juggling with partitions, no boot options. Works just like a normal kernel "without initram", since even kernels without one usually do have that stub one anyway.
The downside is that a) you have to build the kernel, and b) the files to pack have to be available when the kernel is built, meaning you can't pack in modules of the kernel. But when building your own kernel anyway you can simply set the needed modules for encryption built-in and only pack the userspace cryptsetup executable needed for decryption, that way you get it all in a single kernel build, and the output is a single uniform kernel binary capable of decrypting your boot drive. No flags, no extra files, no access to the esp needed.
(I use gentoo with encrypted root btw.)
Guys you have to see, it is amazing how much deep tech stuff you know, but dont forget you are a crazy niche within a niche and be nice to non-systems programmers XD
The Debian user who lets GRUB handle decryption AND updates (somehow, Debian is weird)
You got a better idea for text mode?
Yes, the kernel doing hardware things and another parts doing rendering for example, interacting with the kernel.
Text mode isnt just the kernel... the first thing that starts after the kernel is the init system.
It's a shame you're getting downvoted since you're actually right, and distros are in the process of moving to "kmscon", a userspace console, rather than the old kernel console (Which iirc isn't actually intended to be a general purpose console, it's meant for boot messages)
That said, the fonts the kernel uses are old style bitmap fonts, extremely limited "attack surface" as they're not doing stuff like opentype/font shaping, it's just setting pixel values directly.
Also excited what RedoxOS creates
I just hope they get some industry funding soon. So many companies use embedded Linux but could really use a microkernel architecture.
Google with WearOS, Chromecast, Home and whatever weird little appliences they make.
A small kernel, dedicated drivers for hardware (that could probably be ported from Linux) and small programs
Good to hear that the kernel fonts are very basic. I guess that makes sense? I find it a bit odd, is the kernel ever the only thing interacting with hardware, with no chance to let a userspace program run that?
He wants pixels instead of fonts I guess. Not the sharpest drawer in the toolbox.
TIL that the font rendering inside the kernel is actually pixels. Not sure what your comment wanted to say.
should the kernel be it’s own mini operating system?