What is efi section. Installing Linux on UEFI. Creating an EFI partition on an empty hard disk using the command line

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 configure disk partitions, including hard disk drives (HDD), solid state drives (SSD), and other BIOS-based drives for Unified EFI (UEFI) computers.

In this section

Partition configurations

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

Default configuration: Windows Recovery Environment Tools 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 enables BitLocker Drive Encryption and stores the Windows Recovery Environment on a hidden system partition.

Using this configuration, you can add utility tools such as Windows BitLocker Drive Encryption and Windows Recovery Environment 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: a partition with Windows Recovery Environment tools, a system partition, an MSR partition, a Windows partition, and a partition with a recovery image. This configuration is shown in the following figure.

The Windows Recovery Environment partition and the system partition are added before adding the Windows partition. The last to be added is the recovery image partition. This order of the partitions 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 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 EFIor ESP.This section is usually stored on the primary hard drive. The computer boots from the system partition. This partition has a minimum size of 100 MB and must be formatted using the FAT32 file format. This partition is controlled by the operating system and should not contain any other files, including Windows Recovery Environment tools. A typical GPT disk configuration on a UEFI system is shown in Fig. 1.

Figure: 1 An example of configuring disk partitions on a PC with UEFI.

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

Basic n 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)room initial cluster file indicated in catalog linedefining the File. Thisnumber is also a link per element of the FAT table that contains number next file cluster,and is a link per FAT table entry that contains the next cluster number of the file etc.

3) A cluster is a continuous sequence of sectors (of a fixed size). This is the addressed "chunk" of the file.

4) FAT table element code may still determine free cluster, defective cluster and end of file sign.

5) File in the FAT section - this is a sequence of clustersspecified withdirectory lines 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 high-level partition formatting, by writing system information to data blocks of a numberthe initial sectors of the partition is createdlogical drive (volume) of a FAT32 file system, which consists ofof three main areas( fig. 2) arranged in the following order:

- "spare" area (area of \u200b\u200bspare sectors);

- file allocation tables area (FAT1 and FAT2);

- file and directory area (data area).

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

When we install Windows to blank (unlabeled) hard drive or formatted partition in the usual way - using the installation media, we don't need to bother creating EFI - markup of the operating system. All necessary partitions, in particular, boot EFI are created automatically if the computer is in BIOS UEFI... But if Windows needs to be installed not in the usual way.

And on another hard disk with its own independent boot loader, if there is a question of restoring the system's performance after removing the hard disk with the boot partition, in such non-standard situations, manual work will be required.

Windows to the second connected to the computer GPT -disk is not installed with its EFI -structure. In a typical installation from the installation media, the bootloader of the second system is written to the existing one EFI -partition - the one on the first disk.

What makes the second Windows vulnerable is that it will not be able to exist on its own if the bootloader of the first system is damaged. Or if the first hard drive fails or is simply disconnected. So that the second Windows has its own independent EFI - markup, during its installation you need to make the first system invisible - disable its carrier in the settings BIOS , if possible, or hardware. This is not always convenient, and sometimes impossible in the case of laptops.

The second Windows with its own independent boot loader can be installed by programs like or WinToHDD... But they will ask you to tell them the boot EFI -section.

It's very easy to create one on an empty hard disk.

1. Creating an EFI partition on an empty hard disk using the command line

So, we have initialized as GPT medium without markup and data.

We start the command line.

Be sure to do this as an administrator.

We enter in turn:

diskpart lis disk sel disk 1 (instead of 1, specify the number under which the required hard disk is listed above) creat par efi size \u003d 100 format fs \u003d FAT32

lis disk

sel disk 1 (instead of 1 specifies the number under which you denote the hard disk you need)

creat par efi size \u003d 100

format fs \u003d FAT32

In the disk management utility, we see that the second hard disk has EFI -section on 100 Mb... Now we can form a regular section to indicate its type to programs or WinToHDD as a system partition FROM .

2. Creating an EFI partition on an empty hard disk using the Bootice utility

Who doesn't like the command line to create EFI -marking blank media can use the GUI utility. It is free and can be downloaded from any software portal on the Internet. In the main window, select the second hard one. We click.

Then - "Re-Partitioning".

First of all, put a tick GPT in the graph "Partition table type"... Then check the box "Create ESP partition"... And at the top in the graph "Settings" remove all values "Size" except the last... We press "OK".

As a result, we get the disk layout with EFI -section on 128 MB and a partition that contains the rest of the disk space.

But what if the hard drive is not empty? If it has a structure and stored user data. Or we want to restore Windows that has lost its bootable EFI -partition after failure or disconnection of the hard disk, on which its bootloader previously existed. And there are solutions for this case. To restore a system without a bootloader, we naturally need an environment to perform certain operations. In one case, the usual Windows installation media will work. In another case, we will work with a disk space manager, so we need a functional and reliable LiveDisk WinPE... One of these is Sagittarius LiveDisk... Image download site - Sergeistrelec.Ru .

Note: the operations below cannot be performed on discs dynamic type... The disk that is left without the Windows Mirror bootloader must first be converted to a base type. This can only be done by third-party means.

3. Creating an EFI partition at the end of Windows

So, we have, for example, the second Windows, which has lost EFI -loader after a disk break with the first system.

How do I start it? The easiest and fastest way is to create EFI -section at the end of the system partition and re-create the bootloader. You don't need anything more than the command line for this. Boot from the Windows installation media, immediately press Shift + F10. This combination will launch the command line. If we use Sagittarius LiveDisk, we start, respectively, from it.

And already on board we will use the command line.

In it we enter:

diskpart lis vol sel vol 1 (instead of 1, specify the number under which your partition with the system appears above) shrink desired \u003d 100 creat par efi format fs \u003d FAT32

Here is the specified section compressed into 100 Mb and in the vacant place was created EFI -section.

Now we can recreate the bootloader.

On the command line, exit :

That's it - Windows functionality is restored.

4. Creating an EFI partition before Windows

The boot partition usually exists at the beginning of the disk, before the system partition. This does not have to be, but is done to speed up Windows startup. To UEFI found the bootloader faster. On SSD such optimization is unlikely to be tangible, but in the case of HDD you can even compete for a fraction of the performance.

On board Sagittarius LiveDisk we launch. We make a click on the system partition, on the side panel of operations, click "Change of size".

Pull the slider on the map a little to the right so that in the column below "Unoccupied space in front" there were several MB... Next, instead of the drawn number, enter 105 ... To make it work 105 MB... We press "OK".

As a result, the program will free up the correct value of disk space, in our case 102.01 Mb... And leave a little tail behind the section. We press.

We confirm.

Now we launch the command line. And we create EFI -section is exactly the same as described in item 1 articles.

Here EFI -section created.

It remains only to recreate the bootloader as described at the end item 3 articles.

Hello! Windows 8.1 does not boot on a laptop with UEFI BIOS and I can not do anything. When loading, an error appears on the File: \\ EFI \\ Microsoft \\ Boot \\ BCD screen ... I studied all the Internet articles on this topic, but in my case nothing helps.

What has been undertaken by me!

  1. Loaded from the Windows 8.1 installation disk and searched for the installed operating system with the command bootrec / RebuildBcd, an error occurred " Scanning for installed Windows systems completed successfully. Total Windows systems detected: 0»
  2. Deleted a partition (300 MB), an encrypted (EFI) system partition containing all Windows 8.1 bootloader files with the command del vol, then applied Automatic Boot Repair, the system recreates this partition, but does not boot. Making this section active on the command line didn't help either.
  3. I entered commands that are successful, but Windows does not boot.

    bootrec / FixMbr

    bootrec / FixBoot

  4. Also formatted the same partition (300 MB), Encrypted (EFI) with the command format fs \u003d FAT3 and recreated it.
  5. Tried writing a new boot store for Windows 8.1 with the command bcdboot.exe C: \\ Windows, where (C :) is the partition with the installed Windows 8.1 operating system and I get an error againFailed to copy download files.

I don't know what else to do and how to restore the Windows 8.1 bootloader. Can you tell me?

Hello friends! My name is Vladimir and I will answer this question.

If your Windows 8.1 does not boot and you have used all available tools to restore the boot loader, then you can delete the responsible for booting the system: the encrypted (EFI) system partition 300 MB, as well as the MSR partition 128 MB and recreate them.

In Disk Management, you can only see encrypted (EFI) system partition 300 MB, MSR partition 128 MB visible only on the command line when entering a command "Lis par".

Note: If you do not have experience, do not perform this operation unnecessarily, use first the other methods from section about. If you want to experiment on a working laptop, then do not start work without first creating a backup copy of these partitions, but best of all create.

We will delete and recreate partitions:

1. Section (400 MB) containing the Windows 8.1 recovery environment (you can completely get rid of this section and use, if necessary, the recovery environment located on the bootable media with Win 8.1).

2. Section (300 MB) encrypted (EFI) system partition containing all Windows 8.1 boot loader files.

3. Service partition MSR (Microsoft System Reserved) 128 MB, required for partitioning GPT disks.

We boot the laptop from and in the initial window of the system installation press the keyboard shortcut Shift + F10,

a command line window opens, enter the commands:

diskpart

lis dis (lists physical disks).

sel dis 0 (select the laptop hard drive 931 GB, and the second 14 GB drive - bootable USB flash drive Windows 8.1).

lis par (showing all partitions of the selected disk, the first three partitions will be deleted).

sel par 1 (select the first section

del par override (delete the partition, to delete the ESP and MSR partition or the laptop OEM partition, you must specify the override parameter)

sel par 2

del par override

sel par 3

del par override

That's it, we have deleted all three hidden sections.

Now, if you select a disk and enter the lis par command, then we will see only two partitions on the laptop hard disk:

Section 4 - Windows 8.1 Installed

Section 5 is a hidden recovery partition with factory settings.

Create a re-encrypted (EFI) 300 MB system partition, as well as a 128 MB MSR partition

We enter the commands:

diskpart

lis dis (display a list of disks).

sel dis 0 (select laptop hard drive).

create par efi size \u003d 300 (create an encrypted (EFI) system partition 300 MB).

format fs \u003d fat32 (format it to the FAT32 file system).

creat par msr size \u003d 128 (create a 128 MB MSR partition)

Most Windows 7 installations include tiny 100MB partitions called `system Reserved ', also known as MSR or Microsoft System Reserved partition. Throughout the rest of this article, for brevity, I will refer to this section as MSR.

One of the most basic parameters of each air conditioner is its capacity. The capacity of the air conditioner is calculated depending on where you intend to install the equipment or depending on the area of \u200b\u200bthe living space. If you install household air conditioners that are not designed to operate in a large room in terms of power, then in this situation you simply cannot get proper cooling. Since the system will work to the maximum.
Note: Some OEM installations may have the title of this section `system`or even `recovery`... In any case, it will be the ʻActive` section on the same drive as the `C` drive.

Do I have an MSR section?

Some Windows 7 OEM installations do not include an MSR section. To check if you have this partition, run Macrium Reflect and find a partition on your system disk called `System Reserved '.

Note: If the `C` drive is your ʻActive` partition, you just need to back up and restore the` C` drive for a full system recovery.

What does the MSR section do?

The MSR partition handles the second stage of the boot process after the Master Boot Record (MBR). MBR is located on the first sector of the disk and is loaded at system startup, after loading, control is transferred to the section of the boot sector code of the active partition, this is the MSR partition, if it exists on your C drive. MSR contains an ʻoot` directory containing Boot Configuration Data (BCD). BCD controls the next step in the boot process and loads the operating system from the C: drive. An MSR partition is always an ʻActive` partition on the system drive, and must be installed in an ʻActive `partition. The contents of this section will not change, and by default, no drive letter is assigned in Windows, so you cannot change it.

Do I need his image?

The image in the MSR section is necessary for recovering your system in order to move the system to a new disk. However, if you only need to update the system to an earlier date, the MSR recovery partition is not needed, you just need to recover the C drive. This is necessary to restore Windows 7 partitions to the same location for the BCD to still be able to reference them. while loading. If you do a recovery to a new or unformatted drive, and then go to the primary C drive as "primary". The simplest solution is to use DiskRestore to restore both partitions at the same time. DiskRestore - available in Windows PE CD rescuer and can be launched from BartPE if you are running the free edition of Macrium Reflect.

Summary

  • You must create at least one image in the MSR partition if it exists on your system. However, the partition will only take up 100 MB and this is only a small amount to have an image of your entire C disk image.
  • If you want to restore your system to an earlier point, then you just need to restore the `C 'drive (as" primary "not active"), then there is no need to restore the MSR partition.
  • If you are doing a recovery of your system to install it on an empty or unformatted disk, then you should first recover the MSR partition as an "active" partition, then do the recovery of the C drive as primary.