1

(I no longer have this setup so I cannot test new answers, sorry. I had to switch computers and am now only using arch; I am leaving the question as it is though since I'd love to know a solution if it occurs again, grub has been very hostile towards me these past few months) I have fedora 23 as my main OS with custom partitioning (all physical partitions) /boot/efi=/dev/sda1 root=/dev/sda3. Then on /dev/Sda2 I just set up an LVM physical partition, and created an LVM group (arch) and volume (root) and then I installed Arch Linux (without bootloader) on /dev/arch/root

I have /dev/sda (GPT), /dev/sdb (GPT) then grub also seems to detect a hd2 and gives errors about being unable to load it (I assume this is the LVM physical partition) anyhow, I use os-prober and grub2-mkconfig to detect my arch installation, which it successfully does (and does so two times, I get two menu entries for it); but when I try to boot it I get the following errors:

error: failure reading sector 0x0fc from 'hd2'.
error: failure reading sector 0x0e0 from 'hd2'.
error: failure reading sector 0x0 from 'hd2'.
error: can't find command 'linux'.
error: can't find command 'initrd'.

I only get the sector reading errors on the first boot attempt (for the record, fsck reports the drive to be clean) any retries only give me the can't find command errors. This is the grub.conf menuentry:

### BEGIN /etc/grub.d/30_os-prober ###
menuentry 'Arch (on /dev/mapper/arch-Root)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-38305dfb-279b-4490-948b-480b81fef81f' {
    insmod part_gpt
    insmod lvm
    insmod ext2
    set root='lvmid/6ZmQFy-ijXr-mYra-3Gp9-l0dh-J4Wi-GSHXhd/WGN2VN-t34t-rYWi-kvje-2BfF-WoD4-4NinnP'
    if [ x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root --hint='lvmid/6ZmQFy-ijXr-mYra-3Gp9-l0dh-J4Wi-GSHXhd/WGN2VN-t34t-rYWi-kvje-2BfF-WoD4-4NinnP'  38305dfb-279b-4490-948b-480b81fef81f
    else
      search --no-floppy --fs-uuid --set=root 38305dfb-279b-4490-948b-480b81fef81f
    fi
    linux /boot/vmlinuz-linux root=UUID=38305dfb-279b-4490-948b-480b81fef81f rw quiet
    initrd /boot/initramfs-linux.img
}

Anyone got any ideas how to fix this? Any solution that will allow me to boot into arch (besides reinstalling the bootloader from arch instead of fedora) will be fine; I don't mind getting my hands dirty editing the grub.cfg file by hand.

3
  • Having the same problem with antergos Commented May 8, 2016 at 0:13
  • Have you tried adding GRUB_USE_LINUXEFI=true to your /etc/default/grub (see forums.opensuse.org/showthread.php/…)? This didn't work for me but I thought I'd suggest it. Commented May 8, 2016 at 0:14
  • Also, if you manually edit the last two lines to be linuxefi /boot/vm.... and initrdefi /boot/init... it will at least find the commands but I'm still having problems. Commented May 8, 2016 at 0:16

3 Answers 3

0

I had installed Debian without LVM partitioning and next to that I installed Fedora which installed with LVM when using the guided partitioning on the remaining disk space. Since debian installed without LVM it couldn't read the fedora partitions to add a grub entry for it when running grub2-mkconfig. What worked for me was installing the lvm2 package on Debian and running update-grub.

0

You indicated you have /boot/efi in Fedora, so you are booting in UEFI style. You might be hitting a Secure Boot issue.

Most Secure Boot-compatible distributions boot using first a shimx64.efi which will add the distribution's certificate to the Secure Boot whitelist for the current boot attempt only. The shim is signed by Microsoft using their "third-party UEFI bootloaders" certificate, so it will be accepted by most Secure Boot-enabled systems. The shim can also optionally load a second, custom key, called a Machine Owner's Key or MOK for short.

Then the shim will load a grubx64.efi which is signed with the distribution's Secure Boot certificate. This allows the distribution to update GRUB without going through Microsoft for the bootloader signing process again.

In order to be Secure Boot-compliant, any bootloader must also enforce the signature requirement for kernel-level code. That means, after the shimx64.efi is successfully loaded, the system will accept OS kernels that are signed by whatever the firmware is configured to accept, plus anything signed by the distribution that provided the shim. If the MOK has been configured, anything signed by it is good too.

Now you should be able to see the problem: the Arch kernel is definitely not signed by Fedora (it's either signed by Arch or not signed at all). As a result, Secure Boot must block the boot attempt. Some system firmwares will display a Secure Boot error message when attempting to boot a kernel without an acceptable signature; others will pretend that the offending kernel simply doesn't exist, and will eventually move on to try the next possible boot target (if any).

So, when having multiple Linux distributions in a Secure Boot-enabled system, you would have to choose one OS to manage your primary bootloader, set up a MOK with it, and then sign the kernels of any other Linux distributions yourself with that MOK. A simpler alternative might be to just disable Secure Boot.

1
  • I'm pretty sure I had secure boot off. I never leave that worthless feature enabled, haven't since it was introduced. Commented 12 hours ago
-1

You said you installed Arch without a bootloader. The errors you posted hint that there is no valid boot sector at all. IIWY I'd install Arch Linux, then install Fedora 23. The fedors installer will overwrite the boot sector with it's grub, and worst case, you can use a custom grub entry to chainload Arch.

I'm pretty far from being a grub expert, but I did just get my laptop booting Windows 7, Solaris 11, CentOS 7, and Ubuntu 14.04 :-D I had to do some tapdancing!

1
  • Reinstalling fedora is way too much pain, and even if it wasn't, what you're suggesting should be doable with a simple grub2-install command as far as I'm aware. If you think I can make a custom grub entry to chainload arch then please detail how and I will try. Commented Mar 8, 2016 at 17:27

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.