4

I use Lubuntu 22.04 LTS on my computer, and am testing grub editing.

It seems Lubuntu is using some kind of graphical interface to show grub. enter image description here

Can I disable it to use the same as Ubuntu's default?

Here's is my grub config file : cat /etc/default/grub

# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
#   info -f grub -n 'Simple configuration'

GRUB_DEFAULT="0" GRUB_TIMEOUT_STYLE="hidden" GRUB_TIMEOUT="0" GRUB_DISTRIBUTOR="lsb_release -i -s 2> /dev/null || echo Debian" GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" GRUB_CMDLINE_LINUX="" GRUB_DISABLE_OS_PROBER="false"

Uncomment to enable BadRAM filtering, modify to suit your needs

This works with Linux (no patch required) and with any kernel that obtains

the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)

#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"

Uncomment to disable graphical terminal (grub-pc only)

#GRUB_TERMINAL="console"

The resolution used on graphical terminal

note that you can use only modes which your graphic card supports via VBE

you can see them in real GRUB with the command `vbeinfo'

#GRUB_GFXMODE="640x480"

Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux

#GRUB_DISABLE_LINUX_UUID="true"

Uncomment to disable generation of recovery mode menu entries

#GRUB_DISABLE_RECOVERY="true"

Uncomment to get a beep at grub start

#GRUB_INIT_TUNE="480 440 1"

These are the results of update-grub

Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Sourcing file `/etc/default/grub.d/lubuntu-grub-theme.cfg'
Generating grub configuration file ...
Found theme: /usr/share/grub/themes/lubuntu-grub-theme/theme.txt
Found linux image: /boot/vmlinuz-5.15.0-39-generic
Found initrd image: /boot/initrd.img-5.15.0-39-generic
Found linux image: /boot/vmlinuz-5.15.0-25-generic
Found initrd image: /boot/initrd.img-5.15.0-25-generic
Memtest86+ needs a 16-bit boot, that is not available on EFI, exiting
Warning: os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot entries.
Found Windows Boot Manager on /dev/sda4@/efi/Microsoft/Boot/bootmgfw.efi
Adding boot menu entry for UEFI Firmware Settings ...
done

I can see it pointing thos two files: `/etc/default/grub.d/lubuntu-grub-theme.cfg' /usr/share/grub/themes/lubuntu-grub-theme/theme.txt

Should the solution be to delete the /usr/share/grub/themes/lubuntu-grub-theme/theme.txt so it doesn't load it ? Will this work ?

  • 1
    You haven't provided release details; but you could just remove the Lubuntu theme for your unstated release. FYI: The Lubuntu theme only shows if your hardware is capable of showing it; if booted on other hardware (where it can't show) it's identical to Ubuntu's anyway. (fyi: theme used by lubuntu is found in package lubuntu-grub-theme) – guiverc Jun 16 '22 at 22:46
  • @mook765 my comment was made ~11 hours ago, yet the 22.04 was only added 8 hours ago... I left the comment alone (ie. didn't delete it) as it's referred to in the OP's answer – guiverc Jun 17 '22 at 10:23

3 Answers3

5

The appearance of grub is managed by /etc/grub.d/05_debian_theme. Remove the executable bit from this file with sudo chmod -x /etc/grub.d/05_debian_theme

Create the file /etc/grub.d/04_set-colors with the following content:

#!/bin/sh
set -e

Set the colors of the boot-menu. Available colors are

black

blue

green

cyan

red

magenta

brown

light-gray

dark-gray

light-blue

light-green

light-cyan

light-red

light-magenta

yellow

white

echo "${1}set menu_color_normal=white/black" echo "${1}set menu_color_highlight=black/light-gray"

Make the file executable with sudo chmod +x /etc/grub.d/04_set-colors

Finally run sudo update-grub.

This will give you a very basic grub menu with black background and text- and hilight-colors of your choice.

You can easily undo the changes by removing the newly created file /etc/grub.d/04_set-colors, giving the executable bit back to /etc/grub.d/05_debian_theme and, of course, running sudo update-grub again.

mook765
  • 15,925
  • I like the idea of editing this configuration, but I need to master editing the grub itself first. My question was rather to disable it as to edit it. Thanks for the suggestion @mook765 –  Jun 17 '22 at 02:15
3

Solution:

I've been able to remove the theme by removing the packet with:

apt purge lubuntu-grub-theme.

I had to update-grub, otherwise I got this a message before the grub menu:

/usr/share/grub/themes/lubuntu-grub-theme/theme.txt not found

I confirm the answer from @guiverc and I added the release version like he/she suggested.

  • 1
    Well done for solving it... I didn't actually provide an answer, just my thoughts (via quick comment). I personally like Lubuntu's theme (on boxes where it shows) and would have likely replaced it with another, update-initramfs & update-grub etc or done as @mook765 suggested... but well done for achieving what you wanted, and thanks for sharing it so as to benefit others too. – guiverc Jun 17 '22 at 02:49
  • 1
    Also be aware you've potentially left a minefield for yourself; so don't trip over it later. ie. https://packages.ubuntu.com/jammy/lubuntu-desktop shows a depends rule on lubuntu-grub-theme , so leaving it installed & just using another theme OR using no-theme makes more sense to me (fewer minefields the better for release-upgrade time, or should you need disk space into the future etc) – guiverc Jun 17 '22 at 03:08
  • I'm using Cinnamon desktop. So I presume there are no worries about Lubuntu itself. It's just a better base to me for Cinnamon as the standard Ubuntu, that gives me trouble with the networking and Bluetooth applets, and some icon packs on Cinnamon. I could resolve them, but very inconvenient on every reinstall. What's not the case with Lubuntu, or Ubuntu Mate as a base. Lubuntu was faster to install, so there's is my choice. @guiverc –  Jun 17 '22 at 03:51
  • I like the theme too. But when I'll have to learn how the grub works, it makes it just more complicate to me with these theme settings. So I leave it without for the time I need to master the basic grub options. We'll see later for the theme. @guiverc –  Jun 17 '22 at 03:56
  • I would like you to look to the results of my testing of the grub here: https://askubuntu.com/questions/1413776/make-grub-boot-entry-to-load-dd-recovery-menu Because I have an issue with an entry that creates a double. I tough the theme could cause it, but it's not. @guiverc –  Jun 17 '22 at 03:58
1

Recently I have been dealing with this. I am running 22.04.3 LTS. I found that all you need to do is comment out the line in /etc/default/grub.d/lubuntu-grub-theme.cfg then run sudo update-grub and reboot.

The following commands will comment out all the lines in the /etc/default/grub.d/lubuntu-grub-theme.cfg, then update the grub.

sudo sed -i 's/^/# /' /etc/default/grub.d/lubuntu-grub-theme.cfg
sudo update-grub
reboot
Terrance
  • 41,612
  • 7
  • 124
  • 183