Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenLinuxBoot fails to process loader\entries\*.conf of Fedora 41 due to GRUB variables #2440

Open
AlexFullmoon opened this issue Nov 1, 2024 · 5 comments · May be fixed by acidanthera/OpenCorePkg#565
Assignees

Comments

@AlexFullmoon
Copy link

OpenLinuxBoot fails to process loader\entries\*.conf files on Fedora 41 due to Fedora adding some GRUB variables (related to TuneD).

Specifically, in Fedora 40 conf files look like this:

title Fedora Linux (6.11.5-200.fc40.x86_64) 40 (Workstation Edition)
version 6.11.5-200.fc40.x86_64
linux /vmlinuz-6.11.5-200.fc40.x86_64
initrd /initramfs-6.11.5-200.fc40.x86_64.img
options root=UUID=f05a35ff-a897-4f55-ac04-5fcdf6db4dbf ro rootflags=subvol=root rhgb quiet
grub_users $grub_users
grub_arg --unrestricted
grub_class fedora

And in Fedora 41:

title Fedora Linux (6.11.5-300.fc41.x86_64) 41 (Workstation Edition)
version 6.11.5-300.fc41.x86_64
linux /vmlinuz-6.11.5-300.fc41.x86_64
initrd /initramfs-6.11.5-300.fc41.x86_64.img $tuned_initrd
options root=UUID=f05a35ff-a897-4f55-ac04-5fcdf6db4dbf ro rootflags=subvol=root rhgb quiet $tuned_params
grub_users $grub_users
grub_arg --unrestricted
grub_class fedora

Attached boot log, but here's the issue:

01:875 00:002 LNX: Reading 758c1891c87a4d4d947a61d4389e5ed3-6.11.5-300.fc41.x86_64.conf...
01:878 00:002 LNX: /initramfs-6.11.5-300.fc41.x86_64.img $tuned_initrd not found - Not Found
01:879 00:001 LNX: Error processing 758c1891c87a4d4d947a61d4389e5ed3-6.11.5-300.fc41.x86_64.conf - Not Found

Only detected boot option remains rescue mode, which does not have those variables in F41.

This could be circumvented by removing those variables (as suggested here), but that would probably disable some TuneD functionality.

opencore-2024-11-01-070424.txt
If necessary, EFI is here: https://seaf.moonlightwell.ru/f/f34bac86e643485a8ba4/

@mikebeaton
Copy link
Contributor

mikebeaton commented Nov 1, 2024

@AlexFullmoon - Could you send the OpenCore log using macOS XCODE5 Artifacts DEBUG version from this build: https://github.com/acidanthera/OpenCorePkg/actions/runs/11628445836 (you need to be logged in to GitHub, scroll to the bottom of the page, files may take a moment to show). This will add a bit more logging related to these variables.

PS: Am I right that you have set LINUX_BOOT_LOG_VERBOSE using OpenLinuxBoot flags for the debug log you sent, even though that is not shown in the EFI?

@AlexFullmoon
Copy link
Author

Done, here: opencore-2024-11-01-193153.txt

Am I right that you have set LINUX_BOOT_LOG_VERBOSE using OpenLinuxBoot flags for the debug log you sent, even though that is not shown in the EFI?

Oops, yes, my bad. Must've been opened in editor when I copied it. Nothing else changed, I believe, but just in case I'll reupload. https://seaf.moonlightwell.ru/f/1fecb48d0bce42b7a917/

@mikebeaton mikebeaton self-assigned this Nov 3, 2024
@mikebeaton
Copy link
Contributor

mikebeaton commented Nov 4, 2024

I've found this causing problems for another project way back in 2019: error10/kexec-reboot#11

Unlike sd-boot, we already do (partially) extract grub vars since they're quite often used in BootLoaderSpecByDefault files. We support expanding grub variables only for options, so far, it needs adding for initrd.

We will also need to work around this bug (we normally assume that a missing variable is an error condition; I imagine we should initialise these two variables to empty values when they are not present, on some flag which is enabled by default) and we also need to add code to support having multiple initrds in one initrd line (which is not standard, but is what they are doing).

@mikebeaton
Copy link
Contributor

mikebeaton commented Nov 16, 2024

@AlexFullmoon - Could you confirm that the version in macOS XCODE5 Artifacts here works for you https://github.com/acidanthera/OpenCorePkg/actions/runs/11868306241? (Files are at bottom of page and may take a couple of seconds to appear when you visit the page.)

@AlexFullmoon
Copy link
Author

@mikebeaton Yes, it works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

2 participants