4

I just installed Ubuntu 22.04 on my system in a dual-boot configuration. In the past, when I did this with Ubuntu 20.04, a GRUB boot menu would show up at each boot, allowing me to choose which OS to boot. However, this doesn't happen anymore - I am unable to boot any operating system other than Ubuntu 22.04. What happened, and how do I fix it?

ArrayBolt3
  • 7,292

1 Answers1

6

In Ubuntu 22.04, the feature that usually populates the boot menu with all of your operating systems is called os-prober. For security reasons, os-prober was disabled by default in the bootloader included with an early alpha version of Ubuntu 22.04 (GRUB 2.06), which made it so that the other operating systems on your system were not detected. (Source: https://www.gnu.org/software/grub/manual/grub/html_node/Simple-configuration.html#Simple-configuration Search for "os-prober" on the page to find the relevant info.)

To get your other operating systems to show up in the boot menu, you can re-enable os-prober. This will come with some security risks (for instance, if you have a malicious drive plugged into your system, and something like a kernel update causes os-prober to be executed, the malicious drive could try to exploit a security vulnerability in your system), but for many users, it's not that big of a deal, and the benefits outweigh the risks.

To re-enable os-prober, open a terminal with Ctrl+Alt+T, and run sudo nano /etc/default/grub to edit the grub-mkconfig configuration file. You will be asked for a password before the file opens, since you're opening it as a root user. Once the file is open, add GRUB_DISABLE_OS_PROBER=false to the file, press Ctrl+S to save, and Ctrl+X to exit. Finally, run sudo grub-mkconfig -o /boot/grub/grub.cfg to regenerate your GRUB configuration and boot menu, then type exit to leave the root shell. You can now close the terminal, and you should be done!

ArrayBolt3
  • 7,292