About why Linux can be divided into 4 sectors.

  
Someone asked why there are only 4 main partitions + extended partitions when installing Linux. At that time, due to insufficient basic knowledge, it was impossible to solve the problem in time. It was a bit embarrassing. Let's go. MBR (Master Boot Recorder) is the main boot sector, which places information about the hard disk. MBR can be said to be the most important part of the entire hard disk, because two important things are recorded in the MBR, namely: boot management program, and partition table. So the hard disk partition we made, that is, the partition table is modified. Due to the limited capacity of this MBR block, when designing, only four split records were designed. These split records are called Primary and Extended, that is, one The hard disk can have up to 4 Primary + Extended sectors, of which there can only be one Extended, so if you want to split into four disk partitions, then you can at most: P + P + P + PP + P + P + E is divided by the situation. It is important to note that if the above situation, 3P + E has only three "available" disks, if you want all four to be "available", you have to split into 4P! (Because Extended can't be used directly, it needs to be split into Logical.) Thinking one: If I want to temporarily divide my big hard disk into four partitions, at the same time, there are other spaces that I can plan in the future. , then how to split? From the instructions just described, we can see that Primary + Extended can only have a maximum of four partitions, and if you want to exceed 5 partitions, you need Extended help. Therefore, in this example, we must not be divided into four Primarys. Why? If you are a 20 GB hard drive and 4 primary shares go 15 GB, you think there are 5 GB available, right? wrong! The remaining 5 GB is completely unusable, because there is no more partition table record area to record, so there is no way to split it. Of course, the space is wasted! Therefore, please be aware that if you want to split more than 4 slots, please remember to have Extended partition, and you must allocate all the remaining space to Extended, and then plan the Extended partition with logical partition. space. Thinking 2: Can I split only 1 Primary and 1 Extended? of course can! Basically, there are 64 Logicals, so you can split only one main split and give all other splits to Extended , using Logical splitting for other partition planning! Thinking 3: If my hard disk is installed in IDE 1 Master and I want to split it into 6 usable hard disk sectors, what is the code for each disk under Linux? Note: Since the hard disk can have up to four in Primary + Extended, partition table 1 ~ 4 has been left under Linux. If only 2 P + E is used, then two will be vacated. Partition number 呦! Let me explain in more detail, suppose I have run out of four P + Es. Among them Extended /dev /hda4 includes three logical partitions. The actual partitions that can be used are /dev/hda1, /dev/hda2, /dev/hda3, /dev/hda5, /dev/hda6, /dev/hda7. As for the /dev/hda4 extended sector itself, it is only used to plan the disk space that Logical can use! So what if I only want to split 1 Primary with 1 Extended? Since 1~4 has been reserved, the first Logical code is calculated from the 5th, and later, when it is planned, the disk code is added in an accumulated way! And /dev/hda3, /dev/hda4 is empty, the codename is reserved.

Copyright © Windows knowledge All Rights Reserved