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

Shim doesn't respond to boot parameters #688

Open
Amilton78 opened this issue Aug 24, 2024 · 10 comments
Open

Shim doesn't respond to boot parameters #688

Amilton78 opened this issue Aug 24, 2024 · 10 comments

Comments

@Amilton78
Copy link

I'm trying to boot my gentoo system with shim. My boot entry is
Boot0003* Gentoo via Shim HD(1,GPT,c12a7328-f81f-11d2-ba4b-00a0c93ec93b,0x800,0x200000)/File(\EFI\gentoo\shimx64.efi)bzImage.efi and I also tried \EFI\gentoo\bzImage.efi instead of just bzImage.efi, but despite that, it only tries to load the grub executable, which doesn't exist on my system. I'm following the Gentoo wiki and it states for systemd-boot efibootmgr --disk /dev/sda --part 1 --create --label "Systemd-boot via Shim" --loader '\EFI\systemd\shimx64.efi' --unicode '\EFI\systemd\systemd-bootx64.efi', I'm doing the same, just for my kernel

@christoph-at-unicon
Copy link

@Amilton78 What hardware? Did you enable verbosity (mokutil --set-verbosity true) to learn more about what shim tries to boot?

@dennis-tseng99
Copy link
Contributor

it only tries to load the grub executable, which doesn't exist on my system.

If you trace shim.c code, you will find that shim will automatically load grub:

efi_main()
{
    ...
    init_grub(image_handle);
    ....
}

Hope not to misunderstand your problem.

@alexojegu
Copy link

@Amilton78, do you have a Dell board? So it may be related to this: #698

@Amilton78
Copy link
Author

Amilton78 commented Oct 21, 2024

@Amilton78 What hardware? Did you enable verbosity (mokutil --set-verbosity true) to learn more about what shim tries to boot?

I haven't tried that yet. I'll see what it outputs
Edit: Seems like it only tries to load grubx64

@Amilton78
Copy link
Author

it only tries to load the grub executable, which doesn't exist on my system.

If you trace shim.c code, you will find that shim will automatically load grub:

efi_main()
{
    ...
    init_grub(image_handle);
    ....
}

Hope not to misunderstand your problem.

I thought you could specify which binary to boot based on boot parameters

@Amilton78
Copy link
Author

@Amilton78, do you have a Dell board? So it may be related to this: #698

I'm using an Asus AMD board, B550

@alexojegu
Copy link

alexojegu commented Nov 8, 2024

If you want to try, #698 (comment) worked for me.

@pudgyunicorn
Copy link

pudgyunicorn commented Dec 21, 2024

If you want to try, #698 (comment) worked for me.

Per the suggesting from @alexojegu , #698 indeed worked for me. @Amilton78 , you may need to add a terminating character to the unicode argument string. Something like:

--unicode '\EFI\systemd\systemd-bootx64.efi \0'

Edit: To add, I am on a ThinkPad T480. So, not a Dell board. I don't think the board necessarily matters; it's more of a c thing.

@Amilton78
Copy link
Author

@pudgyunicorn I'll try that tomorrow, I'm not on a dell board either, but hopefully this works. Thanks!

@Amilton78
Copy link
Author

@pudgyunicorn sorry for the wait. It actually worked! Should I close this issue now?

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

No branches or pull requests

5 participants