Manjaro Некоторые основы MBR против GPT и BIOS против UEFI

Некоторые основы MBR против GPT и BIOS против UEFI

From Manjaro
Revision as of 13:00, 30 January 2023 by Krotesk (talk | contribs) (Created page with "С сайта http://www.rodsbooks.com/gdisk/mbr2gpt.html")
Other languages:
English • ‎Türkçe • ‎français • ‎русский

MBR

Главная загрузочная запись (Master Boot Record - MBR) - это особый тип загрузочного сектора в самом начале разделенных на разделы компьютерных устройств хранения данных, таких как фиксированные диски или съемные диски, предназначенные для использования в IBM PC-совместимых системах и последующих. Концепция MBR была публично представлена в 1983 году в PC DOS 2.0.

MBR содержит информацию о том, как организованы логические разделы, содержащие файловые системы, на данном носителе. Кроме того, MBR также содержит исполняемый код для работы в качестве загрузчика установленной операционной системы - обычно путем передачи управления на второй этап загрузчика или в сочетании с загрузочной записью тома каждого раздела (VBR). Этот код MBR обычно называют загрузчиком.

Организация таблицы разделов в MBR ограничивает максимальное адресуемое пространство диска до 2 ТБ (232 × 512 байт). Поэтому схема разделения на основе MBR в новых компьютерах вытесняется схемой GUID Partition Table (GPT). GPT может сосуществовать с MBR, чтобы обеспечить ограниченную обратную совместимость для старых систем. [1]

GPT

GUID Partition Table (GPT) - это стандарт компоновки таблицы разделов на физическом жестком диске с использованием глобально уникальных идентификаторов (GUID). Хотя она является частью стандарта Unified Extensible Firmware Interface (UEFI) (унифицированный интерфейс EFI, предложенный Форумом для замены BIOS ПК), она также используется в некоторых системах BIOS из-за ограничений таблицы разделов главной загрузочной записи (MBR), используемой 32 бита для хранения адресов логических блоков (LBA) и информации о размере.

Схемы таблиц разделов на основе MBR вставляют информацию о разбиении для (обычно) четырех "основных" разделов в главную загрузочную запись (MBR) (которая в системе BIOS также является контейнером для кода, начинающего процесс загрузки системы). В GPT первый сектор диска зарезервирован под "защитную MBR", поэтому загрузка компьютера на базе BIOS с GPT-диска поддерживается, но загрузчик и операционная система должны быть совместимы с GPT. Независимо от размера сектора, заголовок GPT начинается со второго логического блока устройства. [2]


GPT использует современную адресацию логических блоков (LBA) вместо адресации цилиндр-головка-сектор (CHS), используемой в MBR. Информация традиционного MBR содержится в LBA 0, заголовок GPT находится в LBA 1, а далее следует сама таблица разделов. В 64-разрядных операционных системах Windows для GPT зарезервировано 16 384 байта, или 32 сектора, что оставляет LBA 34 в качестве первого полезного сектора на диске. [3].

MBR против GPT

В отличии от дисков MBR - диск GPT может поддерживать тома размером более 2 ТБ. Диск GPT может быть базовым или динамическим, так же как и диск MBR может быть базовым или динамическим. Диски GPT также поддерживают до 128 разделов, а не 4 основных раздела, как в MBR. Кроме того, GPT сохраняет резервную копию таблицы разделов в конце диска. Так же, диск GPT обеспечивает большую надежность благодаря репликации и циклической проверке избыточности (CRC) таблицы разделов. [4].

Таблица разделов GUID (GPT) поддерживает тома размером до 18 экзабайт и до 128 разделов на диск, по сравнению со стилем разметки MBR, поддерживающей тома размером до 2 терабайт и до 4 основных разделов на диск (или три основных раздела, один расширенный раздел и неограниченное количество логических дисков). В отличие от дисков MBR, критически важные для работы платформы данные располагаются в разделах, а не в неразделенных или скрытых секторах. Кроме того, диски с GPT имеют избыточные основную и резервную таблицы разделов для улучшения целостности структуры данных разделов. [5]

BIOS

В IBM PC совместимых компьютерах базовая система ввода/вывода (BIOS), также известная как System BIOS, ROM BIOS или PC BIOS, является стандартом де-факто, определяющим интерфейс микропрограммы. Название произошло от Basic Input/Output System, использовавшейся в операционной системе CP/M в 1975 году. Программное обеспечение BIOS встроено в компьютер и является первым программным обеспечением, запускаемым компьютером при включении.

The fundamental purposes of the BIOS are to initialize and test the system hardware components, and to load a bootloader or an operating system from a mass memory device. The BIOS additionally provides abstraction layer for the hardware, i.e. a consistent way for application programs and operating systems to interact with the keyboard, display, and other input/output devices. Variations in the system hardware are hidden by the BIOS from programs that use BIOS services instead of directly accessing the hardware. Modern operating systems ignore the abstraction layer provided by the BIOS and access the hardware components directly. [6]

UEFI

The Unified Extensible Firmware Interface (UEFI) (pronounced as an initialism U-E-F-I or like "unify" without the n) is a specification that defines a software interface between an operating system and platform firmware. UEFI is meant to replace the Basic Input/Output System (BIOS) firmware interface, present in all IBM PC-compatible personal computers. In practice, most UEFI images provide legacy support for BIOS services. UEFI can support remote diagnostics and repair of computers, even without another operating system.

The original EFI (Extensible Firmware Interface) specification was developed by Intel. Some of its practices and data formats mirror ones from Windows.] In 2005, UEFI deprecated EFI 1.10 (final release of EFI). The UEFI specification is managed by the Unified EFI Forum.


BIOS против UEFI

UEFI enables better use of bigger hard drives. Though UEFI supports the traditional master boot record (MBR) method of hard drive partitioning, it doesn't stop there. It's also capable of working with the GUID Partition Table (GPT), which is free of the limitations the MBR places on the number and size of partitions. GPT ups the maximum partition size from 2.19TB to 9.4 zettabytes.

UEFI may be faster than the BIOS. Various tweaks and optimizations in the UEFI may help your system boot more quickly it could before. For example: With UEFI you may not have to endure messages asking you to set up hardware functions (such as a RAID controller) unless your immediate input is required; and UEFI can choose to initialize only certain components. The degree to which a boot is sped up will depend on your system configuration and hardware, so you may see a significant or a minor speed increase.

Technical changes abound in UEFI. UEFI has room for more useful and usable features than could ever be crammed into the BIOS. Among these are cryptography, network authentication, support for extensions stored on non-volatile media, an integrated boot manager, and even a shell environment for running other EFI applications such as diagnostic utilities or flash updates. In addition, both the architecture and the drivers are CPU-independent, which opens the door to a wider variety of processors (including those using the ARM architecture, for example).

However, UEFI is still not widespread. Though major hardware companies have switched over almost exclusively to UEFI use, you still won't find the new firmware in use on all motherboards—or in quite the same way across the spectrum. Many older and less expensive motherboards also still use the BIOS system. [7]

MBR vs. GPT and BIOS vs. UEFI

Usually, MBR and BIOS (MBR + BIOS), and GPT and UEFI (GPT + UEFI) go hand in hand. This is compulsory for some systems (eg Windows), while optional for others (eg Linux).

http://en.wikipedia.org/wiki/GUID_Partition_Table#Operating_systems_support

http://en.wikipedia.org/wiki/Unified_Extensible_Firmware_Interface#DISKDEVCOMPAT

Преобразование из MBR в GPT

С сайта http://www.rodsbooks.com/gdisk/mbr2gpt.html

One of the more unusual features of gdisk is its ability to read an MBR partition table or BSD disklabel and convert it to GPT format without damaging the contents of the partitions on the disk. This feature exists to enable upgrading to GPT in case the limitations of MBRs or BSD disklabels become too onerous—for instance, if you want to add more OSes to a multi-boot configuration, but the OSes you want to add require too many primary partitions to fit on an MBR disk.

Conversions from MBR to GPT works because of inefficiencies in the MBR partitioning scheme. On an MBR disk, the bulk of the first cylinder of the disk goes unused—only the first sector (which holds the MBR itself) is used. Depending on the disk's CHS geometry, this first cylinder is likely to be sufficient space to store the GPT header and partition table. Likewise, space is likely to go unused at the end of the disk because the cylinder (as seen by the BIOS and whatever tool originally partitioned the disk) will be incomplete, so the last few sectors will go unused. This leaves space for the backup GPT header and partition table. (Disks partitioned with 1 MiB alignment sometimes leave no gaps at the end of the disk, which can prevent conversion to GPT format—at least, unless you delete or resize the final partition.)

The task of converting MBR to GPT therefore becomes one of extracting the MBR data and stuffing the data into the appropriate GPT locations. Partition start and end points are straightforward to manage, with one important caveat: GPT fdisk ignores the CHS values and uses the LBA values exclusively. This means that the conversion will fail on disks that were partitioned with very old software. If the disk is over 8 GiB in size, though, GPT fdisk should find the data it needs.

Once the conversion is complete, there will be a series of gaps between partitions. Gaps at the start and end of the partition set will be related to the inefficiencies mentioned earlier that permit the conversion to work. Additional gaps before each partition that used to be a logical partition exist because of inefficiencies in the way logical partitions are allocated. These gaps are likely to be quite small (a few kilobytes), so you're unlikely to be able to put useful partitions in those spaces. You could resize your partitions with GNU Parted to remove the gaps, but the risks of such an operation outweigh the very small benefits of recovering a few kilobytes of disk space.

Switching from BIOS to UEFI

See: UEFI_-_Install_Guide#Switching_from_BIOS_to_UEFI

Примечание

Switching from [MBR + BIOS] to [GPT + UEFI]

Switching from BIOS to UEFI consists of 2 parts-

i. Conversion of disk from MBR to GPT. Side effects- Possible Data Loss, other OS installed on same disk may or may not boot (eg Windows)..

ii. Changing from BIOS to UEFI (and installing GRUB in UEFI mode). Side Effects- Other OS (can be both Linux and Windows) may or may not boot, with systemd you need to comment out the swap partition in /etc/fstab on a GPT partition table (if you use a swap partition).

After converting from MBR to GPT, probably your installed Manjaro wont work, so you would need to prepare beforehand what to do in such a case. (eg, chroot using a live disk and installing GRUB in UEFI way)

And Windows 8 if installed in MBR way, would need to be repaired/reinstalled in accordance to UEFI way.


Обратная связь

Вопросы, предложения, критика? Пожалуйста, пишите сюда: [8]


Смотрите также

Cookies help us deliver our services. By using our services, you agree to our use of cookies.