How to See All Eufi Boot Disks from Cmd Line

How to See All Eufi Boot Disks from Cmd Line

This guide teaches you how to see all UEFI boot disks from the command line using Windows utilities like diskpart and bcdedit. You’ll learn to identify boot entries, manage disk partitions, and troubleshoot common issues—all without third-party software.

Key Takeaways

  • Use diskpart to list UEFI boot disks: The diskpart tool reveals all disks and partitions, including EFI system partitions essential for UEFI booting.
  • Access UEFI boot entries with bcdedit: The bcdedit command displays detailed boot configuration data, including boot loaders and device paths.
  • Identify EFI partitions by size and type: EFI system partitions are typically 100–500 MB, formatted as FAT32, and marked with a specific GUID.
  • Run commands in elevated Command Prompt: Administrative privileges are required to access boot configuration and disk management tools.
  • Understand disk numbering and partition layout: Knowing how Windows assigns disk and partition numbers helps avoid accidental data loss.
  • Troubleshoot missing boot entries: Use bcdedit and diskpart together to diagnose and fix boot issues related to UEFI firmware.
  • Backup boot configuration before changes: Always export your BCD store before modifying boot settings to prevent system instability.

Introduction: Why You Need to See UEFI Boot Disks from the Command Line

If you’re managing a modern Windows PC, especially one with UEFI firmware, understanding how your system boots is crucial. Unlike older BIOS systems, UEFI relies on special partitions and boot loaders stored on your disk. When troubleshooting boot issues, dual-booting, or setting up recovery tools, you often need to see all UEFI boot disks from the command line.

This guide will walk you through how to see all UEFI boot disks from the command line using only built-in Windows tools. You’ll learn to use diskpart and bcdedit—two powerful utilities that give you full visibility into your system’s boot configuration. Whether you’re a system administrator, IT professional, or a tech-savvy user, mastering these commands will help you maintain, repair, and optimize your system’s boot process.

By the end of this guide, you’ll be able to:
– List all disks and partitions, including hidden EFI system partitions
– View UEFI boot entries and their associated devices
– Identify which disk contains the active boot loader
– Diagnose and fix common boot problems

No third-party software is needed. Everything can be done from the Windows Command Prompt with administrator rights.

Understanding UEFI and Boot Disks

How to See All Eufi Boot Disks from Cmd Line

Visual guide about How to See All Eufi Boot Disks from Cmd Line

Image source: i.ytimg.com

Before diving into commands, it’s important to understand what UEFI is and how it differs from legacy BIOS.

UEFI (Unified Extensible Firmware Interface) is the modern replacement for BIOS. It offers faster boot times, support for larger hard drives, and improved security features like Secure Boot. Unlike BIOS, which loads the bootloader from the Master Boot Record (MBR), UEFI looks for bootloaders in a special partition called the EFI System Partition (ESP).

This ESP is typically:
– 100 to 500 MB in size
– Formatted with FAT32 file system
– Hidden from normal file browsing
– Assigned a unique GUID type: C12A7328-F81F-11D2-BA4B-00A0C93EC93B

Each operating system or bootable tool (like Windows, Linux, or recovery environments) can place its bootloader in this partition. The UEFI firmware then reads a list of boot entries stored in NVRAM (non-volatile RAM) to determine which OS to load.

Because these boot entries and partitions are not visible in File Explorer, you need command-line tools to inspect them. That’s where diskpart and bcdedit come in.

Prerequisites: What You Need Before Starting

To follow this guide, ensure you have:
– A Windows PC with UEFI firmware (most systems from 2012 onward)
– Administrator access to the computer
– A working Command Prompt with elevated privileges
– Basic familiarity with command-line interfaces

You do not need to install any additional software. All tools used are part of Windows.

How to Open an Elevated Command Prompt

To run the commands in this guide, you must open Command Prompt as an administrator:

1. Press Windows + S to open Search.
2. Type cmd or Command Prompt.
3. Right-click on “Command Prompt” and select Run as administrator.
4. If prompted by User Account Control (UAC), click Yes.

You’ll know you’re in an elevated prompt when the title bar says “Administrator: Command Prompt”.

Step 1: Using diskpart to List All Disks and Partitions

The first tool we’ll use is diskpart, a command-line disk partitioning utility. It allows you to view and manage disks, partitions, and volumes—including hidden ones like the EFI system partition.

Launching diskpart

1. In your elevated Command Prompt, type:

diskpart

2. Press Enter.

You’ll see a new prompt: DISKPART>

List All Disks

To see all physical disks connected to your system:

1. Type:

list disk

2. Press Enter.

You’ll see output like this:

  Disk ###  Status         Size     Free
  --------  -------------  -------  -------
  Disk 0    Online          476 GB      0 B
  Disk 1    Online          931 GB      0 B

Each disk is assigned a number (Disk 0, Disk 1, etc.). Note these numbers—they’ll be important later.

Select a Disk and List Its Partitions

Now, let’s examine the partitions on a specific disk. For example, to look at Disk 0:

1. Type:

select disk 0

2. Press Enter.

You’ll see a confirmation: “Disk 0 is now the selected disk.”

3. Now list the partitions:

list partition

4. Press Enter.

Example output:

  Partition ###  Type              Size     Offset
  -------------  ----------------  -------  -------
  Partition 1    System             100 MB  1024 KB
  Partition 2    Reserved            16 MB   101 MB
  Partition 3    Primary             475 GB   117 MB

Here, Partition 1 is likely the EFI System Partition (ESP). It’s small (100 MB), marked as “System”, and usually appears first.

Identify the EFI System Partition

To confirm it’s an EFI partition, check its type and file system:

1. Select the partition:

select partition 1

2. Press Enter.

3. View detailed information:

detail partition

4. Press Enter.

Look for:
Type: Should show “EFI” or “System”
Hidden: Usually marked as “Yes”
Offset and Size: Typically 100–500 MB

You can also check the file system by assigning a drive letter (temporarily):

1. Type:

assign letter=Z

2. Press Enter.

Now open File Explorer and go to Z:. You should see folders like:
EFI (contains bootloaders)
Microsoft (Windows boot files)
Boot (common boot resources)

After inspection, remove the drive letter to avoid confusion:

1. In diskpart, type:

remove letter=Z

2. Press Enter.

Practical Tip: Repeat for All Disks

Repeat the above steps for each disk (Disk 1, Disk 2, etc.) to see all UEFI boot disks. Some systems may have multiple ESPs—especially if you’ve dual-booted or used recovery tools.

Step 2: Using bcdedit to View UEFI Boot Entries

While diskpart shows you the physical layout, bcdedit reveals the boot configuration data (BCD). This includes all UEFI boot entries, their locations, and which one is active.

Launch bcdedit

1. In your elevated Command Prompt, type:

bcdedit

2. Press Enter.

You’ll see a detailed list of boot entries. Example:

Windows Boot Manager
--------------------
identifier              {bootmgr}
device                  partition=\Device\HarddiskVolume1
path                    \EFI\Microsoft\Boot\bootmgfw.efi
description             Windows Boot Manager
locale                  en-US
inherit                 {globalsettings}
default                 {current}
resumeobject            {12345678-1234-1234-1234-123456789012}
displayorder            {current}
toolsdisplayorder       {memdiag}
timeout                 30

Windows Boot Loader
-------------------
identifier              {current}
device                  partition=C:
path                    \Windows\system32\winload.efi
description             Windows 10
locale                  en-US
inherit                 {bootloaders}
resumeobject            {12345678-1234-1234-1234-123456789012}
osdevice                partition=C:
systemroot              \Windows
resume                  Yes

Key Elements to Note

{bootmgr}: The UEFI boot manager. It loads first and shows the boot menu.
device: Shows which partition contains the boot files. In this case, \Device\HarddiskVolume1—usually the EFI partition.
path: The location of the bootloader. For Windows, it’s typically \EFI\Microsoft\Boot\bootmgfw.efi.
{current}: The default OS entry that loads after the boot manager.

List All Boot Entries

To see every boot entry (including hidden or inactive ones):

1. Type:

bcdedit /enum all

2. Press Enter.

This will show:
– Windows Boot Manager
– Windows Boot Loader(s)
– Recovery environments
– Memory diagnostics
– Other OS entries (e.g., Linux, if installed)

Look for entries with path starting with \EFI\—these are UEFI bootloaders.

Map Boot Entries to Physical Disks

The device field in bcdedit uses abstract paths like \Device\HarddiskVolume1. To map this to a real disk and partition:

1. Use diskpart to list volumes:

diskpart
   list volume

Look for a volume with:
– File system: FAT32
– Label: “System” or “EFI”
– Size: ~100–500 MB

This volume corresponds to the EFI partition. Note its volume number (e.g., Volume 1).

2. Cross-reference with bcdedit’s device field. If bcdedit shows HarddiskVolume1, it matches Volume 1 in diskpart.

Practical Example: Dual-Boot System

Suppose you have Windows and Ubuntu installed. Running bcdedit /enum all might show:

Windows Boot Manager
--------------------
identifier              {bootmgr}
device                  partition=\Device\HarddiskVolume1
path                    \EFI\Microsoft\Boot\bootmgfw.efi

Windows Boot Loader
-------------------
identifier              {current}
device                  partition=C:
path                    \Windows\system32\winload.efi

Linux Boot Loader
-----------------
identifier              {12345678-5678-5678-5678-123456789012}
device                  partition=\Device\HarddiskVolume1
path                    \EFI\ubuntu\grubx64.efi

Here, both Windows and Linux bootloaders are on the same EFI partition (HarddiskVolume1), but in different folders under \EFI\.

Step 3: Combining diskpart and bcdedit for Full Visibility

To get a complete picture of your UEFI boot setup, combine both tools:

1. Use diskpart to:
– List all disks
– Identify EFI system partitions
– Note their volume numbers

2. Use bcdedit to:
– List all boot entries
– Match device fields to diskpart volumes
– See which bootloaders are present

This combined approach helps you:
– Confirm all boot disks are detected
– Verify bootloader integrity
– Troubleshoot missing or corrupted entries

Example Workflow

Let’s say you’re troubleshooting a system that won’t boot.

1. Open elevated Command Prompt.
2. Run:

diskpart
   list disk
   select disk 0
   list partition

→ You see a 100 MB “System” partition.

3. Assign a drive letter:

select partition 1
   assign letter=Z

4. Check contents:

Z:
   dir

→ You see EFI folder with Microsoft and Boot subfolders.

5. Run:

bcdedit

→ You see {bootmgr} pointing to \EFI\Microsoft\Boot\bootmgfw.efi

6. If the file exists, the issue may be firmware-related (e.g., Secure Boot blocking it).

Troubleshooting Common Issues

Even with the right tools, you might encounter problems. Here’s how to handle them.

Issue 1: EFI Partition Not Visible in diskpart

Sometimes, the EFI partition doesn’t appear in list partition.

Solution:
– Ensure you’re in an elevated Command Prompt.
– Try refreshing the disk list:

rescan

in diskpart.
– Check if the disk is online:

detail disk

If it says “Offline”, use:

online disk

Issue 2: bcdedit Shows “The system cannot find the file specified”

This means the bootloader file is missing or corrupted.

Solution:
1. Use diskpart to assign a drive letter to the EFI partition.
2. Navigate to Z:\EFI\Microsoft\Boot\
3. Check if bootmgfw.efi exists.
4. If missing, repair it using Windows Recovery:
– Boot from Windows installation media
– Open Command Prompt
– Run:

bootrec /fixboot
     bootrec /rebuildbcd

Issue 3: Multiple EFI Partitions Confuse Boot Order

Some systems (especially after dual-booting) may have multiple ESPs.

Solution:
– Use diskpart to identify all ESPs.
– Use bcdedit to see which one is active.
– In UEFI firmware settings (BIOS), check the boot order and ensure the correct disk is first.

Issue 4: Secure Boot Prevents Custom Bootloaders

If you’re trying to boot Linux or a custom OS, Secure Boot may block it.

Solution:
– Temporarily disable Secure Boot in UEFI settings.
– Or, ensure the bootloader is signed and enrolled in the firmware.

Best Practices and Safety Tips

When working with boot disks and UEFI settings, caution is essential.

Always Backup the BCD Store

Before making changes, export your boot configuration:

1. In Command Prompt, type:

bcdedit /export C:\BCD_Backup

2. Press Enter.

This saves a copy of your current boot settings. If something goes wrong, you can restore it:

bcdedit /import C:\BCD_Backup

Never Delete or Format the EFI Partition

The EFI partition contains critical boot files. Deleting it will make your system unbootable.

If you must repartition, use disk management tools carefully and back up data first.

Use diskpart with Care

Commands like clean or delete partition can erase data. Always double-check the selected disk and partition.

Document Your Findings

Take screenshots or notes of your disk layout and boot entries. This helps when troubleshooting later.

Conclusion: Master UEFI Boot Disks from the Command Line

Knowing how to see all UEFI boot disks from the command line is a valuable skill for anyone managing Windows systems. With diskpart and bcdedit, you can inspect disks, identify EFI partitions, and view boot configurations—all without third-party tools.

You’ve learned to:
– Use diskpart to list disks and partitions
– Identify EFI system partitions by size and type
– Assign drive letters to inspect hidden partitions
– Use bcdedit to view and interpret boot entries
– Combine both tools for complete visibility
– Troubleshoot common boot issues

These commands empower you to diagnose boot problems, manage dual-boot setups, and maintain system stability. Whether you’re recovering a broken system or optimizing your boot process, the command line gives you the control you need.

Remember: always work with elevated privileges, back up your BCD store, and proceed with caution. With practice, these tools will become second nature.

Now you’re ready to take full control of your UEFI boot environment—directly from the command line.

Similar Posts