Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Install GRUB 2 & Apply Themes on Ubuntu Linux

· 4 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

GRUB 2 is the default bootloader on Ubuntu. Installing it fresh (or reinstalling it) restores the boot menu if it's missing, and applying a theme changes its look. You'll need a working Ubuntu system and, for themes, a downloaded theme folder. Steps differ slightly by Ubuntu version, but the core commands are the same.

What You'll Need

  • A Ubuntu PC (desktop or server) with an internet connection
  • Root or sudo access
  • A GRUB theme (e.g., from gnome-look.org or GitHub) – optional, for theming
  • For reinstalling GRUB: your Ubuntu installation media (USB/DVD) if the system won't boot

Step-by-Step

  1. Check current GRUB version – Open a terminal (Ctrl+Alt+T) and run grub-install --version. If it shows version 2.x, you're good. If not, install it with sudo apt update && sudo apt install grub2-common grub-pc (for BIOS) or grub-efi-amd64 (for UEFI). Most modern Ubuntu installs already have GRUB 2.
  2. Reinstall GRUB to the disk – This is only needed if the bootloader is broken or missing. First, identify your disk: lsblk – look for the disk (e.g., /dev/sda) not a partition. Then run sudo grub-install /dev/sda (replace sda with your disk). For UEFI systems, run sudo grub-install --target=x86_64-efi --efi-directory=/boot/efi. This writes GRUB to the EFI partition.
  3. Update GRUB configuration – After installing or changing settings, run sudo update-grub. This regenerates /boot/grub/grub.cfg and detects installed operating systems.
  4. Download a theme – Go to a site like gnome-look.org, find a GRUB theme, and download the archive (usually .tar.gz). Extract it: tar -xzf theme.tar.gz in your Downloads folder.
  5. Copy theme to GRUB directory – Create a themes folder if needed: sudo mkdir -p /boot/grub/themes. Then copy the extracted theme folder (the one containing theme.txt) into it: sudo cp -r ~/Downloads/theme-name /boot/grub/themes/. Ensure the folder has a theme.txt inside.
  6. Edit GRUB config to use the theme – Open the config file: sudo nano /etc/default/grub. Add or modify the line: GRUB_THEME="/boot/grub/themes/theme-name/theme.txt". Also, for better visuals, set GRUB_GFXMODE=1920x1080 (or your screen resolution) and GRUB_GFXPAYLOAD_LINUX=keep.
  7. Update GRUB again – Run sudo update-grub to apply the theme settings.
  8. Reboot to see changes – sudo reboot. If the theme doesn't show, check the troubleshooting section below.

Common Mistakes

  • Running grub-install on a partition (e.g., /dev/sda1) instead of the whole disk – this fails on modern systems.
  • Forgetting to run update-grub after changes – without it, nothing updates.
  • Copying the theme folder incorrectly – the theme.txt must be directly inside the folder you point to, not nested deeper.
  • Setting GRUB_GFXMODE to a resolution your monitor doesn't support – GRUB falls back to text, and the theme may not load.
  • Using a theme designed for an older GRUB version – some themes may not work with GRUB 2.06+.

Tips

  • Back up your current /etc/default/grub before editing: sudo cp /etc/default/grub /etc/default/grub.bak.
  • Test a theme without rebooting: run grub-mkconfig -o /boot/grub/grub.cfg and check for errors in the output.
  • If you have multiple disks, ensure you install GRUB to the disk that the BIOS/UEFI boots from (check boot order in firmware).
  • For dual-boot systems, after installing GRUB, run os-prober (usually automatic) to detect Windows or other OSes.

Troubleshooting

GRUB not showing after install – Reboot and press the boot menu key (often F12, Esc, or F2) to select the disk. If the system boots straight to an OS, you may have installed GRUB to the wrong disk. Try the other disk (e.g., /dev/sdb).

Theme not appearing – Check that the path in GRUB_THEME is correct and the theme.txt exists. Run sudo update-grub and look for errors. Also, ensure GRUB_GFXMODE is set to a resolution your monitor supports – try 1024x768 if unsure.

GRUB rescue prompt – This means GRUB can't find its files. Boot from a live USB, mount your root partition (e.g., sudo mount /dev/sda2 /mnt), then chroot: sudo chroot /mnt. Then reinstall GRUB and update. If you're not comfortable with chroot, use the Boot-Repair tool from a live session.

Boot to black screen after theme – The theme's graphics mode may be incompatible. Boot into recovery mode (hold Shift at boot), then edit /etc/default/grub to remove GRUB_THEME and run update-grub.

Windows missing from menu – Install os-prober (sudo apt install os-prober), then run sudo update-grub. If still missing, ensure the Windows partition is mounted or detected.

Frequently Asked Questions

Is GRUB 2 the same as GRUB?

Yes, GRUB 2 is the current version (2.x). Older GRUB 1 is obsolete. Ubuntu has used GRUB 2 since 9.10.

Can I install GRUB without reinstalling Ubuntu?

Yes, you can reinstall GRUB from a live USB or from within Ubuntu using the commands above. It doesn't erase your data.

Do themes affect boot time?

Minimally. A theme adds a few milliseconds to load the graphics, but it's usually imperceptible.

How do I remove a GRUB theme?

Remove the GRUB_THEME line from /etc/default/grub, then run sudo update-grub. You can also delete the theme folder from /boot/grub/themes.

Why does GRUB show a command line instead of a menu?

This happens if the config file is missing or corrupted. Run sudo update-grub from a working Ubuntu install, or reinstall GRUB.

Can I use a theme on a dual-boot with Windows?

Yes, themes work regardless of other OSes. GRUB will still list Windows as a menu entry.