The problem of grub not showing the default grub menu is because it can't read your grub.cfg file in your EFI System Partition. EFI System Partition is tagged as its name in the partition list.
This command is used to list the disk using bash:
sudo fdisk -lexample output:
Device Start End Sectors Size Type
/dev/sda1 2048 1187839 1185792 579M Microsoft basic data
/dev/sda2 1187903 1802239 614337 300M EFI System
...
EFI System Partition is the partition marked with EFI System type. On the example output above, it is /dev/sda2.
Mount the partition to /boot/efi directory, so you can do grub-install. The command need to find the EFI directory which is your mounted EFI System's partition.
sudo mount /dev/sda2 /boot/efiIn my case, I'm using KDE Neon which is based ubuntu LTS. The OS created a folder named neon in my EFI System partition (.../EFI or /boot/efi/EFI/) that contains files needed to start KDE Neon Grub in /boot/grub directory.
Here is the flow how the UEFI load the Grub Menu:
- The system start the efivar boot (
neon GNU Linux) registered in your system EFI menuentry. - Then it start the
grubx64.efi(.../EFI/your-distribution/grubx64.efi). - The file executed and then read
grub.cfgfile (.../EFI/your-distribution/grub.cfg). - Normally after that the grub will start the menu installed in my root directory (
/boot/grub), But it doesn't.
I have tried to reinstall the grub by doing:
- Uninstall all grub packages from my linux
- Reinstall the grub package (
sudo apt install grub-efi) - install the grub to my EFI (
sudo grub-install). - update the grub (
sudo update-grub).
It doesn't read the GRUB's menu inside /boot/grub because the .../EFI/your-distribution/grubx64.efi misread the location of your .../EFI/your-distribution/grub.cfg.
In my case, the .../EFI/neon/grubx64.efi (because I'm using KDE Neon) doesn't read .../EFI/neon/grub.cfg instead it searches for the grub.cfg file in .../EFI/ubuntu/grub.cfg. I should move .../EFI/neon/grub.cfg into .../EFI/ubuntu/grub.cfg to fix it.
sudo mv /boot/efi/EFI/neon/grub.cfg /boot/efi/EFI/ubuntu/grub.cfgThere is other people who also experienced this. https://unix.stackexchange.com/questions/615109/wrong-grub-prefix-efi-grub-install-and-update-grub-doesnt-fix-it
- install the package
sudo apt install grub-efiNormally if you install
grub-efi,grub-efi-amd64will be included in the installation process.
or
sudo apt install grub-efi-amd64sudo grub-installsudo update-grub
For me, in KDE Neon, the command
sudo grub-install --bootloader-id=ubuntuhelpedIn this way, no need to copy/link/etc any files