-
Notifications
You must be signed in to change notification settings - Fork 7
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
Plugin to automatically add UEFI boot entry after kernel stub install #19
Comments
Yes I think this is acceptable, provided it is done in a reliable way. I had been thinking about something like this, but did not get around to writing a proper plugin script to actually do it. A couple of considerations:
|
Thinking about this a bit more. Since we can only delete entries with
These files would contain the hex belonging to the uefi entry for the associated (unified) kernel image. |
I got inspired by grub-mkconfig and want to do it in a as simple way as possible. Currently I'm experimenting with following logic for adding and removing uefi entries:
My idea is to do something similar and for each entry verify that said efi file for that entry exists. If not, delete the entry. Some other ideas I have: If hex number of the entry is for example above 0100 don't touch them. To allow custom entries. In this way, we don't need to store those values anywhere since we will know that entries in a certain range of hex values are created by us. Anything that we would like to include in -u of efibootmgr would be taken from config file, similar how grub handles this. |
Just thinking about this more, the range of hex values of automatically generated entries should probably be something like 0100 - 0200 to not mess with default entries like netboot etc.... |
Hmm, I hadn't thought about it that way. But this could work too, the difficulty we might face with this approach is that we somehow have to reliably parse the output of
I agree, we should definitely define some range for auto-generated entries. However, I tried yesterday to use the Until that is fixed this is not going to work unfortunately. We should also investigate if other tools or operating systems use some predefined range so we don't interfere with that. |
Something else worth looking into is what Fedora is doing, because they seem to be aiming to do something very similar: https://www.phoronix.com/news/Fedora-40-Boot-UKIs-Directly Perhaps we don't have to reinvent the wheel from scratch. |
Good point, absolutely agree with that.
I don't think this is a problem. -I only changes the bootorder not hex num of the entry. I first thought defining it isn't possible but with following it can be specified |
ooooooh, oops, I completely misunderstood the manual. I thought |
Seems very interesting, will have to check how flexible it will be. Gentoo installs tend to be of a more exotic kind from what I've seen so far. But at least it could be a good inspiration, if nothing more
No problem, the manual isn't very straight forward with this functionality. To be fair I stumbled upon it only through trial and error. |
Will create pull request shortly so we can discuss above actual code. |
Closes: projg2/installkernel-gentoo#20 Closes: projg2/installkernel-gentoo#19 Signed-off-by: Andrew Ammerlaan <[email protected]>
Resolved in version 29. Documentation will follow later, short version is:
Let me know if there are any problems. It's stable masked for now because this is still a bit new and experimental. |
Hello,
we would like to ditch bootloaders on our servers and just use plain UEFI direct kernel boot using Kernel as EFI-stub. (Just module-less kernel EFI-stub without using any initramfs)
I would like to create postinstall script similar to
91-grub-mkconfig.install
which would, upon installation of a new kernel, also add corresponding UEFI boot entry using efibootmgr.I would like to know if functionality like this would be acceptable from your side or if there is some explicit reason to not do it this way.
If it would be ok from your side, I will create pull request to add this postinstall script. Otherwise I will keep it in our private overlay.
The text was updated successfully, but these errors were encountered: