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?

1
  • Please, edit your question and add the output of grub-install -V to get the version of grub and sudo update-grub to know if it finds OS to boot May 24, 2022 at 19:32

1 Answer 1

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!

4
  • 1
    better to run each command that needs root with sudo, rather than running a shell as root. It's somewhat harder to by mistake mess something up that way.
    – Esther
    May 24, 2022 at 20:37
  • @Esther Not a bad idea, I'll edit my answer.
    – ArrayBolt3
    May 24, 2022 at 23:25
  • 2
    Instead of grub-mkconfig -o /boot/grub/grub.cfg you can simply run sudo update-grub
    – mchid
    Aug 12, 2022 at 2:12
  • If it does not help, have a look at this: techrepublic.com/article/…
    – Manuzziman
    Dec 12, 2023 at 6:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .