-
Notifications
You must be signed in to change notification settings - Fork 301
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
Fallback to default loader if parsed one does not exist #393
Conversation
Arguably I have not tested this. Seems to make some sense. Might want to reset load_options to NULL though? I guess I should setup a non-existing second stage loader and then see if it falls back. Maybe here it should sleep like 5s so you see the error message. Though, eek, shouldn't it return "Not found" and not "Invalid parameter". |
caf3323
to
03e1196
Compare
Updated with changes for |
92e355d
to
25f4dcd
Compare
Moved it out of the wrong if, added the msleep and a message, and tested in qemu by running shimx64.efi in efi shell with non-existing second-stage as argument :) |
Also added code to dump the load options in debug mode |
Exception occurred after using patches 393-1 / 393-2 / 399-1 / 399-2. And I got following messages after replacing \EFI\Microsoft\Boot\bootmgfw.efi with shimx64.efi: |
If the specified second stage loader does not exist (invalid parameter), fall back to the DEFAULT_LOADER. This avoids failing the boot on any garbage that made it through the load option parser as a second stage loader name. Bug-Ubuntu: https://bugs.launchpad.net/bugs/1937115
Dump the load options before parsing them so that we can see which things are failing to parse.
2a76130
to
cd610e4
Compare
This is pretty clearly not caused by this change, so I'm going to merge this and let you all discuss that issue in the thread for #399. |
If the specified second stage loader does not exist (invalid
parameter), fall back to the DEFAULT_LOADER. This avoids failing
the boot on any garbage that made it through the load option parser
as a second stage loader name.
Bug-Ubuntu: https://bugs.launchpad.net/bugs/1937115