Bird Brother Linux private kitchens disk partition summary

  1. In the Linux system, each device is treated as a file, each device will have a device file name.

  2. Why partition?
    ① security data. c disk reload will not affect the disc D, data of each partition is separate.
    ② consider the performance of the system. A partition data set in the cylindrical section, when data is to be read, to find the range becomes small.

  3. In MBR partition table format, the first sector of the disk (originally a 512-byte sectors, there is now designed 4k byte present) two important mainly recorded information, respectively: the master boot record (Master boot record, MBR): can be installed where the boot loader, 446 bytes; and the partition table : hard disk partition status recording block has 64 bytes. So MBR partition, the so-called partition just set it for that 64-byte partition table.

  4. When the system is to be written to disk, we will first refer to the disk partition table, the data can be processed for a partition. So in the MBR format if the first sector of the disk is damaged it may not recover.

  5. MBR partitioning disks, the primary partition and expand up to 4, the device file name of a certain number of logical partitions from 5 onwards.

  6. GPT partition has no concept of expansion and logical partitions, each record may exist independently, each of which can be seen as a primary partition can be formatted.

  7. In MBR partition table format, since only 64 bytes of the partition table, so there are only up to 4 groups recording areas, each recording area of ​​the cylindrical starting end of the segment number. (Four partitions are called primary or expand the partition), so the default disk partition table can be written only four partition information.

  8. But in real life often have more than four sets of partition partition, which is by way of expanding the partition to handle and expand the partition means: Since the first sector of the partition table where the only record four partition information, so if you can take advantage of additional sectors to record partition information.

  9. Points out the expansion of the partition is a partition logical partition

  10. MBR partition table since only 16 bytes of each partition table, so the information can be recorded is rather limited, the MBR partition table problems: ① can not use more than 2.2T capacity of
    only one block ②MBR, if they are damaged after, often not restore.
    ③MBR stored in the boot program block only 446 bytes can not be stored for more program code.

  11. So there will be a GPT disk partition table , because in the past a sector size of 512 bytes, now with 4k sector design, so in order to be compatible with all hard drives, mostly used in the definition of the sector is a logical block address ( block Address the Logical, LBA ) to deal with, GPT disk all the blocks in order to LBA (the default is 512 bytes ) to plan, and the first LBA called LBA0 (numbering starts with 0). MBR and only the first 512 bytes of a block to record different, the GPT LBA blocks 32 used to record the partition information

  12. The LBA0 (block compatible MBR ): MBR model and similar, divided into two parts, a boot loader is stored in another block only put a special identifier, which is to mark GPT format disks.

  13. LBA1 (GPT header record ): recording the position and size of the partition table itself, records the location of the backup GPT partition is placed, and also placed a partition table check code.

  14. LBA2-33 (partition information is actually recorded at ): 4 groups each LBA record partition record, so a total of 4 * 32 = 128 set of partitions recorded as each LBA512 bytes, 128 bytes of each record is used.

  15. Start the process of BIOS and UEFI boot test.
    ①BIOS with MBR / GPT boot process:
    the BIOS is the first program when the computer starts, the computer will automatically execute.
    1, BIOS: take the initiative to start the firmware executed, will recognize the first bootable device.
    2, MBR: a first boot sector of a primary device within the boot record block contains the boot code.
    3, the boot program (boot loader): a software kernel file read performed.
    4, the kernel file: started operating system.

Published 11 original articles · won praise 4 · Views 617

Guess you like

Origin blog.csdn.net/weixin_45626515/article/details/103244320