How can I show all kernels in the Grub2 menu, ie disable submenu ("Previous Linux Versions")?

In the latest Ubuntu (14.04), one can specify:

GRUB_DISABLE_SUBMENU=y

in /etc/default/grub.

Then apply with

sudo update-grub

Deprecated

The answer below applies to Ubuntu versions older than 14.04

gksu gedit /etc/grub.d/10_linux

At the end of the file:

  if [ "$list" ] && ! $in_submenu; then
    echo "submenu \"Previous Linux versions\" {"
    in_submenu=:
  fi
done

if $in_submenu; then
  echo "}"

add the "#" character in front of some lines to disable (i.e. comment out) their effect, make it look like this (4 lines changed):

  if [ "$list" ] && ! $in_submenu; then
    #echo "submenu \"Previous Linux versions\" {"
    in_submenu=:
  fi
done

#if $in_submenu; then
  #echo "}"
#fi

Then run sudo update-grub to apply the changes.


Well, if you don't mind adding a PPA then yes!

Grub Customizer:

Grub Customizer is a graphical interface to configure the grub2/burg settings.It allows you to edit the GRUB2 menu entries: reorder, rename or add/remove entries.

Installation:

sudo add-apt-repository ppa:danielrichter2007/grub-customizer
sudo apt-get update
sudo apt-get install grub-customizer

How to disable Grub2 submenu?

Once installed, Hit Alt+F2, type grub-customizer and hit Enter.

Select the submenu entries one by one and click on (Up) button in toolbar to move them to main menu. enter image description here

And no more submenu! Save your settings by clicking on save button in toolbar. That's it! enter image description here


To remove Grub Customizer run following commands in terminal

sudo apt-get autoremove --purge grub-customizer
sudo add-apt-repository -r ppa:danielrichter2007/grub-customizer
sudo apt-get update

Tags:

Boot

Grub2