Some people have asked why there are only four primary partitions and four extended partitions when installing Linux. at that time, due to lack of basic knowledge, the problem cannot be solved in a timely manner. now I have a research study and I will share it with you. MBR
Some people have asked why there are only four primary partitions and four extended partitions when installing Linux. at that time, due to lack of basic knowledge, the problem cannot be solved in a timely manner. now I have a research study and I will share it with you.
MBR (Master Boot Recorder) stores hard disk information in the main Boot sector. MBR can be said to be the most important part of the entire hard disk, because two important items are recorded in MBR: The Boot management program and the partition table ). Therefore, we are modifying the partition table.
Due to the limited capacity of this MBR block, at the beginning of the design, only four partition records were designed. These partition records were called Primary (Primary partition) and Extended (Extended partition), that is, a hard disk can have up to four Primary + Extended sectors, of which, Extended can have only one. therefore, if you want to partition into four disk partitions, you can:
P + P
P + E
In the above case, 3 P + E only has three "available" disks. if four of them are "available 』, the score is 4 P! (Because Extended cannot be used directly, you still need to partition it into Logical)
Thought 1:If I want to temporarily partition my large hard drive into four partitions, and there is other space for me to plan in the future, how should I partition it?
From the preceding description, we can know that Primary + Extended can have up to four partitions. if you want to have more than five partitions, you need Extended help. Therefore, in this example, we cannot partition the data into four Primary. why? If you are a 20 GB hard disk and 4 primary share 15 GB, do you think there are 5 GB available? Error! The remaining 5 GB cannot be used at all. this is because there is no additional partition table Record area to record, so no additional partitions can be made. of course, the space is wasted! Therefore, please note that if you want to partition more than 4 slots, please remember to have Extended partition area, and all the remaining space must be allocated to Extended, then, use the logical partition area to plan the Extended space.
Thinking 2:Can I partition only one Primary and one Extended partition?
Of course! Basically, there can be 64 Logical partitions. Therefore, you can partition only one primary partition and extend all other partitions. you can use Logical partitions to plan other partitions!
Think 3:If my hard disk is installed on the Master of IDE 1 and I want to partition it into six usable hard disk sectors, what is the code of each disk under Linux?
Note:Since the hard disk can have up to four partitions in Primary + Extended mode, in Linux, the partition table 1 ~ 4. leave it first. if only two P + E are used, two partition numbers will be blank! For more details, let's assume that I have used up all four P + E. Extended/dev/hda4 contains three logical partitions.
Actually, you can use the/dev/hda1,/dev/hda2,/dev/hda3,/dev/hda5,/dev/hda6,/dev/hda7 partition! The Extended sector/dev/hda4 is only used to plan the disk space that can be used by Logical!
So what if I only want to partition 1 Primary and 1 Extended?
Because 1 ~ The number 4 has been reserved, so the first Logical code is calculated from the number 5, and the disk code is added in the accumulative way when it is planned later, among them,/dev/hda3 and/dev/hda4 are empty and reserved codes.