Windows.  Viruses.  Laptops.  Internet.  Office.  Utilities.  Drivers

So, you specified in the settings BIOS loading from a CD/DVD or from USB, and when booting from Ubuntu LiveCD, instead of a purple screen with icons of a keyboard and a man, we 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 mode BIOS support 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 HDD. 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 hardware and the operating system is carried out through the enabled UEFI mode (and not Legacy BIOS), using GPT for partitioning is almost mandatory, otherwise compatibility problems with 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 the micro software - simple drivers for individual hardware components. After that emulated The BIOS again searches for the OS bootloader and activates it. He, in turn, loads 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 boot loader - a small partition (100–250 MB) must be created on the disk, called “Extensible Firmware Interface System Partition” ( system partition Extensible Firmware Interface (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 others supporting the mode next to it UEFI systems, depends on 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 normal functioning 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 click right click mouse 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've taken care of it backups? 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-native Linux file system, and in addition, must be bootable, it must be placed at the beginning 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 the rather complicated ways of bringing everything back to normal, we note that there is a comprehensive solution possible problems with loading. 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 on both LiveCD and 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 already in 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 public key repository with a 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.

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 was used for these purposes BIOS programs, but this standard is now considered obsolete, and it has been replaced by UEFI technology, which supports secure boot, has a pleasant GUI settings and many other benefits. Most modern motherboards and laptops are already produced with UEFI. In this article we will look at how it is done Linux installation 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 emulation 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 a mode UEFI boot or Legacy.

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. Linux entry on UEFI flash drive on Linux

To write an image to a flash drive in Linux is better use the Etcher utility. The program will write media that can be booted into both UEFI and normal 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 standard utility Gnome Disk Management:

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 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 scheme and type system interface: 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. First is the use of a partition table GPT disk. This new technology, which has a lot of advantages over MBR, including very a large number of primary partitions (there are only four in the MBR), 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 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":

As file system For the partition you need to select FAT32, 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 UEFI settings by default 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 bootloader 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 have a desire 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!

System partition (EFI or ESP system partition).

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

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

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

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

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

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

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

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

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

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

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

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

- area of ​​file allocation tables (FAT1 and FAT2);

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

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

Most Windows 7 installations include tiny 100MB partitions called `system Reserved', also known as MSR or 'Microsoft System Reserved' partition. For 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 power. The power of the air conditioner is calculated depending on where you intend to install the equipment or depending on the area of ​​the living space. If you install household air conditioners, which in terms of power are not designed to operate in a large room, then in this situation you simply will not be able to obtain proper cooling. Since the system will work to the maximum.
Note: Some OEM installations may have this section named `system` or even `recovery`. In any case, this will be the `Active` partition on the same drive as the `C` drive.

Do I have an MSR partition?

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

Note: If drive `C` is your `Active` partition, you just need to do backup and `C` drive recovery for a complete system recovery.

What does the MSR partition do?

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

Do I need his image?

The image on the MSR partition is necessary to restore 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 restore the C drive. This is necessary to restore the Windows 7 partitions to the same location for the BCD to still be able to reference them while loading. If you restore 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 is available in the 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 one exists on your system. However, the partition will only occupy 100 MB and this is only a small amount to have an image of the entire image of your `C` drive.
  • If you want to restore your system to an earlier point, then you just need to restore the `C` drive (as "primary" is not active), then there is no need to restore the MSR partition.
  • If you are restoring your system to install it on an empty or unformatted drive, you should first restore the MSR partition as the "active" partition, then restore the `C' drive as primary.

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 disks(HDD), solid state drives(SSD) 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: environment tools section Windows recovery, 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 in a custom Windows installation you can add these official means like Encryption Windows disk BitLocker and Windows Recovery Environment.

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.

Windows Recovery Environment Tools partition and System partition are added before adding Windows partition. 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.

If you notice an error, select a piece of text and press Ctrl+Enter
SHARE: