Frank Cox
2010-Mar-20 05:18 UTC
[CentOS] how does the bootup screen move the cursor around?
While rebooting my computer after installing the new kernel a few minutes ago, I got to wondering about how the initial bootup screen (after grub, before rhgb) is constructed. The "Loading kernel blah blah blah" lines start at the top of the screen and proceed to scroll down as one would expect. But "kernel alive" shows up at the bottom of the screen and then more write-up is printed above it. My question is, how does that happen? Does it write its own esc codes directly to the screen? If so, how does it know what terminal we're using and, therefore, what esc codes to send? Further into the boot sequence something like ncurses could do the heavy lifting, but I don't think we're that far along yet. -- MELVILLE THEATRE ~ Melville Sask ~ http://www.melvilletheatre.com
Bart Schaefer
2010-Mar-20 16:34 UTC
[CentOS] how does the bootup screen move the cursor around?
On Fri, Mar 19, 2010 at 10:18 PM, Frank Cox <theatre at sasktel.net> wrote:> My question is, how does that happen? ?Does it write its own esc codes > directly to the screen? ?If so, how does it know what terminal we're > using and, therefore, what esc codes to send?Modern "terminals" aren't text-based devices like the ones that used to be connected as serial consoles on old refrigerator-sized "mini-computers" and mainframes. Instead they're effectively framebuffer devices and anything that looks like text-character drawing is done by the display chipset on the graphics card or built into the motherboard. Those in turn all have a common set of minimal operations that can be accessed before the full set of OS-level drivers is loaded and that are supported by all types of monitors, so the boot loader doesn't need to know what specific chipset or monitor you have available as long as the basic hardware is considered supported.