After installing Ubuntu 16.04 alongside Debian, I get no boot option for Ubuntu. How can I fix the boot menu?
2 Answers
Based on the question, I suspect "no boot option for Ubuntu" refers to GRUB 2 boot loader that has been installed earlier by Debian, and not the one belongs to Ubuntu.
In related matter, I have a dual boot setup of Debian 8.2 Xfce and Xubuntu 14.04 on my test machine. For my setup, the installations are noted below.
Debian is installed first, then Xubuntu is installed afterwards
Boot loader that is installed to hard disk itself i.e.
/dev/sda
belongs to Debian, which will not detect Xubuntu that was installed afterwardsBoot loader that is installed to its partition i.e.
/dev/sda3
belongs to Xubuntu, which will detect Debian at partition/dev/sda2
, when chainloading from boot loader at/dev/sda
.
Following this, I'd say "no boot option for Ubuntu" occurs because GRUB 2 boot loader in Debian somehow doesn't detect other operating systems that have been installed afterwards. Yet, I didn't manage to reconfigure GRUB 2 configurations in Debian to make detection possible.
Workaround
The workaround is to add new entry manually in /etc/grub.d/40_custom
, then run update-grub
in Debian. Despite shown for Xubuntu, this can adapted similarly for Ubuntu.
menuentry "Chainload to Xubuntu" {
insmod ext2
search --no-floppy --fs-uuid --set <UUID>
chainloader +1
}
<UUID>
is UUID value of the partition that can be checked by running blkid
as root in Debian. Look for the corresponding line that looks like /dev/sda3: UUID="..."
and copy the value without the quotes (your Ubuntu might be installed at different partition).
chainloader +1
will look for bootloader in next partition. Chainloading is more convenient than specifying linux
and initrd
manually, because user doesn't have to edit these lines whenever Ubuntu had updated its kernel release.
Anyway, when the menu is selected, the GRUB 2 boot loader will redirect to another GRUB 2 boot loader that belongs to Xubuntu, which will show boot option for Xubuntu.
Solution found (2016-06-06)
There was no need to reconfigure GRUB 2 configuration at all. The relevant configuration file already exists at /etc/grub.d/30_os-prober
. Unlike Ubuntu and its flavours, Debian by default is missing a package called os-prober
.
Therefore, Debian users will have to manually install os-prober
via APT and re-run update-grub
. Boot options for Ubuntu will be seen on next boot.
See also this answer on Unix SE, which has been posted recently from this date.
chainloader
I would usemultiboot
. It's simpler and can even work when dual booting multiple distributions from the same partition. Something along the lines ofmenuentry 'Ubuntu' { multiboot (hd1,1)/boot/grub/core.img }
could work. – kasperd Jan 12 '19 at 21:20