0

i did some edit on Ubuntu 24.10 following this question and this question

I edited grub with sudo nano /etc/default/grub following by the command sudo update-grub

The edit was:

GRUB_DEFAULT=saved
GRUB_SAVEDEFAULT=true
GRUB_TIMEOUT_STYLE=hidden
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR=`( . /etc/os-release; echo ${NAME:-Ubuntu} ) 2>/dev/null || ec>
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""

After I rebooted the system the boot menu or grub menu didn't appear and it went straight to Ubuntu 24.10. Now I cannot log in to my other operating system. I don't know what I did wrong. What can I do so that the grub boot menu appears again from which I can choose the operating system that I want to use?

karel
  • 122,292
  • 133
  • 301
  • 332

1 Answers1

1

The issue with the grub file is caused by a truncated line. This line is cut off after ec> which should be echo Ubuntu`

The correct line should be:

GRUB_DISTRIBUTOR=`( . /etc/os-release; echo ${NAME:-Ubuntu} ) 2>/dev/null || echo Ubuntu`

Note the pair of matching ` characters after GRUB_DISTRIBUTOR

The line the says GRUB_TIMEOUT_STYLE=hidden hides the GRUB boot menu entirely and only shows it if the user presses a key during boot. Change this line to GRUB_TIMEOUT_STYLE=menu.

After editing /etc/default/grub run sudo update-grub to regenerate the GRUB configuration.

karel
  • 122,292
  • 133
  • 301
  • 332