More examples of using `bcfg` command in efi shell

Here are a few more examples of how you can use the bcfg command in the EFI shell:

  1. To add a new boot option:
bcfg boot add 0 fs0:\EFI\Boot\bootx64.efi "Windows Boot Manager"

This adds a new boot option to the system that points to the bootx64.efi file located in the EFI\Boot directory on the first file system (fs0:). The boot option is given a boot index of 0, and a description of “Windows Boot Manager”.

  1. To delete an existing boot option:
bcfg boot rm 1

This deletes the boot option with a boot index of 1 from the system.

  1. To view the current boot order:
bcfg boot dump

This displays the current boot order of the system.

  1. To change the boot order:
bcfg boot mv 2 0

This moves the boot option with a boot index of 2 to the top of the boot order (boot index 0).

  1. To set the boot options for the next boot only:
bcfg boot next 0

This sets the boot order for the next boot only to the boot option with a boot index of 0. This is useful if you want to temporarily change the boot order without permanently modifying the system’s boot configuration.

These are just a few examples of what you can do with the bcfg boot command in the EFI shell. The full range of options and capabilities can vary depending on the specific implementation of the EFI firmware on your system.

can you explain bcfg boot mv command ?

The bcfg command in the EFI Shell is used to manage the boot options stored in the system’s NVRAM. The boot subcommand of bcfg is used to manage boot options, and the mv subcommand is used to move a boot option to a different position in the boot order.

Here’s an example usage of the bcfg boot mv command:

bcfg boot mv <old_position> <new_position>
bcfg boot mv 03 01

In this example, the command moves the boot option at position 03 to position 01 in the boot order. The first argument, 03, specifies the position of the boot option to be moved, and the second argument, 01, specifies the position to which the boot option should be moved.

EFI Shell commands with options explain

map – Displays or modifies drive mappings.

Here are some common commands in the EFI shell, along with a brief explanation of their options:

/B - Displays mappings in brief form.
/E - Displays mappings in expanded form.
/R - Removes a specified mapping.
ls - Lists the contents of a directory.

/B - Displays only file and directory names.
/S - Displays the contents of subdirectories as well.
/A - Displays hidden files and directories.
cd - Changes the current directory.

cd <directory> - Changes to the specified directory.
cd .. - Changes to the parent directory.
cp - Copies files or directories.

/R - Copies directories recursively.
/V - Verifies each file after it is copied.
mv - Renames or moves files or directories.

mv <old name> <new name> - Renames a file or directory.
mv <source> <destination> - Moves a file or directory.
rm - Deletes files or directories.

/R - Deletes directories recursively.
/F - Forces deletion of read-only files.
edit - Edits a text file.

echo - Displays a message.

help - Displays help information about commands.

reset - Resets the system.