In the computer world, the access to the UEFI shell It has become a fundamental topic for those who need to diagnose, maintain, or modify various aspects of their computer's firmware. If you've ever tried to solve boot problems, update your system, or simply understand in more detail how your PC "comes to life," you've surely come across the term UEFI, and specifically, its console mode or UEFI shell.
Often, the available information is overly technical, fragmented, or simply lacking in Spanish. Therefore, this article aims to be the most up-to-date and comprehensive guide on how to access the UEFI shell, its main utilities and basic commands, as well as everything you need to know to navigate fluently in an environment that, although it may seem intimidating at first, becomes an essential resource for curious users and advanced technicians.
What is the UEFI Shell and what is it used for?
If you've ever heard of the UEFI shell and felt lost, you're not alone. UEFI shell It is a command line interface that allows you to interact with your computer's firmware in a similar way to how you do it in a DOS or command console. Linux, but at a lower level and before any operating system loads. This console is designed to run EFI applications, load drivers, manage maintenance utilities, automate tasks using scripts, recover boot, and much more.
In simple words, the UEFI shell It's an emergency and maintenance console prior to any operating system. It gives you direct access to different partitions and drives, allows you to modify boot configurations, and run advanced utilities that can save you time on more than one occasion. It's especially useful for:
- Update BIOS/UEFI in certain teams such as WALNUT de Intel or recent motherboards.
- Recover the bootloader (bootloader), changing the boot order, or repairing damaged entries.
- Manage partitions and files on disks formatted in FAT16/FAT32 before booting the operating system.
- Diagnosis and troubleshooting derived from changes in hardware, incompatibilities or corruptions at startup.
How to access the UEFI shell?
Access to UEFI shell It depends on your motherboard, manufacturer, and previous configuration. There are typically several ways to access this environment, some included by default and others requiring additional steps:
- Direct access from firmware: Many modern systems allow you to boot the UEFI shell directly from the firmware's own graphical interface (UEFI or Visual Studio). BIOS). There is usually an entry called “Launch EFI Shell from filesystem device” or similar.
For Intel NUC computers, for example, you can find this option in the Visual BIOS setup menu, specifically geared toward updates and maintenance. - Using a USB with UEFI Shell: If your machine does not have the shell built in, you can download a UEFI shell file (.efi) and place it on a USB stick formatted in FAT16 or FAT32. Make sure the file is located in the correct path, usually EFI/BOOT/BOOTX64.EFI inside the flash drive. When booting, select "Boot from USB" and the UEFI shell should load automatically.
- Recovery Mode or boot menu: Some systems allow you to access the UEFI shell via hotkeys during boot (such as F11, ESC, F12, depending on the manufacturer), where you can choose “UEFI Shell” as the boot option.
Trick: If you don't know if your computer has a built-in UEFI shell, simply go into the UEFI (modern BIOS) settings, look for the boot section, and see if there's an option to launch the shell or manually select an .efi file from an external device.
What can you do from the UEFI shell?
The UEFI shell's potential is enormous, but you must handle it carefully. From here, you can make changes that directly affect the computer's startup and underlying operations. Some of the most common actions include:
- Update the BIOS/UEFI: On Intel and some ASUS computers you can load update utilities from the shell, by running .nsh files (scripts).
- Modify boot entries: The command bcfg allows you to add, remove or modify the bootloader (for example, add Clover, GRUB or Windows Boot Manager).
- Manage files: You can list, copy, move, delete, and create directories using commands like ls, cp, mv, rm, mkdir.
- Navigate between drives and partitions: Identifiers such as fs0:, fs1: They allow you to switch from one partition to another, as long as they are in FAT16/FAT32 format.
- View device information: Through command map You can list all drives and file systems recognized by UEFI, and the command devices displays all connected devices.
- Run scripts and automate tasks: Files with the .nsh extension allow you to automate scripts for installation, recovery, or testing.
- Edit files: The command edit opens a simple text editor in console mode.
Main UEFI Shell commands explained
One of the main advantages of the UEFI shell is the availability of useful commands for performing maintenance and diagnostic tasks. Here are some of the most relevant ones, based on Dell and Red Hat documentation and practical user examples:
- fs0: Change to the first file drive (usually the EFI partition of a disk, USB, etc.). You can try fs1:, fs2: if you have multiple devices or partitions mounted.
- ls o dir: Lists the contents of the current directory.
- cd : Change directory.
- cp : Copy files or folders. To copy entire directories, add the option -r of recursion.
- mv : Move files or folders.
- rm : Delete files or folders.
- mkdir : Create a new directory.
- bcfg boot add/remove : Manages the boot sequence in the EFI NVRAM. Practical example for adding Clover as a boot loader:
bcfg boot add 0 fs1:\EFI\CLOVER\CLOVERX64.efi “Clover”
Here you tell the system to add a boot entry in position 0 pointing to the path of the corresponding .efi file and displaying the name "Clover" in the boot menu. - map: Displays the mapping table of devices and partitions recognized by EFI, identifying each partition as fs0:, fs1:, etc.
- help : Displays built-in help for the specified command, or general help if none is specified.
- edit : Opens the text editor for that file.
- attrib : Allows you to view or configure file attributes.
- see: Displays the current version information.
- date | time: : Check or change the firmware date and time.
- reset: Performs a cold reboot of the system.
- dmpstore: Displays variables stored in the UEFI.
- connect/disconnect: Associates or disconnects EFI device drivers.
Practical example: Adding a custom bootloader
In some cases, after installing OS alternative or customize the boot, you'll need to manually add a new boot loader. This is often the case for Hackintosh, Linux, or other users who try out different operating systems on their PC.
- Access the UEFI shell from the BIOS or with your USB prepared.
- Identify the correct partition using the command map. For example, it could be fs0: or fs1:.
- Navigate to the bootloader path (example with Clover):
fs1:
cd EFI\CLOVER - Add the boot entry:
bcfg boot add 0 fs1:\EFI\CLOVER\CLOVERX64.efi “Clover” - Reboot and verify that “Clover” appears as the main option in the boot menu.
This method is also useful for restoring boot Windows, GRUB or other UEFI managers.
Troubleshooting common UEFI shell issues
Working with the UEFI shell may seem complex, but most common problems can be solved if you understand how UEFI partitioning and boot order work. Some of the most common errors and their recovery methods include:
- UEFI shell not appearing: It may be because your computer doesn't have it built-in, or it can't find the BOOTX64.EFI file on the correct USB device. Download the UEFI shell from your manufacturer's official website (Intel, DELL, ASUS, etc.), place it in the correct path on the USB drive, and try again.
- The desired partition does not appear as fs0:, fs1:, etc.: Make sure your USB drive/partition is formatted in FAT16 or FAT32; UEFI doesn't recognize other partition types.
- You cannot modify the boot sequence: Some systems protect NVRAM from modification. Check your firmware settings to disable Secure Boot or use Setup mode.
- Duplicate or missing entries: Use the command bcfg boot dump to list current entries and bcfg boot rm to remove them before adding the correct ones.
- Errors when trying to execute commands: Check the syntax and use help for detailed help.
Passionate writer about the world of bytes and technology in general. I love sharing my knowledge through writing, and that's what I'll do on this blog, show you all the most interesting things about gadgets, software, hardware, tech trends, and more. My goal is to help you navigate the digital world in a simple and entertaining way.