I bought a new ‘distro testing’ laptop in the Black Friday sale last month (don’t get carried away, it cost me £200 and a lot of headaches) but when I installed Ubuntu 22.04 on it this weekend I instantly hit a snag.
See, normally when I install Ubuntu alongside Windows as a dual-boot system Ubuntu installs the GRUB boot loader and then populates the boot loader with entries for all other operating systems (such as Windows, or technically the Windows boot manager) to it.
This makes it easy to pick which OS I want to boot into each time I start my laptop up — which is great, and what I’ve come to expect.
Except: that no longer happens when installing Ubuntu 22.04 LTS.
Instead, once I’d installed the Jammy Jellyfish and rebooted I was only able to boot Ubuntu. To boot into Windows I had to use my laptop’s build-in boot manager. A well-timed push of the F10 key during boot isn’t exactly hard, but it’s more effort than this used to require.
So what’s going on?
OS Prober is Disabled in GRUB
Installing Ubuntu 22.04 gave me a GRUB menu without a Windows boot manager option in it.
This threw me. I expected one. And I wanted one.
Was this a quirk of Windows 11? Was I supposed to have used the advanced partition manager to install Ubuntu 22.04 and manually edit the boot partition it creates to enable a specific options? Or was this a sign that the universe hates me?!
Eh, none of those (thankfully in the case of the latter).
Turns out there’s been a major change to the way GRUB works in Ubuntu 22.04.
Regular omg! commenter OstroLK mentioned the issue (and a solution) in the comment section to another article. If I hadn’t have seen their comment then chances are I’d be mashing that F10 key instead of writing this post!
Ostro writes: “If you are multi-booting with other Linuxes and Windows, you might find a problem, when you update/upgrade Ubuntu (maybe with other Linuxes too) sometime now, it’d stop “seeing” other distros and Windows.”
Exactly my issue.
The cause?
The OS_prober feature is disabled by default in GRUB 2.06, which is the version Ubuntu 22.04 LTS ships with. Not a bug; it’s an upstream change designed to address possible security issues with the OS-detecting feature (it mounts partitions to ‘probe’ other OSes which could be taken advantage of, etc).
So, for the moment, Ubuntu 22.04 (though more accurately GRUB in Ubuntu 22.04) does not detect other operating systems at all, be it during or after install.
Ubuntu’s Julian Andres Klode acknowledges that this is “…a bit controversial and the outcome is not necessarily in the best interest of our users”.
One workaround (for now) is to add GRUB_DISABLE_OS_PROBER=false to /etc/default/grub like so:
Hit save then run sudo update-grub to let it do its thing.
Finally, reboot and et voila: a GRUB menu with stuff in it:
Another more graceful solution (mentioned in the comments after this post was published) is to simply run sudo os-prober from the terminal instead. This should do the necessary work but will need to be manually re-run if you install/adjust other OSes on your device.
Admittedly disabling the disabling of OS prober isn’t the best fix given the aforementioned security concerns that have resulted in it.
Conversely, not having a GRUB boot menu with links to boot other installed OSes is a major downgrade from past behaviour and muddles the whole “switch to Linux; you can even dual boot with Windows to use that game/app you need” lure.
It’s a tough situation.
Ubuntu’s devs are mulling whether to re-enable os-prober; to only run os-prober once during install time (as other Linux distros do); or create a brand new GRUB module to go “…through the UEFI boot options and creates a submenu, then sets BootNext and resets the machine when you select an item”.
There’s no easy option, so it’ll be interesting to see how this plays out in future releases. Being able to create a functional dual-boot is a big deal for both existing and prospective users.
In the mean time, if you install Ubuntu and find yourself lacking a few OS entires in your GRUB menu I hope this little tip is as much of a help to you as it was to me!
Thanks Ostro
