Ask Your Question
3

Dualboot distros on UEFI, grub error can't find linux and initrd

asked 2016-05-19 03:23:39 -0500

jtlinux gravatar image

updated 2016-05-19 21:15:21 -0500

Actually, my first question is if it's possible to dualboot with Ubuntu using grub on a Secure Boot-active machine, or if I need a different booting tool such as rEFInd. I've read here that dualbooting another distro on UEFI with GRUB is especially troublesome.

I've tried to manually boot into a config file that's located on Ubuntu's /boot partition, by taking hints from here, here, and here. Looked at various other places online, but nothing has worked.

When I use the advice in the links above: in Fedora's grub menu, I can select Ubuntu, which takes me to what appears to be Ubuntu's grub menu. But selecting any entry there presents me with the errors "can't find command linux" and "can't find command initrd".

I've tried grub2-mkconfig with os-prober also, but the entries result in the same "can't find linux and initrd" errors.

My Fedora installation works perfectly, and I'm able to boot into Ubuntu using my computer's firmware, so I'm not completely lost. But the firmware option is slow and unattractive.

My system partition scheme:
sda1 /boot/efi
sda2 /boot (Fedora's /boot)
sda3 / (Fedora's root; with LVM-on-LUKS)
sda4 /boot (Ubuntu 16.04's /boot)
sda5 / (Ubuntu 16.04's root)

Example of a /etc/grub.d/40_custom that I'm using:

exec tail -n +3 $0
menuentry "Ubuntu 16.04 (Xenial Xerus)" {
insmod part_gpt
insmod xfs
insmod lvm
set root='hd0,gpt4'
configfile /grub/grub.cfg
}

grub.cfg files:
Fedora /boot/efi/EFI/fedora/grub.cfg
Ubuntu /boot/grub/grub.cfg
Ubuntu /boot/efi/EFI/ubuntu/grub.cfg

If it's possible, I would appreciate any advice or instruction. Turning off Secure Boot is an option, but I'd rather not. Especially since I'm not sure if it's a Secure Boot issue. Virtualization is not an option for me.

edit retag flag offensive close merge delete

Comments

What happens when you select Ubuntu from the Fedora Grub Boot Menu?

jvegas gravatar imagejvegas ( 2016-07-09 13:08:29 -0500 )edit
1

your ubuntu is booting from legacy, not uefi, but your partition is gpt. I did not think such a thing was possible. and your booting grub, not grub2 in the ubuntu. does ubuntu have grub2 installed?

SteveEbey73701 gravatar imageSteveEbey73701 ( 2017-02-20 08:30:14 -0500 )edit

Why do you have two different grub.cfg files in two different locations? If you are booting through efi I would suggest you remove the second Ubuntu /boot/grub/grub.cfg entry in Grub.

jvegas gravatar imagejvegas ( 2017-02-22 15:18:32 -0500 )edit

@steveebey Arch Linux uses that exact method for booting using EFI. /boot/grub/grub.cfg and yes, they do it using Grub2. The directory labeled grub instead of grub2 does not indicate which grub version is in use.

jvegas gravatar imagejvegas ( 2017-02-22 15:20:38 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-08-18 08:42:53 -0500

hedayat gravatar image

I'm a bit late, but anyway:

all you need to do is to replace linux/initrd commands in Ubuntu grub.cfg files (or the config file generated using grub2-mkconfig and os-prober) with linuxefi/initrdefi commands. This was a bug in grub2-mkconfig, but it is probably solved these days. :P

But for using other distro's config files, you might probably still need to modify their configs.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2016-05-19 03:23:39 -0500

Seen: 1,974 times

Last updated: Aug 18 '17