Score:0

Wht does efibootmgr not see all bootable partitions

th flag

I am a distro hopper. So I have a lot of boot OS's on my computer.They are all Ubuntu based. I have installed efibootmge on a Ubuntu 20.04.5 and Ubuntu 22.10. But in both OS's the efibootmgr only gives me a few of my bootable partition. I have tried the v- verbose setting and still get the same amount of entries. I would like to change the default boot os at times. But efibootmgr does not give me a complete list. When booting I get a list of 16 OS’s to boot to.

The efibootmgr only gives me 7 to boot to: Below is the output from efibootmgr.

BootCurrent: 0000
Timeout: 0 seconds
BootOrder: 0000,0003,0002,0001,0014,0015,0016,0017,0018,0019
Boot0000* ubuntu
Boot0001* MX19
Boot0002* debian
Boot0003* MX21
Boot0014* UEFI: Hitachi HDS721050CLA362
Boot0015* Diskette Drive
Boot0016* Hitachi HDS721050CLA362
Boot0017* USB Storage Device
Boot0018* CD/DVD/CD-RW Drive
Boot0019* Onboard NIC

0000,0003,0002,0001,0014,0015,0016, Are bootable 0017,0018,0019 missilanious entries

gparted shows 15 possible boot entries

12,11,6,2,1,4,9,5,13,14,15,16,17,18,19, and 25

Is there a limit to how many boot entries efibootmgr can handle? Am I doing something wrong with installing efibootmgr. Any help would be appreciated.

mook765 avatar
cn flag
`efibootmgr` only lists efi boot menu entries. Not every OS installed may have a efi boot menu entry. If you install Ubuntu 20.04 you will have an entry for it. If you install 22.10 afterwards, this entry will be overwritten and you end up with an entry for 22.10. Both OS install the bootloader to the same location, that's why. Updates of grub packages which reinstall the bootloader may change the entry again back to 20.04 or 22.10 dependinds on which OS updates the package last time.
scott0 avatar
th flag
mook765. thanks for the info. Is there a way to change the names of each OS that appears on the boot menu when booting up the machine? I have searched the web for (maybe not wording my searches correctly) an answer to this question. I thought efibootmgr was the solution.
mook765 avatar
cn flag
You should not ask such follow up questions in comments, post a new question instead. That's the only way to make your question and a possible answer useful for the community.
Score:0
jp flag

The efibootmgr utility displays the EFI's own boot menu options. These options point to various things -- built-in tools like an EFI shell or the setup utility; boot features for devices like network cards; the default/fallback boot loader for a disk; or individual boot programs on the EFI System Partition (ESP). It's this last category that's relevant to your question, but your efibootmgr output shows entries from most or all of the categories.

Most OSes install an EFI boot loader on the ESP, with the approved location being subdirectories of the EFI directory. In the case of Ubuntu, this location is EFI/ubuntu. Ubuntu mounts the ESP at /boot/efi, so in Ubuntu, the boot loader is stored at /boot/efi/EFI/ubuntu. Importantly, every instance of Ubuntu will install its boot loader to this same location and create an identical EFI boot manager entry, or re-use an existing one. Ubuntu uses GRUB 2 as the boot loader by default. Thus, if you've installed Ubuntu 20.04 and 22.10, as you specified, then they'll end up trashing each others' GRUB 2 binaries and configuration files. Whichever one was installed or updated its GRUB 2 more recently will take over that one boot entry.

This shouldn't normally be too big of a problem if you've got just two Ubuntus installed, since they'll detect each others' configurations, and your GRUB 2 menu will show both options. This can become more of a problem when other distributions get added to the mix. Your output shows a debian entry, for instance. If you set up both the Ubuntus, then install Debian, then Debian's GRUB 2 will become the default. It might or might not do a good job of detecting the Ubuntu installations and booting to them. When one of the Ubuntus gets updated, it might become the default boot program.

Using the firmware's boot manager to select between these options is also possible, but as I said, some options will end up being "folded" together into a monolithic entry. In theory, you could disentangle this by giving each Ubuntu its own GRUB 2 on the ESP -- say, EFI/ubuntu2004 and EFI/ubuntu2210. I don't happen to know offhand what GRUB configuration files you'd have to modify to make this happen, though.

Another option is to bypass GRUB 2. Both systemd-boot and rEFInd are designed to help with more complex multi-boot configurations compared to GRUB 2, which really isn't well suited to this task. (Disclaimer: I'm the maintainer of rEFInd, so I'm not exactly unbiased.) Of the two, systemd-boot is simpler in design but more difficult to set up, especially since it requires kernels to be stored on the EFI System Partition (ESP). (At least, that was the case the last I checked.) rEFInd, OTOH, can read kernels from several Linux filesystems (namely ext2/3/4fs, Btrfs, and ReiserFS), and it requires minimal configuration changes on the OSes it's intended to boot. You can get separate entries for each of your Ubuntu or Ubuntu-like OSes with either program. Assuming Secure Boot is disabled, you can try rEFInd without installing it by using its USB flash drive version; however, if you use separate /boot partitions (like with an LVM setup), you'll need to adjust boot options by hitting Tab or F2 twice, rather than Enter, to launch the OS.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.