Bug 1624532 - Latest Rawhide grub2 fails to boot on UEFI installs: "cannot allocate kernel parameters"
Summary: Latest Rawhide grub2 fails to boot on UEFI installs: "cannot allocate kernel ...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: grub2
Version: rawhide
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-09-01 01:34 UTC by Adam Williamson
Modified: 2018-09-13 19:09 UTC (History)
15 users (show)

Fixed In Version: grub2-2.02-57.fc29
Clone Of:
Environment:
Last Closed: 2018-09-07 18:43:37 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
grub screen photo (1022.42 KB, image/jpeg)
2018-09-07 03:44 UTC, Mikhail
no flags Details
dnf output (286.29 KB, text/plain)
2018-09-09 15:51 UTC, Mikhail
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1626844 0 unspecified CLOSED grub2-2.02-54.fc29 fails to boot, drops to grub shell 2021-02-22 00:41:40 UTC

Internal Links: 1626844

Description Adam Williamson 2018-09-01 01:34:56 UTC
We finally got a new Rawhide compose today. In it, all x86_64 UEFI installs fail to boot. After selecting an entry in grub, these error messages are displayed:

error: ../../grub-core/loader/i386/efi/linux.c:217:cannot allocate kernel parameters.
error: ../../grub-core/loader/i386/efi/linux.c:94:you need to load the kernel first.

Press any key to continue...

pressing a key returns to the grub menu.

c2f7a5e9af6b58d8e1a6bf0d259820248ceda66a seems like the most likely culprit here.

Comment 1 Adam Williamson 2018-09-01 01:37:28 UTC
Example: https://openqa.fedoraproject.org/tests/272637

Comment 2 Adam Williamson 2018-09-01 01:53:58 UTC
Note, the error isn't visible in the screenshots (as openQA keeps typing, so it doesn't get snapshotted). It's visible briefly in the video, you can catch it if you step through the video frame by frame.

Comment 3 Branko Grubić 2018-09-01 05:15:15 UTC
As I commented in the update FEDORA-2018-2756e3a374 2.02-52 breaks my f29 x86_64 EFI system (on thinkpad x220) I just get a grub commandline, I'm not sure is that the same issue as one found in automated testing. Downgrading to 2.02-51 I can boot again.

Comment 4 Ludovic Hirlimann [:Paul-muadib] 2018-09-02 07:28:54 UTC
Having the same issue on my Thinkpad x1. I can't boot any of the kenrls even the rescue one.

Branko what did you do to downgrade? is there some wiki somewhere I can follow to restore my main machine?

Comment 5 Branko Grubić 2018-09-02 07:59:55 UTC
(In reply to Ludovic Hirlimann [:Paul-muadib] from comment #4)
> Having the same issue on my Thinkpad x1. I can't boot any of the kenrls even
> the rescue one.
> 
> Branko what did you do to downgrade? is there some wiki somewhere I can
> follow to restore my main machine?

The way I did downgrade is, booted fedora live, mounted /, /boot,/boot/efi, also mounted /proc, bind mounted (with --rbind) /sys and /dev, chrooted to my fedora install (I mounted everything under /mnt), and run:
dnf downgrade grub2-common
For me it was easy because I keep old packages with 'keepcache=1' in /etc/dnf/dnf.conf, if you also have everything cached, you could use '-C' dnf option to use all from cache (metadata), not trying to get new one, but that's optional, if you have internet connection in live system, I guess you don't need that.

Comment 6 David Koppelman 2018-09-02 16:50:59 UTC
(In reply to Ludovic Hirlimann [:Paul-muadib] from comment #4)
> Having the same issue on my Thinkpad x1. I can't boot any of the kenrls even
> the rescue one.
> 
> Branko what did you do to downgrade? is there some wiki somewhere I can
> follow to restore my main machine?

Replace grubx64.efi.
See Bug 1624525

Comment 7 Thorsten Leemhuis 2018-09-03 08:10:10 UTC
@adamw: Happens on F29 as well – see Bug 1624525 ; seems to happen to quite a few people, hansdegoede & me among them; should that bug be a F29BetaBlocker?

Comment 8 Hans de Goede 2018-09-03 09:06:07 UTC
This is really the same issue as Bug 1624525 and should probably be closed as a duplicate of that bug.

Comment 9 Hans de Goede 2018-09-03 09:47:42 UTC
Here is a scratch build (still building atm) including the fix for this, it would be great if people can give this a try and confirm that it fixes things.

Note this is an unsigned build, so it will only work if you've secureboot disabled:

https://koji.fedoraproject.org/koji/taskinfo?taskID=29466354

Comment 10 Adam Williamson 2018-09-03 18:35:35 UTC
@thorsten no, because it is not in f29 stable and will not be. It is only in updates-testing (and not there any more, as I unpushed it).

Comment 11 Adam Williamson 2018-09-05 20:04:34 UTC
Hans: the scratch build looks like it fixes the problem. Note I didn't test whether it breaks any *other* boot scenario.

Comment 12 Mikhail 2018-09-07 03:44:25 UTC
Created attachment 1481478 [details]
grub screen photo

Comment 13 Mikhail 2018-09-07 03:51:09 UTC
Adam,
Why broken grub is still not excluded from the updates?Already as seven days as it is known about the problem, and broken grub gets on the LiveCD and shipped with updates !!!

Any idea how fix broken system if no 'keepcache=1' parameter in dnf?

Comment 14 Adam Williamson 2018-09-07 04:09:35 UTC
We can't block it from Rawhide once it's gone out in a compose. We can only untag things before they go out in a compose. We could revert the broken change and bump the version, but I guess I was kinda figuring Peter would fix it quite promptly, seeing as how it breaks the world and all. Hans, do you know when this is going to get fixed?

"Any idea how fix broken system if no 'keepcache=1' parameter in dnf?"

Boot from a live or rescue image, mount the installed system at e.g. /mnt/point (including the ESP at /mnt/point/boot/efi), chroot /mnt/point , downgrade grub2 packages.

Comment 15 Mikhail 2018-09-07 05:04:39 UTC
(In reply to Adam Williamson from comment #14)
> Boot from a live or rescue image
Ok ,first question, where get bootable image?
Latest image from site
https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Workstation/x86_64/iso/Fedora-Workstation-Live-x86_64-Rawhide-20180906.n.0.iso
is also affected by grub issue too.

> downgrade grub2 packages.
Is it possible?
AFAIK from:
(1) https://bugzilla.redhat.com/show_bug.cgi?id=1607077
(2) https://bugzilla.redhat.com/show_bug.cgi?id=1611099 
(3) https://bugzilla.redhat.com/show_bug.cgi?id=1615074
it is impossible because Rawhide repo storing only latest state.

Or it already changed by my propose?

Comment 16 Adam Williamson 2018-09-07 05:10:48 UTC
"Ok ,first question, where get bootable image?"

You can use any image, it doesn't have to be a Rawhide one. F28 stable is fine.

"Is it possible?"

https://koji.fedoraproject.org/koji/buildinfo?buildID=1137570

Comment 17 Valdis Kletnieks 2018-09-07 07:25:24 UTC
(In reply to Mikhail from comment #15)
> (In reply to Adam Williamson from comment #14)
> > Boot from a live or rescue image
> Ok ,first question, where get bootable image?

It's not very picky at all - I used an RHEL 7.0 install disk in rescue mode, it was able to find and mount all 12 of my cryptLUKS  LVM filesystems just fine.  

Get the rescue mode '#' prompt, 'chroot /mnt/sysimage' and go to town - at this point you're running off your production system so can do pretty much anything.  I had 'keepcache=1' so I had a set of old grub2 RPMs on the system, but you can mount a USB memory stick with the images, or wget them (after some ifup commands and etc) or whatever.

Comment 20 Kevin Fenzi 2018-09-07 18:43:37 UTC
I did a build with Han's patch applied for rawhide: 

https://koji.fedoraproject.org/koji/buildinfo?buildID=1142745

and it works here to fix the issue. 

Please do file a new issue, or chime in here if you still are seeing anything...

Comment 21 Vít Ondruch 2018-09-09 11:50:31 UTC
(In reply to Branko Grubić from comment #3)

I experience the same issues, testing with -54 did not help. It might be something different ...

Comment 22 Adam Williamson 2018-09-09 15:47:10 UTC
Vit, Branko, can you file a new bug and perhaps propose it as a blocker? Can you provide details of your hardware or (if you're hitting this with a VM) what virt system you're using? Thanks!

Comment 23 Mikhail 2018-09-09 15:51:06 UTC
Created attachment 1481890 [details]
dnf output

Comment 24 Mikhail 2018-09-09 15:51:52 UTC
Thanks for guide me.
grub was successfully downgraded and system was reanimated.
But during downgrading grub dnf was output a lot of error messages:
RuntimeError: TransactionItem not found for key: grub2-common

(In reply to Mikhail from comment #23)
> Created attachment 1481890 [details]

This is normal?

Comment 25 Adam Williamson 2018-09-09 15:57:10 UTC
no, looks like a dnf bug. I'd file a bug against dnf if I were you.

(I actually found dnf would completely fail to do a downgrade inside a chroot, so I just did rpm -Uvh --force instead...I didn't file this yet as it might've worked if I did dnf --installroot instead of using an actual chroot...)

Comment 26 Branko Grubić 2018-09-09 16:42:22 UTC
(In reply to Adam Williamson from comment #22)
> Vit, Branko, can you file a new bug and perhaps propose it as a blocker? Can
> you provide details of your hardware or (if you're hitting this with a VM)
> what virt system you're using? Thanks!

Created bug #1626844 and proposed it as a blocker (beta (probably it's more like a final blocker)), I wasn't sure about blocker procedure but I found something similar there.

Comment 27 Valdis Kletnieks 2018-09-13 19:09:50 UTC
Confirming fixed.  I pulled down grub2-common-2.02-58.fc30 from koji and it works on my Dell laptop.


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