EfiBootDude
efibootdude presents a visual (curses) interface to efibootmgr which allows editing the bios boot menu and parameters while running Linux.
- Installation:
pipx install efibootdude - Prerequisites:
- Python 3.11 or newer.
- Install rhboot/efibootmgr
- For example, on a Debian derived distro, use
sudo apt install efibootmgr.
- For example, on a Debian derived distro, use
efibootdude covers the most commonly used capabilities of efibootmgr; you can:
- reorder, enable/disable, copy, and remove boot entries
- choose what to boot on the next reboot (BootNext)
- set the timeout before auto-booting
- save your changes and reboot
Note: Copying a boot entry effectively adds a new entry with a different label. For more esoteric uses of efibootmgr (like setting custom boot variables), use efibootmgr directly.
Usage
Essentials before you start
- Do not run
efibootdudeas root (i.e. do not usesudo efibootdude); run it as your normal user.efibootdudeelevates itself: the first time it needs to write (w) or reboot (b) it prompts for yoursudopassword.- Nothing is written until you press
wand confirm at the prompt; press?at any time for help.See Privileges:
efibootdudeelevates to root automatically below for the full story and safety notes.
After running efibootdude and making some changes, you'll see a screen comparable to this:
wRITE down next tag *:inact copy rmv [v]erbose ?:help quit
──────────────────────────────────────────────────────────────────────────────
BootNext: ---
BootCurrent: 0007
Timeout: 2 seconds
>* 0006 Linux Boot Manager /dev/nvme0n1p1 \EFI\systemd\systemd-b
* 0000 Enter Setup [Firmware]
* 0001 NVMe: SAMSUNG MZALQ128HBHQ-000L2 [Auto]
* 0002 UEFI Shell [Firmware]
+ADD Linux Boot Manager Copy [pending copy]
* -RMV Ubuntu /boot/efi \EFI\ubuntu\shimx64.ef
At this point
- The "current" line starts with
>and is highlighted. - The top line shows actions for the current line; type the underscored letter to effect its action.
- Type
?for a more complete explanation of the keys, navigation keys, etc.- ALWAYS view the help at least once if unfamiliar with this tool, its navigation, and/or uncertain of keys not shown on top line.
- With this current line, we can:
- Type
uordto move it up or down in the boot order. - Type
tto relabel the boot entry (prompts for new name). - Type
cto copy the boot entry with a new label (prompts for new name). - Type
rto remove the boot entry. - Type
mon the Timeout line to change the boot timeout in seconds. - Type
Tto cycle through available themes (the theme key is listed on the?help screen, not on the top line). - And so forth.
- Type
- The entries with
*on the left are active boot entries; toggle whether active by typing*for the corresponding entries. - Special status lines at the top:
BootNext:shows which entry will boot next (usento set it, or leave as---)BootCurrent:shows which entry is currently booted (read-only, set by firmware)Timeout:shows boot timeout in seconds (usemto modify)
- Special indicators:
+ADDshows pending copy operations (pressrto cancel before writing)-RMVshows entries marked for removal (pressrto undo before writing)
- Press
ESCkey to abandon any changes and reload the boot information. - When ready to write the changes to the BIOS, enter
w. - When writing the changes,
efibootdudedrops out of menu mode so you can verify the underlying commands, error codes, and error messages. - After you write changes, type
bto reboot, if you wish and the boot menu looks OK. - BTW, the top-line keys vary per context; e.g.:
wis only shown with pending changes, andbis only shown w/o pending changes.
Caveats - Firmware Bugs and efibootmgr Quirks
- Some operations may not work permanently even though there is no indication from
efibootmgr(e.g., on my desktop, I cannot re-label boot entries); copy an entry and later remove the old one as a safe workaround. - Some operations may only work (again) after re-booting (e.g., you might find activating an entry does not work, but it does so after a reboot).
efibootmgrv18 cannot addressBoot0000by number:--bootnum 0000fails withBoot entry 0 not found(other numbers work), even though the entry exists and lists fine. Work around it by changing the boot order (--bootorder) instead of the entry's active flag, or delete it from your firmware setup screen.
Privileges: efibootdude elevates to root automatically
efibootdude is designed to be launched as your normal, unprivileged user.
Reading and writing the UEFI boot variables, however, requires root. Rather than
making you launch the whole application with sudo, efibootdude elevates
automatically: each privileged action it performs — writing changes with
efibootmgr and rebooting — is run through sudo on your behalf. In practice,
when you press w (write) or b (reboot), efibootdude becomes root for you
without you typing sudo yourself. Only the individual efibootmgr/reboot
commands are elevated; the TUI itself keeps running as your normal user.
- The first time a privileged command runs you may be prompted for your password
(unless your
sudocredentials are already cached). Becauseefibootdudebriefly leaves curses mode before running the commands, thesudoprompt and the resulting command output and exit codes are shown plainly on the terminal. - Tip: run
sudo -vin another terminal first if you want to pre-authorize before startingefibootdudeand avoid an in-app prompt. - Do not launch the whole program as root (
sudo efibootdude). It works, but it is unnecessary and needlessly widens the blast radius — letefibootdudeelevate only what it needs.
Doing it safely
Elevating only the individual commands (rather than the whole TUI) is the safer design, but you should still understand what you are handing over:
- Root is blanket authority. Every generated command runs as root. Before
anything is executed,
efibootdudeprints the exact command list and asksRun the above commands? (yes/No). Read that list before answeringyes— it is your last chance to catch a mistyped label or the wrong partition. - Values are passed to
sudo efibootmgras separated arguments, never through a shell. Labels and device paths cannot break out into additional commands, so a crafted label cannot run arbitrary root commands. - Prefer scoping
sudoto the two binaries. If you want to skip password prompts, grant passwordlesssudofor justefibootmgrandrebootinstead of forefibootdudeas a whole. Withsudo visudo, add a line such as:
(Paths vary by distro; confirm them withyouruser ALL=(root) NOPASSWD: /usr/sbin/efibootmgr, /sbin/rebootcommand -v efibootmgrandcommand -v reboot.) This is safer thanNOPASSWD: ALLand safer than whitelisting the TUI wrapper. - Boot-menu changes are firmware-level and persistent. A bad write can leave
a machine unbootable. Keep a recovery USB and know how to reach your firmware
setup screen. The undoable-remove (
-RMV) feature and the confirmation prompt reduce mistakes but are not a substitute for a recovery plan. - Reboot is immediate. The
bkey ultimately runssudo reboot nowafter a typed confirmation.
About this Project
This project was inspired by Elinvention/efiboots. Relative to that project, the aims of efibootdude are:
- to be easier to install especially when not in your distro's repos.
- to clearly present the partition of the boot entries (as a mount point if mounted and, otherwise, the device pathname).
- to show the underlying commands being run for education, for verification, and for help on investigating issues.
Metadata
Release files for efibootdude 2.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| efibootdude-2.1.2.tar.gz | 25.0 kB | Without provenance | Details for efibootdude-2.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| efibootdude-2.1.2-py3-none-any.whl | Python 3 | none | any | Details for efibootdude-2.1.2-py3-none-any.whl |
Total release size: 45.3 kB
Release files / efibootdude-2.1.2.tar.gz
| Download URL | efibootdude-2.1.2.tar.gz |
|---|---|
| Size | 25.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cfc079f70159034d99ff058d772e8a913f786ebb7b1fdb16578f4452fc6a3cbc
|
|
BLAKE2b-256 checksum How to use checksums |
a994b29026838c58cb06d234786e39c265b5fdcf8a1fbced771234dc4f06871f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.5
|
Release files / efibootdude-2.1.2-py3-none-any.whl
| Download URL | efibootdude-2.1.2-py3-none-any.whl |
|---|---|
| Size | 20.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b1ee26b642d45ba35ea969da50b9c879efcd632176519226e4be578f29d32c5f
|
|
BLAKE2b-256 checksum How to use checksums |
c9571c9ff7594b935731e43f8706fa37295f5c91834a3d95433e86876dea6e80
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.5
|
Security for efibootdude 2.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.