Text mode console on headless KVM connected VPS.
VPS and Dedicated servers quite often come with a method to access their console via some form of Keyboard Video Mouse (KVM) access. This is incredibly useful when you've just firewalled yourself out, or managed to screw the server up the pooch.
Unfortunately, by default, almost every distribution of Linux available at these hosting providers comes with a graphical console either all the way from the start, or mid-way through which takes what should be a fast, clean, easy to read boot process and makes it look "pretty"!
Here's everything that is needed to be done to a Debian 9/Devuan 2 system to kill off a graphical console with extreme prejudice.
- Prevent the console going black
- When the console was a physical screen, this made sense to avoid the login shell text burning into the CRT screen while it was left in a corner for years. Now that they're virtual there is zero point to not always displaying the console.
Remove the blackout timer by adding
consoleblank=0toGRUB_CMDLINE_LINUX_DEFAULTin/etc/default/grub
- Show everything during boot
- With the parameters
quietandsplashset, the boot process is covered by an annoying splash screen, and boot messages are suppressed. That makes trying to see what is going wrong with the boot process quite difficult!Remove both of those parameters from
GRUB_CMDLINE_LINUX_DEFAULT - Boot to console, not X.
- You have X installed on a server??
Uncomment
GRUB_TERMINAL=consolein/etc/default/grub*Might* have to add
texttoGRUB_CMDLINE_LINUX_DEFAULTtoo. - Stop the video mode and font changing
- Even in text mode console, the graphical console sometimes kicks in when the display font is changed. Why do you need a different font on the console? I have no idea.
- Add
text nomodesetto theGRUB_CMDLINE_LINUX_DEFAULT - Edit
/etc/default/console-setupand make sure thatFONTFACE=,FONTFACE=, andVIDEOMODE=are all set to empty strings. - Because that last one sometimes doesn't work, prevent
console-set.shfrom running (in initv).
- Add
Run update-grub if you've made any changes!