Updated: 16 November 2026 · Applies to: GRUB 2 on AlmaLinux and Rocky Linux 9 (GRUB 2.06), Ubuntu 24.04 (GRUB 2.12) and Debian; GRUB Legacy on very old releases such as CentOS 6

If GRUB adds random characters to the kernel line when you press e to edit a boot entry, or the menu looks garbled on a VNC, IPMI or serial console, make GRUB use a plain text terminal. On GRUB 2 (every current Linux release) set GRUB_TERMINAL=console in /etc/default/grub and rebuild the menu. On the old GRUB Legacy (/boot/grub/grub.conf), comment out the splashimage line.

You need a console that works before the network starts: on a Ucartz VPS that is the VNC console (see How to Access Your VPS via VNC in Virtualizor), on a dedicated server the IPMI console.

Which GRUB do you have?

  • GRUB 2: settings in /etc/default/grub, generated menu in /boot/grub2/grub.cfg (AlmaLinux, Rocky Linux, RHEL) or /boot/grub/grub.cfg (Ubuntu, Debian). This is what every supported release uses.
  • GRUB Legacy: a hand-edited /boot/grub/grub.conf or menu.lst. Only very old systems such as CentOS 6 use it, and they no longer get security updates.

Check the version from the shell:

grub2-mkconfig --version

On Ubuntu and Debian the command is grub-mkconfig --version. On AlmaLinux 9.8 it printed:

grub2-mkconfig (GRUB) 2.06

Fix on GRUB 2: switch to the text terminal

According to the GRUB manual, GRUB_TERMINAL_OUTPUT chooses where GRUB draws its menu (for example console for the native text console, serial, or gfxterm for graphics mode), and GRUB_TERMINAL sets input and output to the same value. A graphical terminal that does not suit the console you are using is a common reason for unreadable text.

  1. Make a copy of the settings file first:
    cp -a /etc/default/grub /etc/default/grub.bak
  2. Open /etc/default/grub and add (or uncomment) this line. Ubuntu ships it commented out, with the note "Uncomment to disable graphical terminal":
    GRUB_TERMINAL=console
  3. If a line such as GRUB_TERMINAL_OUTPUT="gfxterm" is present, remove it or change it to console, so the two settings do not disagree.
  4. Rebuild the menu. On AlmaLinux, Rocky Linux and RHEL 9 and 10:
    grub2-mkconfig -o /boot/grub2/grub.cfg
    On Ubuntu and Debian:
    update-grub
  5. Reboot, open the console, select the entry and press e again. The text should now be clean.

You only need to rebuild the menu after changing terminal settings. Day-to-day kernel arguments are better changed with grubby, as shown in How to Change the Kernel Command Line Permanently (grubby and GRUB).

Text is fine in GRUB but garbled once Linux starts

If GRUB itself looks right and the mess starts when the kernel begins to boot, try making the kernel start in text mode. According to the GRUB manual, this line forces Linux to boot in normal text mode:

GRUB_GFXPAYLOAD_LINUX=text

Add it to /etc/default/grub and rebuild the menu with the command for your system above.

Using a serial console

On a serial console, garbage characters usually mean the speed GRUB uses does not match the speed of your console client. According to the GRUB manual, the serial speed defaults to 9600 unless you set it. To use 115200 on the first serial port, for example:

GRUB_TERMINAL="console serial"
GRUB_SERIAL_COMMAND="serial --unit=0 --speed=115200"

Set your console client to the same speed, rebuild the menu and reboot.

Old servers with GRUB Legacy

On GRUB Legacy, the problem was usually linked to the boot splash image. Open /boot/grub/grub.conf and put a # in front of the splashimage line, for example:

#splashimage=(hd0,0)/grub/splash.xpm.gz

GRUB Legacy reads that file at boot, so no rebuild is needed. A system this old should be moved to a supported release, because it no longer receives fixes.

If the server no longer boots

Restore your copy of /etc/default/grub from a rescue shell and rebuild the menu. The rescue steps are in GRUB Rescue Commands and How to Fix Linux Boot Failures, and every GRUB file is explained in GRUB2 Configuration Files Explained (grub.cfg, BLS Entries and grubby). To change the default boot entry, see How to Edit the GRUB Boot Menu and Change the Default Entry.

Official documentation: GNU GRUB manual.

Related services

KVM VPS hosting

NVMe SSD and full root access, with Free Basic Managed Support.

Unmanaged dedicated servers

full root access and free IPMI KVM, with Free Basic Managed Support.

Managed dedicated servers

our engineers look after the server for you, from $135 a month.

Was this answer helpful?

Still stuck? Open a ticket