Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Creating a UEFI boot entry without efibootmgr?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
Mappy
n00b
n00b


Joined: 21 Jun 2019
Posts: 23

PostPosted: Thu Aug 08, 2019 1:01 am    Post subject: Creating a UEFI boot entry without efibootmgr? Reply with quote

Hi, I have two questions about booting using the EFI System Partition (ESP) without GRUB:

1. According to the wiki, you don't need to use efibootmgr to do this:
https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Bootloader#Alternative_2:_efibootmgr
Quote:
efibootmgr is not a requirement to boot an UEFI system. The Linux kernel itself can be booted immediately, and additional kernel command-line options can be built-in to the Linux kernel

However, I can't find a wiki page that explains how to do so without using efibootmgr.
Is it possible to create a boot entry without it or should I just install efibootmgr?

2. If you already have an existing ESP created by Windows, are you still supposed to create a separate FAT32 /boot partition like you would when performing an install with GRUB, or do you simply mount the ESP to /boot?
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 5878

PostPosted: Thu Aug 08, 2019 1:27 am    Post subject: Reply with quote

The wiki means you don't need efibootmgr *permanently* installed like GRUB/LILO, after you've used it to configure the firmware bootloader.

If you don't want to use it at all, most UEFI boot menus will autodetect a kernel placed at [ESP]/EFI/Boot/BootX64.efi; useful if you're installing from scratch without access to a UEFI-compatible install CD. In practice you'd probably want to set up something more permanent with several boot entries for a kernel, previous kernel and a known-good version.

Don't create multiple boot partitions, one is enough.
Back to top
View user's profile Send private message
Mappy
n00b
n00b


Joined: 21 Jun 2019
Posts: 23

PostPosted: Thu Aug 08, 2019 1:32 am    Post subject: Reply with quote

Thank you.
Back to top
View user's profile Send private message
*_-=Banana=-_*
Apprentice
Apprentice


Joined: 21 May 2004
Posts: 205
Location: Germany

PostPosted: Thu Aug 08, 2019 6:09 am    Post subject: Reply with quote

Quote:
If you don't want to use it at all, most UEFI boot menus will autodetect a kernel placed at [ESP]/EFI/Boot/BootX64.efi; useful if you're installing from scratch without access to a UEFI-compatible install CD.
I run this setup for years. Problem is if the kernel is bugged up you have no easy solution to fix that...
_________________
My personal space
Back to top
View user's profile Send private message
joanandk
Tux's lil' helper
Tux's lil' helper


Joined: 12 Feb 2017
Posts: 87

PostPosted: Thu Aug 08, 2019 6:25 am    Post subject: Reply with quote

*_-=Banana=-_* wrote:
Quote:
If you don't want to use it at all, most UEFI boot menus will autodetect a kernel placed at [ESP]/EFI/Boot/BootX64.efi; useful if you're installing from scratch without access to a UEFI-compatible install CD.
I run this setup for years. Problem is if the kernel is bugged up you have no easy solution to fix that...


I have a HP desktop which is a pain to fix if the Kernel goes wrong! I have to take out the boot drive, put it in a external case and copy back the old kernel.
But I had to do this only twice, so if you are cautious, this should not happen.

BR
Back to top
View user's profile Send private message
*_-=Banana=-_*
Apprentice
Apprentice


Joined: 21 May 2004
Posts: 205
Location: Germany

PostPosted: Thu Aug 08, 2019 7:21 am    Post subject: Reply with quote

Yeah, it is a pain in the ass. Particularly if you do not have another PC at hand within a reasonable time.
_________________
My personal space
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 2656

PostPosted: Thu Aug 08, 2019 7:37 am    Post subject: Re: Creating a UEFI boot entry without efibootmgr? Reply with quote

Mappy wrote:
https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Bootloader#Alternative_2:_efibootmgr
Quote:
efibootmgr is not a requirement to boot an UEFI system. The Linux kernel itself can be booted immediately, and additional kernel command-line options can be built-in to the Linux kernel

However, I can't find a wiki page that explains how to do so without using efibootmgr.
See https://wiki.gentoo.org/wiki/EFI_System_Partition#UEFI_boot_items
Mappy wrote:
2. If you already have an existing ESP created by Windows, are you still supposed to create a separate FAT32 /boot partition like you would when performing an install with GRUB, or do you simply mount the ESP to /boot?
See
https://wiki.gentoo.org/wiki/EFI_stub_kernel#Installation wrote:
If an ESP does not exist, ...
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 5878

PostPosted: Thu Aug 08, 2019 4:50 pm    Post subject: Reply with quote

*_-=Banana=-_* wrote:
Quote:
If you don't want to use it at all, most UEFI boot menus will autodetect a kernel placed at [ESP]/EFI/Boot/BootX64.efi; useful if you're installing from scratch without access to a UEFI-compatible install CD.
I run this setup for years. Problem is if the kernel is bugged up you have no easy solution to fix that...

I usually keep old kernels in the boot list, but I also boot a new kernel via kexec before writing it to the boot partition. That way there's always something bootable there.
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 14060

PostPosted: Fri Aug 09, 2019 1:15 am    Post subject: Reply with quote

Some, although perhaps not all, UEFI implementations watch during early boot for a vendor-specific hotkey. If this hotkey is pressed in time, it will drop you into a UEFI shell (or a place from which you can reach one), enabling you to shuffle kernels and boot any currently installed kernel of your choosing. It's not pretty, but it's less trouble than transplanting the hard drive just to clean up from a bad configuration. I suggest that people who do not use a separate bootloader take the time now to research whether their computer has such a hotkey, and test whether it works. If it does, it can save a lot of trouble later.
Back to top
View user's profile Send private message
The Doctor
Moderator
Moderator


Joined: 27 Jul 2010
Posts: 2595

PostPosted: Fri Aug 09, 2019 5:15 am    Post subject: Reply with quote

Many implementations include a full blown bootloader. For example, my Lenovo laptop's implementation can set the timeout and boot order.

My solution is to use efibootmgr to create two boot entries under /EFI/Boot/, one for the current kernel and one for the backup. I simply keep those two in rotation so there is always an acceptable backup available and I never have to mess with the settings a second time.
_________________
First things first, but not necessarily in that order.

Apologies if I take a while to respond. I'm currently working on the dematerialization circuit for my blue box.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum