Those things about the hard disk (primary partition, extended partition, logical partition, active partition, system partition, boot partition, boot sector, MBR, etc.)

Primary partition, extended partition, logical partition, active partition, system partition, boot partition. . . . . . . . .
Master Boot Sector, MBR, bootloader. . . . . . . . . .
Various concepts, do you know what they mean?
It took a day to finally research it clearly. The explanations of many posts on the Internet are wrong, or they do not go deep into the essence. What are the C drives and D drives, they have all been brainwashed by windows. Wasted a long time.

Primary partition: In fact, there was no concept of primary partition, extended partition and logical partition in early hard disk partitions, and the type of each partition is primary partition. Since the hard disk only reserves 64 bytes of storage space for the partition table, and the parameters of each partition occupy 16 bytes, the master boot sector can only store data of 4 partitions in total. That is to say, a physical hard disk can only be divided into 4 logical disks. In specific applications, four logical disks often cannot meet actual requirements. In order to create more logical disks for the operating system, extended partition and logical partition are introduced, and the original partition type is called primary partition.

Extended partition: As mentioned above, 4 partitions obviously cannot meet the requirements, but what if the physical hardware limit can only have 4 partitions? So the operating system started to go out and named one of the main partitions as the extended partition. Remember that it is just a name. In principle, the extended partition and the main partition are the same, but the functions are different. After talking about logical partitions below, you will understand what I am talking about.

Logical partition: 4 partitions are definitely not enough, I want 20 partitions, what should I do? Turn one of the main partitions into an extended partition, and then cut on this extended partition to turn into D disks, E disks, F disks, etc., but these disks are combined into an extended partition, and these disks are linked to each other. , unlike the main partition, the 4 are independent of each other and do not interfere with each other. The logical partition is linked by a linked list. If the partition information in the E drive is lost, the operating system cannot find the F drive.


Those things about the hard disk - Xorrlei - Xu Lei's technical blog
Boot partition: very simple, the partition for storing operating system files, for example, if you install two systems: win7+linux, then you have two boot partitions. If Windows is installed, it depends on the area where the windows folder (system32 file) is stored, which area is your boot partition, the C drive is installed by default, and you can also install the F drive. If Linux is installed, it depends on where the / partition is installed, which is the boot partition.

System partition: The partition where Ntldr program or Grub program is stored. Windows is usually installed in the C drive, and Linux is usually installed in the /boot partition.

Active partition: the active partition is the main partition, and the active partition is the system partition. Each time the PC starts, a hard disk can only There is an active partition. If you want to start Windows, set the Windows system partition as the active partition, and the computer will go there to load the boot program (Ntldr or Grub) and execute it. If you want to start Linux, set the Linux system partition as the active partition. .

Those things about hard disk (primary partition, extended partition, logical partition, active partition, system partition, boot partition, boot sector, MBR, etc.) - Xorrlei - Xu Lei's technical blog
did you see? The above picture shows the partition of my hard disk. My win7 is installed on the C drive, that is, my windows folder is on the C drive, so the C drive is the boot partition; but I installed Grub on the Z drive, that is, the boot program Ntldr. boot.ini or something, so the Z disk is the system partition. . . . . And because I am currently starting the win7 system, the system partition of win7 is also the active partition.

You children's shoes should all understand it~~~~~
 Let's talk about the startup
 

Master boot sector: each hard disk, yes, each hard disk is not each partition, there is only one master boot sector, that is, the first sector of the No. 0 cylinder and No. 0 head of the hard disk, with a size of 512 bytes . The master boot sector contains MBR (hard disk master boot record MBR occupies 446 bytes), DPT (partition table DP occupies 64 bytes), MN (hard disk effective mark Magic Numbe occupies 2 bytes. AA and 55 are called magic numbers (Magic Number), BOIS When reading MBR, always check whether there are these two magic numbers at the end, if not, it is considered as a hard disk that has not been partitioned), these three areas are independent of the operating system and exist on each hard disk; The MBR is an executable program, and different codes are written by each operating system. The storage space of the MBR is limited to 446 bytes, and the only thing the MBR does is load the second boot loader. The MBR load generated by Windows runs PBR; the MBR load generated by GRUB runs grldr

MBR: As mentioned above, it is a program with a length of 446 bytes, which is used to load the bootloader.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325762566&siteId=291194637