Bug 1655254 - Grub fails to boot the system after fedora 29 upgrade on Macbook Pro
Summary: Grub fails to boot the system after fedora 29 upgrade on Macbook Pro
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: grub2
Version: 29
Hardware: x86_64
OS: Linux
unspecified
urgent
Target Milestone: ---
Assignee: Peter Jones
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-12-01 23:29 UTC by Jean-Paul Lambrechts
Modified: 2019-11-27 23:38 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-11-27 23:38:13 UTC
Type: Bug


Attachments (Terms of Use)
rEFInd configuration file (refind_linux.conf) (181 bytes, text/plain)
2018-12-03 02:45 UTC, Jean-Paul Lambrechts
no flags Details

Description Jean-Paul Lambrechts 2018-12-01 23:29:45 UTC
Description of problem: After upgrading a Macbook Pro from Fedora 28 to 29, grub fails to boot the system. The following error message appears twice after selecting any menuentry (fedora 29 or old 28 included kernels):
error:../../grub-core/kern/dl.c:431:symbol `grub_efi_allocate_pages' not found.


Version-Release number of selected component (if applicable): After upgrading this Macbook Pro from fedora 28 to 29, no kernel boots any more. The upgrade completed successfully. The failure happens after rebooting the updated system.
It is still possible to access the disk with a system rescue USB stick: grub.cfg looks normal.


How reproducible: every time


Steps to Reproduce:
1. attempt to boot the computer
2.
3.

Actual results: crash. The computer has become unusable.


Expected results: normal boot


Additional info: Never had such a problem with any previous fedora releases

Comment 1 Jean-Paul Lambrechts 2018-12-03 00:07:13 UTC
I found a way to boot the system by using a rEFInd image on a USB stick. It loads the vmlinuz and initramfs fc29 images. This shows that the system is fine after upgrading from fedora 28 to 29. It pinpoints to a grub2 issue.
I tried to run `grub2-install -v /dev/sda' and it fails after copying:
/boot/grub2/x86_64-efi/core.efi to /boot/efi/EFI/fedora/System/Library/CoreServices/boot.efi with this error:
grub2-install: error: Can't create file: No such file or directory.
Not sure what file that is. I verified that ...core.efi and ...boot.efi do exist and are identical. So, it must be something else but not sure what it is.

Comment 2 Jean-Paul Lambrechts 2018-12-03 02:45:33 UTC
Created attachment 1510778 [details]
rEFInd configuration file (refind_linux.conf)

For those who may experience this bug, I am providing the refind configuration file that I used.
This file (refind_linux.conf) needs to be located in the /boot directory.
The refind boot image can be downloaded from the web. It is refind-flashdrive-0.11.4.img at this time.
When booting with the USB stick, select the "EFI Boot", then "Boot vmlinuz-4...).
Hit F2 and move down to the line with options. Hit return to boot.
Hopefully, this is useful.

Comment 3 Jean-Paul Lambrechts 2018-12-03 02:58:59 UTC
Reading the grub2 documentation, I realized that grub2-install should not be used on a UEFI system. I was able to fix this failure by booting the system with rEFInd and then doing this as root:
dnf reinstall grub2-efi shim
grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg
dnf reinstall grub2-efi
The system boots fine now.

Comment 4 Stefano Romano 2019-01-30 21:20:31 UTC
(In reply to Jean-Paul Lambrechts from comment #2)
> Created attachment 1510778 [details]
> rEFInd configuration file (refind_linux.conf)
> 
> For those who may experience this bug, I am providing the refind
> configuration file that I used.
> This file (refind_linux.conf) needs to be located in the /boot directory.
> The refind boot image can be downloaded from the web. It is
> refind-flashdrive-0.11.4.img at this time.
> When booting with the USB stick, select the "EFI Boot", then "Boot
> vmlinuz-4...).
> Hit F2 and move down to the line with options. Hit return to boot.
> Hopefully, this is useful.

Hi Jean-Paul,
I'm experiencing same issue and I'm using your suggestion to solve this problem, but I'm not able to boot my fed29.
My question on rEFInd_linux.conf:
- How can I find root UUID?
I tried with the ones I have in the pc grup, even all those gave me from rEFInd parted tool.
I have disk partitioned with 3 parts: boot(fat) efi, and LVM with all the rest inside (home, root etc.).

Thanks in advance.

Comment 5 Jean-Paul Lambrechts 2019-02-01 06:07:22 UTC
I used labels. Here is how I did it on a Macboot Air:
Boot with something like SystemRescueCd. Then run "lsblk" to verify what partitions you have.
Then run "blkid" to see if there is a label on your boot partition. If not, do:
- for ext2/3/4 file system: e2label <you_boot_partition> <your_volume_label>
  example: e2label /dev/sda2 macboot                      # this is on a hard disk partition
- for fat/vfat file system: fatlabel /dev/sdb1 bootair    # this is on a USB stick
Run blkid again to verify that the boot partition has a label now.
Then modify your refind.conf to be something like this:

timeout 8
scanfor external,optical,manual
also_scan_dirs +,bootair:EFI/Boot,macboot:EFI/Boot
dont_scan_dirs "Linux HFS+ ESP:/EFI/BOOT","Linux HFS+ ESP:/System"
scan_all_linux_kernels false
menuentry genTOO {
        icon /EFI/refind/icons/os_linux.png
        volume "macboot"
        loader /EFI/Boot/bootx64.efi
        ostype Linux
} 

You may have to change the paths to match your system configuration.
Good luck!

Comment 6 Ben Cotton 2019-11-27 23:38:13 UTC
Fedora 29 changed to end-of-life (EOL) status on 2019-11-26. Fedora 29 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.