efi system partition. What is an EFI system or UEFI partition? Computer help at Serty

System partition (EFI or ESP system partition).

The computer must contain one system partition on the disk. On EFI and UEFI based systems this partition is called the system partition EFI or ESP. This partition is usually stored on the main hard drive. The computer boots from the system partition. The minimum size of this partition is 100 MB and it must be formatted using the FAT32 file format. This partition is managed by the operating system and should not contain any other files, including Windows Recovery Environment tools. The standard disk configuration in GPT layout on a UEFI system is shown in Fig. 1.

Rice. 1.Example of disk partition configuration on a PC with UEFI.

An EFI partition (ESP) formatted in FAT32 is required for GPT partitioning on UEFI systems. The standard EFI partition size is 100 MB, but on 4K Native Enhanced Format drives (4KB sectors) it is increased to 260 MB due to FAT32 limitations. PC manufacturers may store some of their tools on this section, so its size varies depending on the manufacturer. In GPT partitioning, the EFI partition performs one of the roles assigned to the System Reserved partition in MBR partitioning. It contains the boot configuration store (BCD) and the files needed to boot the operating system.

Basic principles of construction and operation of a file system based on FAT-32.

1) Each element of the FAT table (starting from the second) corresponds to a cluster in the data area with the same number.

2) The number of the initial cluster of the file is indicated in the directory line that defines the File. This number is both a reference to the FAT table element that contains the file's next cluster number, and is a reference to the FAT table element that contains the file's next cluster number, etc.

3) A cluster is a continuous sequence of sectors (fixed size). This is an addressable "portion" of a file.

4) The code in the FAT table element can also define a free cluster, a defective cluster, and an end-of-file sign.

5) A file in a FAT partition is a sequence of clusters specified by a directory string and FAT table entries.

6) All operating systems can work with a FAT-32 partition (the main factor in using FAT-32 in ESP).

As a result of high-level formatting of a partition, writing system information into data blocks of a number of initial sectors of the partition, a logical disk (volume) of a FAT32 file system is created, which consists of three main areas (Fig. 2), located in the following order:

- “reserve” area (area of ​​reserve sectors);

- file allocation tables area (FAT1 and FAT2);

- area of ​​files and directories (data area).

The root directory is stored in the data area as a regular file and can be expanded as needed.

I came across a strange hard drive, it seemed like it was Linux or MacOS. I deleted all the partitions, but I couldn’t delete one by standard means (Disk Utility and Disk Management) for 200 meters.

In the context menu, the Delete volume... item is inactive.

You can delete an encrypted EFI partition in Windows 7 using the console program diskpart.

1. Run cmd as administrator

2. Enter in cmd – diskpart. Diskpart will launch in a new window

list disk – look at the list of disks
select disk # – select the desired disk. Instead of # we indicate the disk number
clean – removes all partitions or volumes on the disk
list partition – checks that all partitions have been deleted

4. Check the result in Disk Management.

5. All partitions have been deleted.

efi section
efi partitions
efi disk partition
efi partition windows
mbr partition table for efi system
gpt efi section
efi system partition
encrypted efi partition
delete efi partition
create efi partition
format efi partition
encrypted efi system partition
efi mac section
efi partition mac os
efi boot partition
format efi partition fat32
format system partition efi fat32
efi system partition formatted ntfs
creating an efi partition
format the efi system partition in fat32 format
efi system partition installed
efi hard drive partitions
efi partition recovery
delete encrypted efi partition
how to recover efi partition
open encrypted efi partition
how to delete an efi encrypted system partition
efi partition size
efi partition in linux
deleting efi partition
mount efi partition

Updated: October 2013

Purpose: Windows 8, Windows 8.1, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2

This section describes how to set up disk partitions, including hard disk drives (HDDs), solid-state drives (SSDs), and other drives for BIOS-based Unified EFI Interface (UEFI) computers.

In this section

Partition configurations

This section describes the default partition configuration and the recommended partition configuration.

Default configuration: Windows Recovery Environment partition, System partition, MSR partition, and Windows partition

The default Windows installation configuration includes the Windows Recovery Environment Tools partition, the System partition, the MSR partition, and the Windows partition. This configuration is shown in the following diagram. This configuration allows you to enable BitLocker drive encryption and store the Windows Recovery Environment on a hidden system partition.

Using this configuration, utilities such as Windows BitLocker Drive Encryption and Windows Recovery Environment can be added to a custom Windows installation.

Recommended configuration: Windows Recovery Environment partition, system partition, MSR partition, Windows partition, and recovery image partition

The recommended configuration includes: Windows Recovery Environment partition, system partition, MSR partition, Windows partition, and recovery image partition. This configuration is shown in the following figure.

The Windows Recovery Environment Tools partition and the System partition are added before the Windows partition is added. The last partition to be added is the recovery image. This partition order will help keep the system partition and the Windows Recovery Environment partition safe during actions such as deleting the recovery image partition or resizing the Windows partition.

System and service partitions

By default, system partitions are not displayed in Explorer. This is done to prevent the user from accidentally making changes to the system partition.

In this article, we will show you how to manually recover an accidentally deleted Windows boot partition on a UEFI system. Initially, the article described my experience in restoring a bootable EFI partition on Windows 7, but the article is also relevant for modern Microsoft operating systems (from Windows 7 to Windows 10). It has helped me out more than once after accidentally formatting or deleting an EFI partition in Windows 10. In this article we will show you a simple way to manually recreate bootable EFI and MSR partitions in Windows.

So, let's assume that somehow accidentally (or not so accidentally, for example, when trying) the EFI boot partition on a UEFI system (not BIOS) was deleted or formatted, as a result of which Windows 10 / 8.1 / 7 stopped booting, cyclically asking to select boot device (Reboot and select proper boot device or insert boot media in selected). Let's figure out whether it is possible to restore Windows functionality when deleting the partition with Boot Manager without reinstalling the system.

Warning . The instructions assume working with disk partitions and are not intended for beginners. If you misinterpret commands, you may accidentally delete all data on your hard drive. It is also highly recommended that you back up your important data to a separate media.

Partition structure on a GPT disk

Let's look at what the partition table of a bootable hard drive with GPT markup should look like. At a minimum, the following sections should be present:

  • EFI system partition (EFI System Partition or ESP - Extensible Firmware Interface) - 100 MB (partition type - EFI).
  • Microsoft backup partition – 128 MB (partition type - MSR).
  • The main Windows partition is the Windows partition.

This is exactly the minimum configuration. These partitions are created by Windows Installer when installing the system on an unpartitioned disk. PC manufacturers or users themselves can additionally create their own partitions containing, for example, the Windows recovery environment in the winre .wim () file, a partition with a backup system image from the manufacturer (allows you to roll back to the original state of the computer), user partitions, etc.

An EFI partition with the Fat32 file system is required on GPT disks on UEFI systems. This partition, similar to the System Reserved partition on disks with MSR partitioning, stores the boot configuration storage (BCD) and a number of files necessary to boot Windows. When the computer boots, the UEFI environment loads the boot loader (EFI\Microsoft\Boot\bootmgfw .efi) from the EFI partition (ESP) and transfers control to it. If this partition is deleted, the OS cannot be booted.

An MSR partition on a GPT disk is used to simplify partition management and is used for utility operations (for example, when converting a disk from a simple to a dynamic one). This is a backup partition and does not have a partition code assigned to it. User data cannot be stored on this partition. In Windows 10, the MSR partition size is only 16 MB (in Windows 8.1, the MSR partition size is 128 MB), the file system is NTFS.

Manually creating EFI and MSR partitions on a GPT disk

Because the system does not boot correctly, we will need an installation disk with Windows 10 (Win 8 or 7) or any other boot disk. So, boot from the installation disk and on the installation start screen, press the key combination Shift + F 10. A command prompt window should open:

Let's launch the disk and partition management utility:

Let's display a list of hard drives in the system (in this example there is only one, disk 0. An asterisk (*) in the Gpt column means that the disk uses a GPT partition table).

Let's select this disk:

Let's display a list of partitions on the disk:

In our example, there are only 2 partitions left in the system:

  • MSR partition - 128 MB
  • Windows system partition – 9 GB

As we can see, the EFI partition is missing (deleted).

Our task is to delete the remaining MSR partition so that at least 228 MB of free space remains unallocated on the disk (for MSR and EFI partitions). You can delete the remaining partition using graphical GParted or directly from the command line (that’s exactly what we’ll do).

Select the partition to delete:

Select partition 1
And delete it:
Delete partition override

Let's make sure that only the Windows partition remains:

Now we can manually recreate the EFI and MSR partitions. To do this, in the context of the diskpart utility, run the following commands:

Select a disk:

create partition efi size=100

Make sure that the 100 MB partition is selected (the asterisk opposite the Partition 1 line):

list partition
select partition 1
format quick fs=fat32 label="System"
assign letter=G
create partition msr size=128
list partition
list vol

In our case, the Windows partition is already assigned the drive letter C:, if this is not the case, assign it a letter as follows:

select vol 1
assign letter=C
exit

Repairing EFI bootloader and BCD in Windows

Once you have created the minimum disk partition structure for the UEFI system, you can proceed to copying the EFI boot files to disk and creating a bootloader configuration file (BCD).

Let's copy the EFI environment files from the directory of your disk where your Windows is installed:

mkdir G:\EFI\Microsoft\Boot

xcopy /s C:\Windows\Boot\EFI\*.* G:\EFI\Microsoft\Boot

Let's recreate the Windows 10/7 bootloader configuration:

g:
cd EFI\Microsoft\Boot
bcdedit /createstore BCD
bcdedit /store BCD /create (bootmgr) /d “Windows Boot Manager”
bcdedit /store BCD /create /d “Windows 7” /application osloader

You can replace the inscription “My Windows 10” with any other one.

Advice . If only the EFI environment files were damaged on the EFI partition, but the partition itself remained in place, you can skip the process of rebuilding partitions using diskpart. Although in most cases it is enough to restore the bootloader according to the article. You can manually recreate the BCD on regular MBR+BIOS systems.

The command returns the GUID of the created entry; in the next command, this GUID must be substituted instead of (your_guid).


bcdedit /store BCD /set (bootmgr) default (your_guid)
bcdedit /store BCD /set (bootmgr) path \EFI\Microsoft\Boot\bootmgfw.efi
bcdedit /store BCD /set (bootmgr) displayorder (default)

Further commands are executed in the context (default):

bcdedit /store BCD /set (default) device partition=c:
bcdedit /store BCD /set (default) osdevice partition=c:
bcdedit /store BCD /set (default) path \Windows\System32\winload.efi
bcdedit /store BCD /set (default) systemroot \Windows
exit

We reboot the computer... In our case, it did not boot the first time, we had to additionally dance with a tambourine:

  • Turn off the power to the PC.
  • Disconnect (physically) the hard drive.
  • We turn on the PC, wait for the boot error window to appear, and turn it off again.
  • We connect the disk back.
  • Then in our case (testing was carried out on) we had to add a new boot menu item by selecting the file EFI\Microsoft\Boot\bootmgrfw.efi on the EFI partition.

    In some UEFI menus, by analogy, you need to change the priority of boot partitions.

    After all the above manipulations, Windows should boot correctly.

    As soon as we turn on the computer, it immediately starts running a miniature operating system, which we know as BIOS. It deals with testing devices, memory, loading operating systems, and distributing hardware resources. Many of the features of this set of programs (usually about 256-512 KB in size) allow you to support older operating systems like MS-DOS, giving them many features. Since the days of the PC/AT-8086, the BIOS has changed very little, and by the time the first Pentiums were launched, its development had almost stopped. Actually, there was nothing to change in it except dual BIOS, support for network tools and the ability to flash the firmware. But there were a lot of disadvantages: initial entry into the real processor mode, 16-bit addressing and 1 MB of available memory, the inability to have a “repair” console. And, of course, the eternal problem of hard drive support. Even now, disks up to 2.2 TB are guaranteed to be supported, no more.

    Back in 2005, Intel decided to change the BIOS to EFI/UEFI (Unified Extensible Firmware Interface). The EFI system is a more advanced base operating system. UEFI has been working on some Unix and Windows platforms for a long time, but a mass transition has not yet occurred, despite good intentions. And they are:

    • Availability of the notorious console for repairing system parameters and installing the OS;
    • The EFI partition makes it possible to perform some actions without loading the OS (watching movies, playing music);
    • Internet access and, therefore, the presence of installed network drivers, TCP/IP stack, etc.);
    • Presence of graphic mode and user scripts;
    • Support for gigantic disks;
    • UEFI storage on new format partitions (GPT);
    • Full support for all equipment from the moment of launch.

    UEFI can use a general-purpose execution engine like the JVM to run hardware-independent code, which opens up enormous possibilities for creating bootable software.

    There is also criticism of this technology. In particular, its implementation may lead to cutting off new players from the operating system market: for this purpose there will always be some technological loophole in the code. Like, for example, the inability to boot Windows 98 from modern BIOSes. But what’s worse is that you’ll have to forget about the millions of MS-DOS programs and other systems that relied on BIOS functions to operate. Perhaps they will still be emulated, but there are doubts about this. And among them there are probably important programs that there will be no one to rewrite. However, all these issues can be resolved – at least through virtual operating systems. But what is certain is that new types of viruses will appear, and we will be able to see this quite soon.