Talk:EFI stub

From Gentoo Wiki
(Redirected from Talk:EFI Stub)
Jump to:navigation Jump to:search
This is a Talk page - please see the documentation about using talk pages. Add newer comments below older ones, sign comments using four tildes (~~~~), and indent successive comments with colons (:). Add new sections at the bottom of the page, under a heading (== ==). Please remember to mark sections as "open for discussion" using {{talk|open}}, so they will show up in the list of open discussions.


Talk status
This discussion is done as of June 5, 2017.

In fact, this is neither true nor false. UEFI does not support loading an initramfs. But UEFI does not load the kernel, it loads EFISTUB - which happens to be the same binary file as the kernel. EFISTUB takes the argument initrd=\foo\bar\initrd.gz, which should be self-explaining. --Qsuscs (talk) 16:43, 21 October 2013 (UTC)

I agree with the above. I am also wondering if the statement: "This parameter cannot be built into CONFIG_CMDLINE as outlined above." is actually true. I see no reason why this should be so, and I can't find any mention of this in other sources. Will fix once I get around to testing it. --Jepio (talk) 18:54, 7 July 2015 (UTC)
Finally managed to test that claim, and indeed, initrd can not be hardcoded into CONFIG_CMDLINE. By the time the kernel comes around to reading that the variable the EFI stub has already done it's job and can not provide the initrd anymore. However efibootmgr works great, can supply the initrd parameter to the EFI stub and allows the usage of UEFI without an intermediate boot loader for lowest boot delay. Highly recommend it to everyone. --Jepio (talk) 21:39, 6 August 2015 (UTC)
Jepio, I appreciate that you did this research and then took the time to type up your findings here for the benefit of everyone. If there is anything else that does not line up in the main article please make corrections as needed. Thanks again! --Maffblaster (talk) 21:49, 6 August 2015 (UTC)
I think, this needs to be clarified a bit more - the EFI stub can load an initramfs image, but not using the built-in kernel command line - it has to know what to load as a the initramfs before it starts the kernel. I'll try to rephrase the notice you addeed. --Jepio (talk) 11:37, 7 August 2015 (UTC)
Sounds good. Thank you, sir! Closing this discussion. --Maffblaster (talk) 21:00, 5 June 2017 (UTC)

Move "Initramfs" section out to its own article

Talk status
This discussion is done as of August 30, 2017.

Most stuff in the (before I started reworking the other sections) original section Initramfs seems not really specific to this article. It'd better be moved to the Initramfs article only leaving first tree lines of the present version of that section.
Any objections?
--Charles17 (talk) 09:15, 6 June 2017 (UTC)

Meanwhile this section has been almost completely rewritten and duplicate infos removed. So marking this ad "done".--Charles17 (talk) 12:12, 30 August 2017 (UTC)

Replace "make install"?

Talk status
This discussion is done.

I am thinking of replacing

Run the install command:

root #make install
 sh ./arch/x86/boot/ 4.9.16-gentoo arch/x86/boot/bzImage \ "/boot"


root #find . -type f -name bzImage -exec cp {} /boot/EFI/Gentoo/ \;

But I am not sure if it doesn't look too complicated esp. for Linux newbies. --Charles17 (talk) 18:36, 19 June 2017 (UTC)

Yeah, go for it! The current installation phase is _really_ not optimal. The resulting kernel binary to be booted should be named simply without version numbering. I use gentoo.efi. This way, efibootmgr doesn't have to be used every time the user updates his kernel to a new version. Fcl (talk) 14:14, 30 August 2017 (UTC)
That's fine with be as well. Don't forget to close the discussion when you make the change. --Maffblaster (talk) 19:38, 10 September 2017 (UTC)
Change done. But without find -exec voodoo.--Charles17 (talk) 07:40, 11 September 2017 (UTC)

efivarfs mounted ro by default in >= sys-apps/openrc-0.28

Talk status
This discussion is done as of September 30, 2017.

Hi, the 'Installation' section talks about using efibootmgr, but efivarfs is now mounted read-only by default on OpenRC (>= 0.28) so this command will fail (unless the filesystem is at least temporarily remounted rw beforehand). Doesn't affect systemd at the moment. Please see my notes here. --Sakaki (talk) 09:56, 30 September 2017 (UTC)

It's described in the efibootmgr article, so needs not be mentioned here again.--Charles17 (talk) 14:42, 30 September 2017 (UTC)

kernel command line need not be built in

Talk status
This discussion is still ongoing.

command line can be specified through efibootmgr, eg:

root #efibootmgr -d /dev/nvme0n1 -p 1 -c -b 0000 -L "Gentoo" -l "\gentoo\kernel-4.19.0-gentoo.efi" --unicode "root=ZFS=g-pool/g-root i915.enable_guc=3 psmouse.synaptics_intertouch=1 crashkernel=128M"

Bunder (talk) 11:22, 3 February 2019 (UTC)

Thanks for mentioning this. Will you please integrate your experience into the efibootmgr article. Please bear in mind there are some EFI implementations where it does not work. And also that some users of the EFI stub do not (need to) use efibootmgr.--Charles17 (talk) 06:36, 4 February 2019 (UTC)

Distribution kernels

Talk status
This discussion is still ongoing.

TheFossie Does this actually work with gentoo-kernel and/or gentoo-kernel-bin? Often they need to have loaders reference the post-build initramfs to complete the boot process. What's written here does not look like it will work. Also, not every UEFI will accept parameters like you suggest. --Grknight (talk) 20:06, 4 February 2021 (UTC)

I use gentoo-kernel-bin and have tried these commands. No issue. And, if a user's UEFI doesn't accept parameters and he is using distribution kernels, he might be failed to use EFI Stub as a whole. Maybe, we can mention that in the wiki? Because, if we don't mention the parameter way, the users who have a supported UEFI can't use it. - TheFossie (talk) 05:11, 5 February 2021 (UTC)
TheFossie You say: »And, if a user's UEFI doesn't accept parameters and he is using distribution kernels, he might be failed to use EFI Stub as a whole.«
Is that true? Would it really fail even using Refind as a boot manager?
Would it also fail using suitable settings in savedconfig or /etc/kernel/config.d? If so, IMHO it's worth filing a bug.
You say: »if we don't mention the parameter way, the users who have a supported UEFI can't use it.«
Mentioning the parameter way in the efibootmgr article sound a good idea.
--Charles17 (talk) 11:02, 5 February 2021 (UTC)
Charles17 I put the efibootmgr instructions here for two reasons:
1. There was already an efibootmgr command under Optional: category in this article
2. In order to run these commands, users have to copy vmlinuz/bzimage to appropriate place first. in Efibootmgr article, this context is missing. If I put the exact same writings to Efibootmgr, won't it look irrelevant? - TheFossie (talk) 16:34, 5 February 2021 (UTC)
You could add the missing copy/move commands and possibly another »If this is the folder structure:« box to the Efibootmgr article and give it a general review.
--Charles17 (talk) 16:30, 5 February 2021 (UTC)
Would you please do it on my behalf, as you see fit? And please also mention alternative tools to efibootmgr which users can use to setup their EFI Stub in this article. It would be nice. :D - TheFossie (talk) 16:34, 5 February 2021 (UTC)
No, I will not maintain the efibootmgr article. I don't use efibootmgr at all and my experience with it is too old.
--Charles17 (talk) 16:48, 5 February 2021 (UTC)
I think EFI stub#Creating a boot entry section should also removed. Because, it's partial instruction. The whole Efibootmgr instruction should be moved to that article in this case. - TheFossie (talk) 16:53, 5 February 2021 (UTC)

EFI/Gentoo vs. EFI/example

Talk status
This discussion is still ongoing as of April 9, 2024.

What was so bad about calling it EFI/Gentoo/ as we did until Presently it looks like only installkernel used that path while the traditional manual installation goes into EFI/example. --Vaukai (talk) 13:06, 9 April 2024 (UTC)

When I edited the wiki article, I wanted to make sure that I didn't get in the way of any automated routines (e.g. grub -> \EFI\gentoo\), and I also wanted to deliberately point out that the name can be chosen arbitrarily; it just has to match the UEFI entry. But it can of course be changed again at any time if it makes more sense. -- Pietinger 14:30, 9 April 2024 (UTC)