Storage Management - Disk basis

First, the classification of the device file

There are a large number of device files in the / dev directory under Linux, depending on the device file, is divided into character device file and block device file.

Character device file access by way of a character stream to carry out, a transmission of a character. Common are printers, terminals (TTY), plotters and tape devices, etc., character device file is sometimes called the " RAW " device file.

Block device file is a way to access the data blocks, the most common device is the disk. By the time the device file system to access data block, starting in the buffer memory read or write data. Instead of directly transferring data to the physical disk. In this way effectively improve I / O performance of the disk.

Two, MBR and GPT

The MBR (Master the Boot the Record) : i.e., hard disk master boot record partition table of the hard disk cylinder 0, head 0, 1 sector is called the master boot sector (also called the master boot record MBR). It consists of three parts, the master boot program, and a hard disk partition table DPT valid flag (55AA). In the master boot sector total of 512 bytes, the master boot program (boot loader) accounted for 446 bytes, the second part is the Partition table region (partition table), i.e. the DPT, accounting for 64 bytes, the hard disk partition has number and the size of each partition are recorded therein. The third part is a magic number, 2 bytes, fixed to 55AA.

The GPT (the GUID the Partition the Table) : i.e. globally unique identifier partition table is a physical hard disk partition structure. It is used to replace the master boot record partition table (MBR) BIOS in.

The main legacy BIOS support MBR boot, UEFI is to replace the traditional BIOS, it added support for new hardware.

Three, UEFI and BIOS

UEFI (Unified Extensible Firmware Interface) : full name "Unified Extensible Firmware Interface," which defines an interface standard between operating systems and platform firmware. This interface is used to automatically load the operating system from (before the system starts, the operating system begins operation) the pre-boot environment to the operation of operating system, so that the boot process to simplify, to save time. It should be noted, that it is only the most accurate UEFI is a specification different vendor implementations of UEFI according to the specification, and make PC firmware, the firmware is called UEFI firmware.

BIOS (Basic Input Output System) : is one of the oldest system firmware and interface, using assembly language programming, and use an interrupt to perform input / output operations, appeared in the beginning that establishes the basic framework for PC ecosystem.

UEFI BIOS advanced than in three areas:

(1) reads the partition table

(2) access to certain files in the file system

(3) code is executed in a specific format [UEFI like to say a simple operating system]

Fourth, the relationship between UEFI, BIOS and MBR, GPT?

MBR features:

Partition MBR partition table is stored in the first sector of the hard drive, but only 64 bytes, so a maximum of four entries. That is, we can put the hard disk is divided into four primary partitions, or less into three primary partitions plus an extended partition.

MBR partition advantage is simple, high support, many operating systems can boot from MBR partition the hard disk. MBR partition can not be identified drawback is that hard disk space be greater than 2T, you can not have the partition larger than 2T.

MBR supports 32-bit and 64-bit systems.

GPT's features:

 no limitation to four primary partitions, there is no limit on the number of partitions.

 GPT can manage a maximum hard disk size 18EB

 hard disk boot from a GPT partition, you need UEFI motherboards, hard drives with GPT partition, the operating system supports GPT these three conditions.

 must use the 64-bit system.

The goal is to replace the traditional UEFI BIOS, it does not support MBR mode only supports GPT format. However, in recent years, the emergence UEFI motherboard, a coexistence mode using UEFI + BIOS, BIOS and integrated UEFI boot entry.

Guess you like

Origin www.cnblogs.com/yxf-/p/11432478.html