Contacts

EFI section. Creating a bootable GPT section EFI using GDISK on the previous MBR damaged GPT. Creating an EFI section on an empty hard disk at the command prompt

So, you pointed out bIOS settings Download from CD / DVD or from USB, and when downloading from Ubuntu LiveCD received instead of a purple screen with keyboard icons and a little man. Here is a screen:

Nothing terrible, it happens. In this case, you need to consider a number of moments, which will be discussed in this section. By the way, the presence of a purple screen when loading does not mean at all means that you do not have a UEFI, just with a black screen, all the features of UEFI are manifested most bright. So, in any case, read this section will be very useful. In the meantime, you boldly choose the top line "Try Ubuntu WITHOUT INSTALLING" and press ENTER. After a short expectation, you will get to the Ubuntu desktop, and while you're waiting for Ubuntu, let's talk about UEFI.

Introduction to UEFI and GPT

You probably remember that one of the tasks of this manual is to teach the reader effectively and easily use all the basic tools of the system. But for this you need to dig deeper and tell about the hardware stuffing of your computer, and how this filling works with the system. Therefore, again the theory, without it can not do.

What happens when the computer is turned on? First of all, the computer must correctly initialize itself, that is, its own equipment, and transfer the control of the loader of the operating system. Engaged in this process "EXTENSILLE FIRMWARE INTERFACE" ( EFI) (Expandable firmware interface) - interface between the operating system and firmware, controlling low-level equipment functions. Previously, BIOS was answered, and now EFI, which, after another change, began to be called "Unified Extensible Firmware Interface" ( UEFI) - This is the name and will be used in the future. It should be noted that the UEFI is like more modern interfaceFully supports all BIOS functions, the opposite, unfortunately, is not true. In the settings, the BIOS support mode is most often called "Legacy" ("Inherited" or "Traditional" English) or simply "UEFI disabled" ("UEFI is disabled", as it is not difficult to guess). Now, however, we are interested in the included UEFI mode.

So, when turned on uEFI computer begins to initialize the equipment and finds some block device, say, hDD. You probably know that the entire hard disk is almost never used - the disk is necessarily divided into sections, including for ease of use. But you can smash it into sections, today, two standard methods: via MBR or GPT.. What is the difference?

MBR ("Master Boot Record" - the main boot record) Uses 32-bit identifiers for partitions that are placed in a very small piece of space (64 bytes) at the very beginning of the disk (at the end of the first sector of the disk). Because of such a small volume, only four primary sections are supported (it is possible to learn more about this in this article). Since 32-bit addressing is used, then each section may be no more than 2.2 TB. In addition, the boot record has no spare MBR, so if the application restarts the main boot recordThat all information about the sections will be lost.

GPT. ("GUID PARTITION TABLE" - table GUID sections) uses 64-bit identifiers for partitions, so a piece of space in which information about sections is saved, more than 512 bytes, in addition, there is no restriction on the number of sections. Notice, the restriction on the size of the section in this case is almost 9.4 zb (yes, you read everything right - the zettabyte, one with twenty one zero!). And at the end of the disk there is a copy of GPT, which can be used to restore the damaged main partition table at the beginning of the disk.

So, when the connection between the equipment and the operating system is carried out through the included UEFI mode (and not Legacy BIOS), the use of GPT to break partitions is practically compulsoryOtherwise, probably there will be compatibility issues with MBR.

Well, with block devices, it seems to have figured out, the UEFI has all correctly initialized, and now it must find the operating system bootloader and transfer control to it. In the first approximation it looks like this: Since the UEFI is a BIOS successor, it performs the search for the bootloader in strict accordance with established rules. If it finds the operating system bootloader that does not support UEFI, then the BIOS emulation mode is activated (this is the case, even if Legacy BIOS is clearly not specified). And it starts all first, with the only difference that now emulated BIOS checks the condition of the equipment and loads firmware - simple drivers For individual hardware components. Thereafter emulated Bios again performs the search for OS bootloader and activates it. The one, in turn, loads the operating system or displays the list of available OS.

And in the case of UEFI, everything is somewhat different. The fact is that the UEFI has its own bootloader. operating systems with integrated launch managers installed OS. To this end, for it - for the UEFI boot, a small section should be created on the disk (100-250 MB), which is called "Extensible Firmware Interface System Partition" ( system section expandable firmware interface, ESP.). Besides specified sizeThe section must be formatted in the FAT32 file system and be bootable. It contains hardware components drivers to which the running operating system can access. And in this case, the download occurs right from this section, which is much faster.

So, let's summarize some results: to complete the use of the UEFI functionality, the disk should be with GPT, and it must be a special ESP partition. Pay attention to the phrase "so that full Enter functionality "- There are a lot of ways to install Ubuntu on a system with" trimmed "to one degree or another UEFI, and they all depend on the presence or absence of pre-installed operating systems on your computer. For example, you want to leave the pre-installed Windows. What kind of windows - "seven" or new-fashioned 8.1? Or maybe you, do not let God, have been installed "Perat Windows", activated with MBR, and not wanting to run with GPT, and you, however, do you want to study it? In addition, it is very much depends on the discharge of operating systems - without dancing with a tambourine, a 32-bit system is forced to work with UEFI. And there are many such examples. Therefore, in this section will only come about the installation of Ubuntu in the "Maximum Full" mode uEFI featuresAlthough even after reading this introduction, you can already represent the device of your computer and, if desired, implement your own installation scenario.

Well, let's start?

Disc markup

So, you booted to Ubuntu with LiveCD in uEFI mode. Open the "Gparted section editor", but for now let's talk about the very important features that you need to pay attention to.

The most important thing is that you have to have a plan of your actions, believe me - the list of steps and the order of their execution is quite extensive, so it is advisable to write down somewhere on paper the main points of the plan and periodically taste with them. So what do you know. For the normal Ubuntu installation in the UEFI mode, the hard disk of your computer must be properly prepared, namely:

    The disk must be with GPT;

    The disk must have a special ESP section;

    There should be standard partitions on the disk: system, paging, as well as a section for a home catalog.

In addition, you need to decide on operating systems on your computer - whether the Ubuntu will be the only system, or there will be other UEFI system support and installation next to it, it depends on.

Let's start with an answer to the second question: about the presence of other operating systems. If there are already operating systems that support the download in UEFI mode (for example, Windows 8), and you do not intend to abandon them, then the first two points of the plan have already been completed: the ESP section is probably already there, well, the disc, of course, With GPT. Let's check that this is true.

Suppose, after starting the Gparted sections editor, you will find this window:

What information can be obtained with a careful study of this window? First, look at the column " File System"(" File System "): All partitions are formatted in NTFS, except for one partition with FAT32 file system - it seems to be the ESP section. The disk already installed Windows 8 (Section / Dev / SDA4 - in Windows is a C :) drive - about it label disk (column "Label"). Secondly, on the hard disk there are a number of Windows service partitions - it is possible to learn about it not only by marks (Winre_DRV and LRS_ESP), but also by flags (Column "Flags") - all these sections are hidden, since they have the Hidden flag installed, which hints at the special nature of the information on them. And finally, take a look at the / dev / sda5 section - you accidentally have not lost the D: in Windows? Here it is, safe and preservation.

So, the first two points of the plan have already been executed, and the implementation of the third item: Creating partitions for Ubuntu - is described in sufficient detail in the example of using Gparted to overshow a hard disk. Recall briefly that from the disk with the data (in the example of this / DEV / SDA5, or D: In Windows), you need to "cut" enough space and on its place to create three partitions: swaps, system and partition for a home directory. Note also that your drive is GPT, so the extended partition containing logic discs, he does not have, consequently, when creating sections, choose PRIMARY PARTITION. ("Main section").

Do not perform any operations with Windows service sections - they are intended for the normal functioning of this OS. Random or deliberate change of these sections is guaranteed to cause problems in Windows, up to its complete inoperability.

As a result, something like this similar to this image should be obtained:

Here are additionally created sections:

Please write down the destination of the sections. In the example shown:

    / dev / sda2 - Section EFI (ESP)

    / dev / sda6 - System section (section for "root" system)

    / dev / sda7 - section Podkachock

    / dev / sda8 - Section for user data.

This information is very useful in the future install Ubuntu.because because of large number Partitions can be very easy to get confused and assign the required mount point that "digit".

Nevertheless, we continue to work with the editor Gparted. Your task is to delete all sections and create a disk configuration required for Ubuntu. To do this, you can click on the right mouse button on each of the sections and select from the drop-down menu item "Delete". But it is better to do differently: find the "Device" editor menu on the menu panel and select "CREATE PARTITION TABLE ..." in the menu (create partition table ...). Warning will appear:

Warning: This Will Erase All Data On The Entire Disk / Dev / SDA

(ATTENTION: This will delete all data on all disc / DEV / SDA)

Do not worry, did you take care of backup copies? Look just below - on the inscription "Advanced" (details). Click the triangle on the left and select GPT in the menu:

All disk space will become gray. Click on it with the right mouse button and start creating the necessary partitions by selecting "New" from the drop-down menu. The first of the new partitions is a special ESP section required, as you remember, for UEFI. Since it is formatted in a non-Linux file system for the Linux, and moreover, it must be bootable, it is necessary to place it at the beginning disk space. Determine the size in the field "NEW SIZE (MIB)" (new size in MIB) 100 MB, and file System - FAT32:

In the same way, create partitions for future: systemic (15 GB with an EXT4 file system), a section of the paging (4 GB with Linux-SWAP) and for a home directory (the remaining space in ext4). As you remember, Gparted applies changes not immediately, but simply puts them in a queue for execution. Therefore, click on the Green Tick "Apply All Operations" (perform all operations):

Yes, it is not necessary to manage the download flags at this stage - the Ubuntu installer will perform everything as it should. And now carefully read about how to install Ubuntu, and, as you will be ready, will continue.

Installing Ubuntu.

After such preparatory work, the Ubuntu installation will not cause difficulties, especially if you carefully read the installation rules. Just get a piece of paper with a list of partitions and note that for a special EFI section (/ dev / sda2 from the example of a joint installation of Ubuntu and Windows) you need to accurately assign a property eFI boot partition, not a backup boot area BIOS:

If you do not, the installer will show you such a notice:

Correct the error, and if it does not work, exit the installer, start the Gparted editor and check that everything that is told above is executed.

Assignments for all other partitions required when installing Ubuntu are described very detailed in this section, so there is no particular sense to stop at this detail.

Possible problems

Sometimes it happens that after installation, one of the operating systems pre-installed on the computer is not started. Well, without going into rather complicated ways to bring in just normal, we note that there is a comprehensive solution possible problems With download. The name of this decision is Boot-Repair. .

This small program is a very powerful tool that allows you to correct almost all errors that may occur when downloading Ubuntu and other operating systems after installation.

Adhere to the Golden Rules: " Never repair what has not yet broke»!

Load in Ubuntu. It does not matter how you do it - boot-repair works both with LiveCD and on the installed system. Of course, if you are experiencing difficulties with the download of just supplied by Ubuntu, then the first method becomes the only one. To start the boot-repair you need to put on your computer, it is done using the terminal. Press Ctrl + Alt + T and in the window that appears type:

: Change the command closer to the release of the release.

Sudo Add-APT-Repository "DEB http://ppa.launchpad.net/yannubuntu/boot-repair/ubuntu Saucy Main"

Now you, of course, say: "What are you there, quite? So many letters - I do not understand anything and be sure to make me! " Of course, no one submitted to the spelled command to the terminal does not enter - simply select it completely and click the middle mouse button in the terminal window, or drag the selected text there. Press ENTER. If you are in the already installed Ubuntu, an offer to enter your password will appear. Note, when entering the password, no characters are displayed: no point nor the stars - nothing, it is probably not necessary to explain why this is done. After entering the password, press ENTER again.

Load open key Repository with a program from trusted key storage:

Sudo Apt-Key Adv --Keyserver Keyserver.ubuntu.com --recv-Keys 60D8DA0B

Update the list of applications with a command:

Sudo Apt-Get Update

Install and run Boot-Repair:

Sudo Apt-Get Install -Y Boot-Repair && (Boot-Repair &)

After a short scan, the Boot-Repair window will appear:

: In the process of writing.

Hello! Windows 8.1 is not loaded on a laptop with the BIOS UEFI and I can not do anything. When downloading, an error comes out on the File screen: \\ EFI \\ Microsoft \\ Boot \\ BCD ... All Internet articles on this topic studied, but in my case nothing helps.

What was taken by me!

  1. Loaded by S. installation disk Windows 8.1 and search for installed operating system team bootRec / RebuildBCD., I got a mistake " Scanning installed systems Windows completed successfully. The total number of Windows detected systems: 0»
  2. Removed section (300 MB), encrypted (EFI) system partition containing all Windows 8.1 bootloader files command del Vol., then applied Automatic recovery Downloads, the system re-creates this section, but not loaded. Did this section active in command line, also did not help.
  3. I introduced the teams that pass successfully, but Windows does not load.

    bootrec / fixmbr

    bootRec / FixBoot

  4. Also formatted the same section (300 MB), encrypted (EFI) command format FS \u003d FAT3 and created it again.
  5. I tried to write for Windows 8.1 a new bracket storage team bCDBoot.exe C: \\ Windows, where (C :) section with the installed operating windows system 8.1 and I have a mistake againFailure when copying download files.

What else to do and how to restore the Windows 8.1 bootloader do not know. Can you tell me?

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

If your Windows 8.1 is not loaded and you used all the available bootloader to restore, you can delete the responsible system loading: encrypted (EFI) system section 300 MB, as well as section MSR 128 MB and create them again.

In drive control, you can only see encrypted (EFI) system partition 300 MB, section MSR 128 MB is visible only on the command line when entering the command "LIS PAR".

Note: If you do not have experience, do not make this operation without appropriate, use other methods from the Other methods. If you want to experiment on a working laptop, then do not proceed to work without prior creation backup Section data, and best create.

We will delete and create re-sections:

1. Section (400 MB) Wednesday windows restoration 8.1 (from this section and can be delivered at all and use the restoration environment bootable media with Win 8.1).

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

3. MSR service section (Microsoft System Reserved) 128 MB, mandatory for Marking of GPT discs.

Download a laptop with and in the initial system installation window, click the keyboard combination SHIFT + F10,

a command prompt window opens, enter the commands:

diskpart.

lIS DIS (displays a list of physical disks).

sEL DIS 0 (choose a hard disk of a laptop 931 GB, and the second drive 14 GB - boot flash drive Windows 8.1).

lIS PAR (Show all sections of the selected disk, the first three sections will be deleted).

sEL PAR 1 (choose the first section

del Par Override (delete the section to delete the ESP and MSR partition or the OEM laptop OEM partition, you must specify the Override parameter)

sEL PAR 2.

del Par Override

sel Par 3.

del Par Override

Everything, all three hidden partitions we removed.

Now, if you choose a disk and enter the LIS PAR command, we will see only two sections on the hard disk of the laptop:

Section 4 - installed Windows 8.1

Section 5 is a hidden recovery section with factory settings.

Create a newly encrypted (EFI) system section 300 MB, as well as section MSR 128 MB

We enter the commands:

diskpart.

lIS DIS (withdraw a list of disks).

sEL DIS 0 (choose a hard disk of the laptop).

cREATE PAR EFI SIZE \u003d 300 (Create an encrypted (EFI) system section 300 MB).

format FS \u003d FAT32 (format it in the FAT32 file system).

creat Par MSR SIZE \u003d 128 (Create a section MSR 128 MB)

Thus, this is a matter of sister in my previous partition to the UEFI loader. Deviation for UEFI bootloader, can I use LVM?

Disclaimer: I do not talk about data. Windows 8 may die on fire.

Following the instructions, I have one 400-megabyte device, which, as I think, was previously partitioned by Microsoft Reserved (I believe that this is a MBR section?). Before I realized that I needed to do, I deleted an existing partition using the FDISK utility and created the MBR section with the EXT4 file system and rebooted to change the changes to enhance.

Then I realized that it would not work for the UEFI firmware, firmware, such a hipster and stunning that it should be different in all respects. GDISK This time I entered Gdisk and searched the sections, and did not find any one. I created a new GUID section on this device 400 MB with correct code EFI type EF00. It turned out to be successful, so I created FAT32 file system, MKFS -T FAT32 / DEV / SDA1 and it was successful.

I completed all the instructions for installing Arch Linux from a bootable setting CD, which was loaded in UEFI mode, which I could add. I reached the point that I installed the gummiboot to the system, and he immediately told me that my SDA1 device is not a proper EFI section. Thoroughly confusing, I made GDisk -L on the device and found that he determined that section GPT. Damaged, and the MBR still exists.

Partition Table Scan: MBR: MBR ONLY BSD: Not Present APM: Not Present GPT: Damaged

Then he presented three options: MBR, GPT or pure GPT. I chose GPT, thinking that it will remove the MBR partition tables, but it does not matter.

Realizing that I still do not know, and I do not know how to create a proper GPT section of the existing section MBRI spent Quick Analyze on Testdisk and everything looks good and green. The TestDisk utility recognizes this as the correct boot section EFI in all respects.

I would like to repair the GPT section, if possible, so I can avoid all the steps to install and configure, starting with my ARCH installation. If it is impossible, and I need to destroy this section and start with it, can I save the data that was already installed here and manually add them back after I fixed the boot partition?

One Solution Collect Form Web for "Creating a bootable GPT partition EFI using GDISK on the previous MBR damaged GPT"

Designation Ubuntu UEFI Community Wiki. The same rules are applied regardless of distribution.

Creating an EFI section

If you manually share your disc in the Ubuntu Installer, you need to make sure that you have the EFI section.

  1. If you already have an EFI section on your disk (for example, if you have Windows8 installed on your computer), it can also be used for Ubuntu. Do not format it. It is strongly recommended to have only one EFI section on the disk.
  2. EFI section can be created using latest version Gparted (version Gparted, included in Disk 12.04, in order. Note: I turned on the link to Gparted LiveCD) and must have the following attributes:

    • Mounting point: / boot / efi (Note: No need to install this mount point when using manual partition, the Ubuntu installer will detect it automatically)
    • Size: minimum 100MIB. 200MIB recommended.
    • Type: FAT32.
    • Other: BOOT flag required.

See this screen shot, which will give you an idea of \u200b\u200bthe layout. (Notification / dev / sda1, I apologize for relying on the Ubuntu snapshots again.) You can create this section by changing the size of your arches if necessary. It is also a layout for OSX, so if you want a double boot using Win8, you would combine SDA2 and SDA3 from the screenshot below in 1 section of the NTFS type, and then SDA4, SDA5 and SDA6 will be used for Arch.

As for LVM.

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

As soon as we turn on the computer, a miniature operating system is immediately started to work, which we know as BIOS. It is engaged in testing devices, memory, loading operating systems, distribution of equipment resources. Many of the functions of this programset (their volume is usually about 256-512 KB) allow you to maintain old operating systems like MS-DOS, providing them with many possibilities. Since the PC / AT-8086, BIOS changed very little, and by the time of the launch of the first pentiums, its development almost stopped. Actually, there was nothing to change in it, except for double BIOS, support for network funds and the possibility of flashing. But there are many minuses: the starting entrance to real mode Processor, 16-bit addressing and 1 MB of available memory, the inability to have a "repair" console. And of course, eternal problem Support hard disks. Even now, wheels up to 2.2 TB are guaranteed, no more.

Intel decided to change the BIOS on EFI / UEFI (UNIFIED EXTENSILE FIRMWARE INTERFACE) in 2005. EFI system - A more advanced basic operating system. On some UNIX platforms and Windows UEFI. It has long been working, but the mass transition has not yet been accomplished, despite the good intentions. And they are as follows:

  • The presence of the notorious console for repairing system parameters and OS installations;
  • Section EFI makes it possible to make some actions without downloading OS (watching movies, launching music);
  • Internet access and, therefore, availability installed drivers network, TCP / IP stack, etc.);
  • The presence of graphic regime and custom scripts;
  • Support for gigantic discs;
  • UEFI storage on the sections of the new format (GPT);
  • Full support for all equipment from the moment of start.

UEFI can use a universal executing machine like JVM to use hardware-independent code, and this opens up huge horizons to create a "bootable" software.

There is also the criticism of this technology. In particular, it can be introduced to cut off from the market of operating systems of new players: for this there is always some technological loophole in the code. As, for example, the inability to upload Windows 98 from modern BIOS. But what is worse, you will have to forget about millions of MS-DOS programs and other systems that relied in their work on the BIOS function. Perhaps they will still be emulated, but there are doubts about it. And among them, there are certainly important programs that no one will rewrite. However, all these issues are solved - at least at the expense of virtual operating systems. But here's the fact that new types of viruses will appear - this is exactly, and we will be able to see it quite soon.



Did you like the article? Share it