Efi partition on disk. What is an EFI system or UEFI partition? Computer help at Serty. One Solution collect form web for “Creating an EFI bootable GPT partition with gdisk on a previous MBR, corrupted GPT”

  • 02.07.2020

As soon as we turn on the computer, it immediately starts running a miniature operating system that we know as the BIOS. She is engaged in testing devices, memory, loading operating systems, allocating hardware resources. Many of the features in this suite of programs (typically around 256-512 KB) support older operating systems like MS-DOS, giving them many options. 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 for a dual BIOS, support for network facilities and the possibility of flashing. But there are many drawbacks: starting entry into the real mode of the processor, 16-bit addressing and 1 MB of available memory, the impossibility of having a "repair" console. And, of course, the eternal problem of hard drive support. Even now, drives 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. On some Unix and Windows platforms, UEFI has been around for a long time, but the massive transition has yet to take place, despite good intentions. And they are as follows:

  • The presence of the notorious console for repairing system parameters and installing the OS;
  • The EFI section makes it possible to perform some actions without loading the OS (watching movies, starting music);
  • Login to the Internet and, therefore, the presence of installed network drivers, TCP / IP stack, etc.);
  • Presence of graphics mode and custom scripts;
  • Support for giant disks;
  • Storing UEFI on new format (GPT) partitions;
  • Full support for all hardware from the start.

UEFI can use a general-purpose runtime machine like the JVM to use device-independent code, which opens up huge horizons for creating "bootable" software.

There is also criticism of this technology. In particular, its implementation can lead to cutting off new players from the operating system market: there will always be some kind of technological loophole in the code for this. Like, for example, the inability to boot Windows 98 from modern BIOS. Worse, you 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 that. And among them there are certainly important programs that there will be no one to rewrite. However, all these are solvable issues - at least due to virtual operating systems. But the fact that new types of viruses will appear is for sure, and we will be able to see it pretty soon.

So this is a sister question from my previous question about partitioning for the UEFI bootloader. Deviation for UEFI bootloader, can LVM be used?

Disclaimer: I am not talking about data. Windows 8 could die on fire.

Following the instructions, I have one 400MB device, which I believe was previously a Microsoft Reserved partition (I believe this is an MBR partition?). Before I knew what I needed to do, I deleted the existing partition using fdisk and created an ext4 MBR partition and rebooted for the changes to take effect.

Then I realized it wouldn't work for UEFI firmware, firmware so hipster and awesome that it has to be different in every way. gdisk this time i went into gdisk and searched for partitions and found none. I created a new GUID partition on this 400MB device with the correct EFI code of type EF00. This turned out to be successful, so I created a FAT32 file system, mkfs -t fat32 / dev / sda1 and it was successful.

I followed all of the instructions for installing Arch Linux from a bootable installation CD that was booted in UEFI mode, which I could add. I got to the point where I installed gummiboot on the system and it immediately informed me that my sda1 device was not a proper EFI partition. Thoroughly confusing, I did gdisk -l on the device and found that it determined that the GPT partition was corrupted and the MBR partition was still there.

Partition table scan: MBR: MBR only BSD: not present APM: not present GPT: damaged

He then presented three options: MBR, GPT, or pure GPT. I chose GPT thinking it would drop the MBR partition tables, but that doesn't matter.

Realizing that I still don't know and don't know how to create a proper GPT partition from an existing MBR partition, I ran Quick Analyze on testdisk and everything looks good and green. The testdisk utility recognizes this as a valid EFI boot partition in every way.

I would like to fix the GPT partition if possible, so I can avoid all the installation and configuration steps starting with my Arch installation. If this is not possible and I need to destroy this partition and start from there, can I save the data that was already set here and manually add it back after I fixed the boot partition?

One Solution collect form web for “Creating an EFI bootable GPT partition with gdisk on a previous MBR, corrupted GPT”

Ubuntu UEFI Community Wiki. The same rules apply regardless of distribution.

EFI partition creation

If you are manually partitioning your disk in the Ubuntu installer, you need to make sure you have an EFI partition configured.

  1. If your disk already has an EFI partition (for example, if your computer has Windows8), it can also be used for Ubuntu. Don't format it. It is highly recommended to have only one EFI partition per disk.
  2. The EFI partition can be created with the latest version of GParted (the version of Gparted included in the 12.04 disk is fine. Note: I have included a link to the GParted LiveCD) and must have the following attributes:

    • Mount point: / boot / efi (note: there is no need to set this mount point when using manual partitioning, the Ubuntu installer will detect it automatically)
    • Size: at least 100Mib. 200MiB recommended.
    • Type: FAT32
    • Other: the "boot" flag is required.

See this screenshot to give you an idea of ​​the layout. (Notice / dev / sda1, I apologize for relying on the Ubuntu snapshots again.) You can create this partition by resizing your arch if needed. This is also a layout for OSX, so if you wanted to dual boot with Win8, you would combine sda2 and sda3 from the screenshot below into 1 ntfs type partition, and then sda4, sda5 and sda6 will be used for Arch.

As for LVM

I believe LVM can be used, but experience will dictate that the EFI partition and mount point you create cannot exist within a volume group and should not exist as a volume. To keep your EFI partition "clean", create a partition that is not part of any LV.

I got a strange hard drive, it seems there was a linux or MacOS. I deleted all partitions, but one, using standard tools (Disk Utility and Disk Management), could not be 200 meters away.

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

Delete EFI Encrypted Partition in Windows 7 you can use the console program diskpart.

1. Run cmd as administrator

2. Enter in cmd - diskpart... Will start diskpart 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 - deletes all partitions or volumes on the disk
list partition - check that all partitions are deleted

4. Check the result in Disk management.

5. All sections are deleted.

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

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. It was loaded from the Windows 8.1 installation disk and searched for the installed operating system with the command bootrec / RebuildBcd, an error occurred " The scan 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 pass successfully, but Windows does not boot.

    bootrec / FixMbr

    bootrec / FixBoot

  4. Also formatted the same partition (300 MB), Encrypted (EFI) with the command format fs = 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 used all the 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 o. 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 drive:

Section 4 - installed Windows 8.1

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

Enter the commands:

diskpart

lis dis (display a list of disks).

sel dis 0 (select laptop hard drive).

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

format fs = fat32 (format it to FAT32 file system).

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

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 the boot EFI are created automatically if the computer is in BIOS UEFI... But if Windows needs to be installed in a different 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 that is on the first disk.

What makes the second Windows vulnerable is that it cannot 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-chapter.

It is 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 on behalf of the administrator.

We enter one by one:

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 = 100 format fs = 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 = 100

format fs = 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 WITH .

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 check mark GPT in the graph "Partition table type"... Then put a check mark "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 disk 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 the 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 LiveDisk Sagittarius... 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. This does not require anything more than the command line. Boot from the Windows installation media, immediately press Shift + F10. This combination will launch the command line. If we use LiveDisk Sagittarius, 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 = 100 creat par efi format fs = FAT32

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

Now we can recreate the bootloader.

On the command line, exit :

That's it - Windows functionality is restored.

4. Creating an EFI partition in front of 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 LiveDisk Sagittarius 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, we 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 small 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 is created.

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