Recovering a boot partition

Detailed instructions on how to recover a boot partition without losing files

The first thing you need to do is insert a bootable USB flash drive with Windows installation files formatted in FAT32.

You can create them from another device.

The interface may vary.

Next, you need to enter the BIOS and boot by selecting this USB flash drive as the boot device.

The interface may vary.

After booting from the USB flash drive, you will see the "Windows Setup" window.

The interface may vary.

We need to open the Command Prompt and execute the commands.

On the Windows setup screen, press SHIFT + F10.

The Command Prompt window will open. In the Command Prompt, type:

diskpart

This will open the utility for managing disks and partitions.

Next, type:

list vol
  • A list of all volumes on the disk will appear.

  • Find the boot EFI partition:

    • Size: approximately 100 MB

    • File system: FAT32

    • Label: SYSTEM, EFI, or it may have no name

    • Note: it usually does not have a drive letter.

Next, type:

sel vol "5"
  • Replace 5 with the number of the volume that corresponds to your EFI partition.

  • After this, all subsequent commands will be executed on this partition.

Next, type:

format fs=fat32 quick

A quick format of the selected volume is performed in the FAT32 file system, clearing its contents.

Next, type:

assign letter=Z

The selected partition is assigned a temporary drive letter Z:, allowing it to be accessed from the Command Prompt.

Next, type:

exit

We exit DiskPart and return to the Command Prompt.

Next, type:

bcdboot C:\Windows /s Z: /f all
  • C:\Windows — the path to your installed Windows (if the system drive has a different letter, replace it with the correct one).

  • /s Z: — the partition where the boot files (EFI) will be copied.

  • /f all — creates a bootloader for both UEFI and BIOS.

Here’s an example of how it should look!

If all steps were completed correctly, turn off the computer, remove the USB flash drive, and turn it on again.

Last updated