This section is the system efi. How to manually create a bootable Windows EFI partition on a GPT disk. How did he appear

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 strongly 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 volume 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.

    Before the operating system starts loading, specialized computer software initializes all components, checks their readiness for operation, and only then transfers control to the OS loader.

    Previously, a set of BIOS programs was used for these purposes, but this standard is now considered obsolete, and it has been replaced by UEFI technology, which supports secure boot, has a nice graphical configuration interface and many other advantages. Most modern motherboards and laptops are already available with UEFI. In this article we will look at how to install Linux on UEFI and what problems you may encounter.

    This is an option for owners of UEFI cards who do not want to understand the intricacies of using this technology and agree to use their device as before with the BIOS. Most motherboards allow you to emulate BIOS mode. In this mode, you can install Linux without any problems and additional partitions, as it was done in the BIOS.

    To enable Legasy BIOS mode, you need to enter the BIOS/UEFI settings using the F2, Del or Shift+F2 button and find the corresponding item there. For example, for me this item is on the Boot tab. Here you need to select UEFI or Legasy boot mode.

    After saving your settings, you can install your operating system as usual. If you are not satisfied with this option, then we will look at how to install Linux on UEFI.

    Installing Linux on UEFI boards

    I will look at installation using Ubuntu as an example, but all steps are similar for other distributions. First you need to burn the disk image to a flash drive. Most distributions already support UEFI booting.

    Step 1: Burn Linux to UEFI Flash Drive in Linux

    To write an image to a flash drive in Linux, it is better to use the Etcher utility. The program will write media that can be booted into both UEFI and a regular system. After starting the program, you need to select the system image:

    Then the memory card and wait for the recording to complete:

    You can also write the image to a flash drive manually. This is easier than for a regular BIOS, although it will require more steps. First, format your media to FAT32. This can be done in the standard Gnome Disk Management utility:

    Then unzip the contents of the installation image to the root of the flash drive:

    sudo mount /path/to/image.iso /mnt
    sudo mount /dev/sdb1 /media/flash/
    sudo cp -r /mnt/* /media/flash

    Here /dev/sdb1 is the name of the partition of your flash drive. You can do all these steps in the file manager. It is not necessary to use commands. Next, you need to install two flags on the partition of the flash drive where you unpacked your files - boot and lba. This can be done using Gparted. Just run the program, select your flash drive in the list of disks:

    Right-click on the partition, select Manage Flags and check the boxes next to the boot and lba flags.

    Whatever method you use, your flash drive is ready and you can boot from it. Most Linux images already contain an EFI bootloader and the computer's firmware will find it the next time it reboots.

    Step 1 (alternative). Burning Linux to a UEFI flash drive in Windows

    If you decide to burn Linux on Windows, then it is better to use the Rufus utility. It is necessary to set the following parameters:

    • Partition layout and system interface type: GPT for computers with UEFI;
    • File system: FAT32.

    All other parameters are default. Once recording is complete, your flash drive is ready for use.

    Step 2: Select Boot Order

    In order for your system to boot from the flash drive you just recorded, you need to disable UEFI Secure Boot. This mode allows only signed operating systems to boot, and only Microsoft operating systems are signed. Therefore, for Linux this mode must be disabled. I also have this setting on the Boot tab:

    In addition, you need to install the flash drive in the first place:

    After this, you can restart your computer and begin installation. If you see a window like this, then everything is fine. Here you need to select "Try Ubuntu without installing", this is a prerequisite:

    I will not describe all the installation steps that need to be completed, they are no different from installing a regular OS, the only difference is installing the bootloader and disk partitioning. We will dwell on it further.

    Step 3. Disk partitioning for UEFI

    UEFI has several differences from BIOS in this regard. The first is the use of a GPT disk partition table. This is a new technology that has many advantages over MBR, including a very large number of primary partitions (MBR has only four), recovery from damage, and much more. Read more about this in a separate article. The second difference is that the operating system boot loader files are no longer stored in the first 512 bytes of the hard drive. All of them are stored on a separate partition called ESP.

    Before clicking "Install Ubuntu" it is advisable to prepare the disk using Gparted. Open the utility from the main menu of the image. Then select Device -> Create Partition Table:

    Select GPT partition table from the list:

    Step 4: Create an ESP partition

    In Gparted we only need to create an ESP partition for UEFI. To do this, select "Unnoticed", and then right-click on it and select "New":

    You must select FAT32 as the file system for the partition, size - 100 megabytes. Next, click the "Apply" button to apply the changes.

    Then click "Manage Flags" and check the boxes next to the "boot" and "efi" flags.

    Step 5. Disk partitioning option

    When the system prompts you to select a markup method, you can let the system mark everything up automatically. But this is only if you do not already have any operating system installed. Otherwise, select “Custom option”:

    Step 6. Assigning partitions

    If you chose a different layout option, a menu will open in front of you with a list of all sections. Find the "Bootloader installation device" at the bottom of the window and select the EFI partition from the list.

    Then click on the EFI partition in the list and select "EFI System Partition":

    You can then continue the installation as usual. You need to create a root partition, and you can optionally create a bootloader, swap, and home partition. You can read more about installing Ubuntu 18.04 at.

    Step 7: Complete installation

    Once all the files are unpacked and the bootloader is installed, the Linux installation on UEFI is complete, you can reboot your computer and use your system as usual.

    But let's also look at managing menu items and EFI boot loaders.

    Managing UEFI Bootloader with eifbootmgr

    When the system boots you can display the default UEFI settings by running the command:

    Let's take a closer look at what each of the parameters means:

    • BootCurrent - the bootloader that was used to start this operating system;
    • BootOrder - the order of bootloaders in which the boot manager will sort them out during system startup. If the first bootloader does not work, the second one will be used and so on;
    • BootNext - bootloader that will be launched at the next boot;
    • Timeout - timeout during which the boot loader selection menu will be shown before it is selected automatically;
    • Items 0000 - 0004 are loaders that can be used.

    You can change the boot order using the -o option, for example, let's make the OS from the optical disk boot first:

    sudo efibootmgr -o 0,1,2,3

    And let's put Ubuntu back in first place:

    sudo efibootmgr -o 3,0,1,2

    You can change the timeout to display the system selection menu:

    sudo efibootmgr -t 20

    Here we have set the timeout to 20 seconds.

    conclusions

    In this article, we looked at how to install Linux on UEFI, as well as how to manage the boot order on the installed system. Now, if you want to install this operating system on your new laptop with EFI, then you already know how to do it. If you have any questions, ask in the comments!

    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.

    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, 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. 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 like this:

    • 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.

    So, you specified boot from CD/DVD or USB in the BIOS settings, and when booting from Ubuntu LiveCD, instead of a purple screen with icons of a keyboard and a man, you received this screen:

    It's okay, it happens. In this case, you need to take into account a number of points, which will be discussed in this section. By the way, the presence of a purple screen during boot does not mean that you do not have UEFI; it’s just that with a black screen all the features of UEFI are most clearly visible. So, in any case, reading this section will be very useful. In the meantime, feel free to select the top line “Try Ubuntu without installing” and press Enter. After a short wait, you'll be taken to the Ubuntu desktop, and while you wait for Ubuntu to load, let's talk about UEFI.

    Introduction to UEFI and GPT

    You probably remember that one of the objectives of this manual is to teach the reader to use all the main tools of the system effectively and easily. But to do this, you need to dig deeper and talk about the hardware of your computer, and how this hardware works with the system. Therefore, again there is a theory, you cannot do without it.

    What happens when you turn on your computer? First of all, the computer must correctly initialize itself, that is, its own hardware, and transfer control to the operating system loader. This process is handled by the Extensible Firmware Interface (EFI) - an interface between the operating system and the firmware that controls low-level hardware functions. Previously, BIOS was responsible for this, and now EFI, which, after another change in the standard, became known as “Unified Extensible Firmware Interface” (UEFI) - this name will be used in the future. It should be noted that UEFI, as a more modern interface, fully supports all BIOS functions; the opposite, unfortunately, is not true. In the settings, the BIOS support mode is most often called “Legacy” (“legacy” or “traditional” in English) or simply “UEFI Disabled” (“UEFI disabled”, as you might guess). For now, however, we are interested in the enabled UEFI mode.

    So, when you turn on the computer, UEFI begins to initialize the hardware and finds some kind of block device, say, a hard drive. You probably know that the entire hard drive is almost never used - the disk is necessarily divided into sections, including for ease of use. But today you can split it into partitions in two standard ways: using MBR or GPT. What is their difference?

    MBR (Master Boot Record) uses 32-bit identifiers for partitions, which are located 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). Due to such a small volume, only four primary partitions are supported (you can learn more about this in this article). Since 32-bit addressing is used, each partition can be no more than 2.2 TB. Additionally, the boot record does not have any spare MBR, so if an application overwrites the master boot record, all partition information will be lost.

    GPT (“GUID Partition table”) already uses 64-bit identifiers for partitions, so the piece of space in which information about partitions is stored is already more than 512 bytes, in addition, there is no limit on the number of partitions. Note that the limit on the partition size in this case is almost 9.4 ZB (yes, you read everything correctly - a zettabyte, one followed by twenty-one zeros!). And at the end of the disk there is a copy of GPT, which can be used to restore a damaged master partition table at the beginning of the disk.

    So, when communication between the equipment and the operating system is carried out through the enabled UEFI mode (and not Legacy BIOS), the use of GPT for partitioning is almost mandatory, otherwise compatibility problems with the MBR will likely arise.

    Well, it seems that the block devices have been sorted out, UEFI has initialized everything correctly, and now it should find the operating system bootloader and transfer control to it. To a first approximation, it looks like this: since UEFI is the successor to the BIOS, it searches for the bootloader in strict accordance with the established rules. If it finds an operating system bootloader that does not support UEFI, then BIOS emulation mode is activated (this is true, even if Legacy BIOS is not explicitly specified). And it all starts all over again, with the only difference that now emulated The BIOS checks the hardware status and loads firmware - simple drivers for individual hardware components. After that emulated The BIOS again searches for the OS boot loader and activates it. That, in turn, loads the operating system or displays a list of available operating systems.

    But in the case of UEFI, everything happens a little differently. The fact is that UEFI has its own operating system loader with integrated launch managers for installed OSs. For this purpose, for it - for the UEFI bootloader - a small partition (100–250 MB) must be created on the disk, which is called “Extensible Firmware Interface System Partition” (extensible firmware interface system partition, ESP). In addition to the specified size, the partition must be formatted in the FAT32 file system and be bootable. It contains drivers for hardware components that can be accessed by the running operating system. And in this case, the download occurs directly from this section, which is much faster.

    So, let's summarize: in order to fully use the UEFI functionality, the disk must be GPT, and it must have a special ESP partition. Pay attention to the phrase “in order to fully utilize the functionality” - there are many ways to install Ubuntu on a system with “stripped-down” UEFI to one degree or another, and they all depend on the presence or absence of pre-installed operating systems on your computer. For example, you want to leave Windows pre-installed. Which Windows - “Seven” or the newfangled 8.1? Or maybe, God forbid, you have “Peratian Windows” installed, activated with MBR, and does not want to run with GPT, and you, nevertheless, want to study it further? In addition, a lot depends on the bit depth of the operating systems - without dancing with a tambourine, it is impossible to make a 32-bit system work with UEFI. And there are quite a lot of such examples. Therefore, in this section we will only talk about installing Ubuntu in the “maximum full” mode of using UEFI capabilities, although even after reading this introduction, you will already be able to imagine the device of your computer and, if desired, implement your own installation script.

    Well, shall we get started?

    Disk partitioning

    So, you booted into Ubuntu from a LiveCD in UEFI mode. Open the “GParted Partition Editor”, but for now let’s talk about very important features that you need to pay attention to.

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

      The disk must be GPT;

      The disk must have a special ESP partition;

      The disk must have standard partitions: system, swap, and a partition for the home directory.

    In addition, you need to decide on the operating systems on your computer - whether Ubuntu will be the only system, or whether there will be other systems supporting UEFI mode nearby, will determine the layout and installation plan.

    Let's start by answering the second question: about the availability of other operating systems. If your computer already has operating systems that support booting in UEFI mode (for example, Windows 8), and you do not intend to give them up just yet, then the first two points of the plan have already been completed: the ESP partition probably already exists, and the disk, of course, with GPT. Let's check that this is indeed the case.

    Let's assume that after launching the GParted partition editor, the following window opens:

    What information can be obtained by carefully studying this window? First, look at the "File System" column: all partitions are formatted in ntfs, except for one partition with a fat32 file system - this appears to be the ESP partition. Windows 8 is already installed on the disk (partition /dev/sda4 - in Windows this is drive C:) - this indicates label disk (column “Label”). Secondly, there are a number of Windows service partitions on the hard drive - you can find out about this not only by the labels (WINRE_DRV and LRS_ESP), but also by flags(Column "Flags") - all of these sections are hidden because they have the hidden flag set, which hints at the special nature of the information on them. And finally, take a closer look at the /dev/sda5 partition - have you accidentally lost the D: drive in Windows? Here he is, safe and sound.

    So, the first two points of the plan have already been completed, and the implementation of the third point: creating partitions for Ubuntu is described in sufficient detail in the example of using GParted to repartition a hard drive. Let us briefly remind you that you need to “cut off” sufficient space from the data disk (in the example this is /dev/sda5, or drive D: in Windows) and in its place create three partitions: swap, system and a partition for the home directory. Please also note that your disk is GPT, so it does not have an extended partition containing logical disks, therefore, when creating partitions, select Primary partition.

    Do not perform any operations with Windows service partitions - they are intended for the normal functioning of this OS. Accidental or deliberate modification of these partitions is guaranteed to lead to problems in Windows, including its complete inoperability.

    The end result should be something similar to this picture:

    The additional sections created are shown here:

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

      /dev/sda2 - EFI partition (ESP)

      /dev/sda6 - system partition (partition for the “root” of the system)

      /dev/sda7 - swap partition

      /dev/sda8 - section for user data.

    This information will be very useful later when installing Ubuntu, since due to the large number of partitions, you can very easily get confused and assign the required mount point to the wrong “number”.

    Nevertheless, we continue to work with the GParted editor. Your task is to delete all partitions and use the free space to create the disk configuration necessary for Ubuntu. To do this, you can right-click on each section and select “Delete” from the drop-down menu. But it’s better to do it differently: find the “Device” item in the menu bar of the GParted editor and select “Create Partition Table...” from the menu. A warning will appear:

    WARNING: This will ERASE ALL DATA on the ENTIRE DISK /dev/sda

    (WARNING: This will DELETE ALL DATA on THE ENTIRE /dev/sda DISK)

    Don't worry, you took care of backups, right? Look just below - at the inscription “Advanced” (Details). Click on the triangle on the left and select gpt from the menu:

    The entire disk space will turn gray. Right-click on it and start creating the necessary partitions by selecting “New” from the drop-down menu. The first of the new partitions is a special ESP partition, required, as you remember, for UEFI to work. Since it is formatted in a non-Linux file system, and in addition, must be bootable, it must be located at the beginning of the disk space. Define its size in the field “New size (MiB)” (New size in MiB) 100 MB, and the file system - fat32:

    In the same way, create partitions for the future: system (15 GB with the ext4 file system), swap partition (4 GB with linux-swap) and for the home directory (all remaining space in ext4). As you remember, GParted does not apply changes immediately, but simply queues them for execution. So click on the green checkmark “Apply All Operations”:

    Yes, it is not at all necessary to manage the boot flags at this stage - the Ubuntu installer will do everything as it should. Now read carefully about how to install Ubuntu, and when you are ready, we will continue.

    Installing Ubuntu

    After this preparatory work, installing Ubuntu will not be difficult, especially if you have carefully read the installation rules. Just take out a piece of paper with a list of partitions and note that for the special EFI partition (/dev/sda2 from the example about installing Ubuntu and Windows together) you need to accurately assign the property to the EFI boot partition, and not the BIOS backup boot area:

    If you do not do this, the installer will show you this notification:

    Correct the error, and if it doesn’t work, exit the installer, launch the GParted editor and check that everything described above has been completed.

    The assignments for all other partitions required when installing Ubuntu are described in great detail in this section, so there is little point in going into more detail here.

    Possible problems

    Sometimes it happens that after installation one of the operating systems preinstalled on the computer does not start. Well, without going into rather complicated ways to bring everything back to normal, we note that there is a comprehensive solution to possible loading problems. The name of this solution is Boot-repair.

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

    Follow the golden rule: “Never fix something that isn’t broken”!

    Boot into Ubuntu. It doesn't matter how you do it - Boot-Repair works both with LiveCD and on the installed system. Of course, if you are having difficulty booting your newly installed Ubuntu, then the first method becomes the only one. To begin, Boot-Repair needs to be installed on your computer; this is done using the terminal. Press Ctrl + Alt + T and in the window that appears, type:

    : Change the command closer to the release.

    Sudo add-apt-repository "deb http://ppa.launchpad.net/yannubuntu/boot-repair/ubuntu saucy main"

    Now, of course, you will say: “What are you doing there, at all? There are so many letters - I don’t understand anything and I’ll definitely make a mistake!” Of course, no one enters the presented command letter by letter into the terminal - just select it completely and click the middle mouse button in the terminal window, or drag the selected text there. Press Enter. If you are on an already installed Ubuntu, you will be prompted to enter your password. Please note that when entering a password, no symbols are displayed: no dots, no asterisks - nothing at all - there is probably no need to explain why this is done. After entering the password, press Enter again.

    Download the public key of the repository with the program from the trusted key store:

    Sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 60D8DA0B

    Update the application list with the command:

    Sudo apt-get update

    Install and run Boot-Repair:

    Sudo apt-get install -y boot-repair && (boot-repair &)

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

    : In the process of writing.

    Up