tldr/pages/linux/efibootmgr.md

25 lines
670 B
Markdown
Raw Normal View History

2020-05-12 05:55:30 +01:00
# efibootmgr
> Manipulate the UEFI Boot Manager.
> More information: <https://manned.org/efibootmgr>.
2020-05-12 05:55:30 +01:00
2024-07-10 18:24:55 +01:00
- List all boot options with their numbers:
2020-05-12 05:55:30 +01:00
2024-07-10 18:24:55 +01:00
`efibootmgr {{-u|--unicode}}`
2020-05-12 05:55:30 +01:00
2024-07-10 18:24:55 +01:00
- Add UEFI Shell v2 as a boot option:
2020-05-12 05:55:30 +01:00
2024-07-10 18:24:55 +01:00
`sudo efibootmgr -c -d {{/dev/sda}} -p {{1}} -l "{{\path\to\shell.efi}}" -L "{{UEFI Shell}}"`
2020-05-12 05:55:30 +01:00
2024-07-10 18:24:55 +01:00
- Add Linux as a boot option:
2020-05-12 05:55:30 +01:00
2024-07-10 18:24:55 +01:00
`sudo efibootmgr --create --disk {{/dev/sda}} --part {{1}} --loader "{{\vmlinuz}}" --unicode "{{kernel_cmdline}}" --label "{{Linux}}"`
2020-05-12 05:55:30 +01:00
- Change the current boot order:
2024-07-10 18:24:55 +01:00
`sudo efibootmgr {{-o|--bootorder}} {{0002,0008,0001,0005}}`
2020-05-12 05:55:30 +01:00
- Delete a boot option:
2024-07-10 18:24:55 +01:00
`sudo efibootmgr {{-b|--bootnum}} {{0008}} {{-B|--delete-bootnum}}`