Resetting console on boot

Ian Lepore ian at freebsd.org
Mon Jul 15 21:26:19 UTC 2019


On Mon, 2019-07-15 at 16:29 -0400, Ryan Moeller wrote:
> Hello,
> 
> What do people think about having an early boot stage send some escape
> sequence to reset terminals to some sane default terminal settings? Often
> firmware or other causes will leave an unreadable font color or break line
> feeds, and the terminal tends to stay that way until a shell clears and
> resets the screen. If a shell can do it, surely loader could do it (or even
> earlier, if it is not too complex). To my knowledge it should be just a
> matter of printing some escape codes before starting the normal boot menus
> when using a serial console. I believe this is already done when the
> console is set to vidconsole or efi.
> 
> Thoughts? Suggestions?
> 

Your "sane" is my "who f*cked with my terminal setup?", so it needs to
be optional.  In my experience, the modern lua loader does send a reset
and other control commands, for both serial and video consoles, unless
you set beastie_disable=YES and loader_color=NO in loader.conf.  Before
I discovered the loader_color=NO, I hated that loader would always
reset my serial terminal to white-on-black.

-- Ian



More information about the freebsd-hackers mailing list