Grub Menu Edit

I uninstalled the Zen kernel but it still appears in the startup menu.

How do I edit the menu to remove the listing for the uninstalled kernel?

sudo grub-mkconfig -o /boot/grub/grub.cfg

Result: /etc/default/grub: line 3: GRUB: command not found

Can you post the entire contents of that file?

grub.cfg?

/etc/default/grub
GRUB DISABLE SUBMENU=y
GRUB_DEFAULT=saved
GRUB_SAVEDEFAULT=true
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="EndeavourOS"
GRUB_CMDLINE_LINUX_DEFAULT="quiet loglevel=3 nowatchdog"
GRUB_CMDLINE_LINUX=""

# Preload both GPT and MBR modules so that they are not missed
GRUB_PRELOAD_MODULES="part_gpt part_msdos"

# Uncomment to enable booting from LUKS encrypted devices
#GRUB_ENABLE_CRYPTODISK=y

# Set to 'countdown' or 'hidden' to change timeout behavior,
# press ESC key to display menu.
GRUB_TIMEOUT_STYLE=menu

# Uncomment to use basic console
GRUB_TERMINAL_INPUT=console

# Uncomment to disable graphical terminal
#GRUB_TERMINAL_OUTPUT=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=auto

# Uncomment to allow the kernel use the same resolution used by grub
GRUB_GFXPAYLOAD_LINUX=keep

# Uncomment if you want GRUB to pass to the Linux kernel the old parameter
# format "root=/dev/xxx" instead of "root=/dev/disk/by-uuid/xxx"
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
GRUB_DISABLE_RECOVERY=true

# Uncomment and set to the desired menu colors.  Used by normal and wallpaper
# modes only.  Entries specified as foreground/background.
#GRUB_COLOR_NORMAL="light-blue/black"
#GRUB_COLOR_HIGHLIGHT="light-cyan/blue"

# Uncomment one of them for the gfx desired, a image background or a gfxtheme
#GRUB_BACKGROUND="/path/to/wallpaper"
GRUB_THEME=/boot/grub/themes/EndeavourOS/theme.txt

# Uncomment to get a beep at GRUB start
#GRUB_INIT_TUNE="480 440 1"

# Uncomment to make GRUB remember the last selection. This requires
# setting 'GRUB_DEFAULT=saved' above.
#GRUB_SAVEDEFAULT="true"
GRUB_DISABLE_SUBMENU=y

# To enable usage of os-prober, set GRUB_DISABLE_OS_PROBER to 'false'.
# Note: enabling os-prober creates a potential security risk!
# More info: https://www.gnu.org/software/grub/manual/grub/grub.html
GRUB_DISABLE_OS_PROBER=true

Remove this first line. In addition to being wrong, it is already included further down the file :slight_smile:

Then run again:

sudo grub-mkconfig -o /boot/grub/grub.cfg

Looks like it worked:

Generating grub configuration file ...
Found theme: /boot/grub/themes/EndeavourOS/theme.txt
Found linux image: /boot/vmlinuz-linux
Found initrd image: /boot/intel-ucode.img /boot/initramfs-linux
.img
Found fallback initrd image(s) in /boot:  intel-ucode.img initr
amfs-linux-fallback.img
Found linux image: /boot/vmlinuz-linux
Found initrd image: /boot/intel-ucode.img /boot/initramfs-linux
.img
Found fallback initrd image(s) in /boot:  intel-ucode.img initr
amfs-linux-fallback.img
Warning: os-prober will not be executed to detect other bootabl
e partitions.
Systems on them will not be added to the GRUB boot configuratio
n.
Check GRUB_DISABLE_OS_PROBER documentation entry.
Warning: os-prober will not be executed to detect other bootabl
e partitions.
Systems on them will not be added to the GRUB boot configuratio
n.
Check GRUB_DISABLE_OS_PROBER documentation entry.
done

I’m going to reboot now…

1 Like

The zen kernel option is removed, however, I now have double plain kernel entries.

1 Like

You don’t need to post that again. That is likely an unrelated problem and I am not sure why it is happening since you aren’t using os-prober.

It is best to wait until someone who uses grub more regularly than I do comes around.

Many thanks Dalto.

My apologies, I think I misunderstood how the wiki works.

As always, support for Endeavour OS rocks.

1 Like

there should be two entries for the kernel one default and a second is a fallback entry

Installed grub-customizer - problem solved, easily able to remove grub menu entries.

2 Likes

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.