Why is the hard disk partitioned?

Disk partition

People who have installed the system know that they must be partitioned before they can install the system. The image is like something like C:, D: in Windows. If you want to ask why the hard disk is partitioned, I can't say why it is very strict. First of all, from the usage habits, we don't want the data to be cluttered together. Secondly, if you don't partition, how can you use different file systems on a hard disk (described below), the academic statement is: data security and performance consider.

Let me talk about the most important first sector of the hard disk, because the important information of the whole hard disk is here:

MBR (Master Boot Record): The bootloader is installed here, occupying 446 bytes;

DPT (Disk ParTITIon table): Record the partition meta information on the hard disk, occupying 64 bytes.

How does MBR work? It doesn't need to go deeper. Anyway, it is the place where the system will actively read the data at the beginning of the system, so as to guide the startup of the operating system;

DPT should be carefully talked about, the general meaning of the partition is like grabbing the ground, but people are more disciplined, according to the cylinder (the smallest partition unit) allocation, such as the first partition from the cylinder 1-200, the second partition 201- 500, but three partitions 501-1000... (omitted not unlimited distribution)

Why should the hard disk be partitioned? How to partition

Why should the hard disk be partitioned? How to partition

For the sake of saying that it can't be allocated all the time, the number of technical cylinders is enough, because the above mentioned hard disk partition table has only 64 bytes, each partition record needs to occupy 16 bytes, and the maximum can only be divided into 4, the question is here: I How is the computer divided into 5 (c\d\e\f\g)?

In fact, the four partitions I mentioned are so-called primary partitions. In order to support many partitions, the concept of extended partitions is introduced. That is to say, one record in the DPT can be used to record the information of the extended partition, and then continue to divide in the extended partition. The logical partition, and the partition information of the logical partition is recorded in the first sector of the extended partition, so that many partitions can be divided like a linked list. But note that there can be 1~4 primary partitions in a partition table, but there can only be at most 1 extended partition.

Why should the hard disk be partitioned? How to partition

Why should the hard disk be partitioned? How to partition

How is the partition table related? In detail, the partition table is a singly linked list. The first partition table, that is, the DPT located in the first sector of the hard disk, can have a record starting position of the extended partition. The cylinder, similar to the concept of a pointer, points to the extended partition (Figure 3). From this record we can find a cylinder 0 sector 1 (CHS) of the extended partition, and a second one in this sector. Partition table, the first record of the second partition table generally describes the start/stop cylinder of the current logical partition, and the second record represents the 0 head 1 sector (CHS) where the next logical partition is located. 3. There is no information in the fourth record (Figure 4).

Please see the figure below, the main boot record / partition table is the first partition of the hard disk, basic partition 1, basic points 2, basic partition 3 are the primary partition, there are 2 logical partitions in the extended partition, each logical partition The first sector is the partition table.

Why should the hard disk be partitioned? How to partition

System boot after partitioning

Previously mentioned the boot loader installed in the MBR, what is his role?

1 Provide boot menu option: It can be used by the user to select which operating system to boot. This is the multi-boot function.

2 Load the operating system kernel: Each operating system has its own kernel and needs a bootloader to load

3 Hand over to other bootstraps: You can hand over work to other bootstraps to do the above.

In fact, in addition to the bootloader can be installed in the MBR, it can also be installed directly in the boot sector (DBR) of each partition, note that each partition (primary partition, logical partition) has its own boot sector, Specifically used to install the boot loader, as shown in Figure 3.

System startup process:

1 First, after the BIOS starts, read the boot loader in the first sector of the hard disk MBR (may be windows or linux grub)

2 The boot program in MBR provides a boot menu. You can choose 1) directly load the windows kernel. 2) Transfer the work to the loader in the boot sector in the windows partition, let him load the kernel himself. 3) Transfer it to the Linux partition. Boot the sector and let him load linux.

3 According to the user-selected options and the partitions recorded in the bootloader, find the partition information such as the corresponding partition cylinder number in the partition table, and start the kernel or partition loader.

When Window is installed, the boot sector of the partition where MBR and Windows are located will be automatically installed by default, and no options will be provided for the user to select. Therefore, if you have installed other operating systems before, and then install another Windows, The public MBR is overwritten, so the original operating system cannot be started. If you install windows first, then install linux, linux will overwrite the MBR, and then let the user choose whether to add windows and other operating system startup items. If you choose to add it, then you will have two options when you boot. The user made a selection.

File system

The file system is also a very complicated topic. We still explain it in a more general and coarse-grained way. Imagine how our files correspond to the sectors of the disk, so the underlying concept track sector is useless. A more abstract data type or structure is needed to abstract the underlying details.

A file system is a set of abstract data types that implement operations such as storage, hierarchical organization, access, and retrieval of data.

A file system is a mechanism for providing underlying data access to users. It divides the space in the device into blocks (sectors) of a certain size, typically 512 bytes per block. The data is stored in these blocks and the size is corrected to occupy an integer number of blocks. It is up to the file system software to organize these blocks into files and directories and to record which blocks are assigned to which files and which are not.

However, the file system does not necessarily appear on a particular storage device. It is the organizer and provider of data. As for its underlying layer, it can be a disk or other device that dynamically generates data (such as a network device).

Sony Adapter

High efficient charging speed for Sony laptop, stable current outlet can offer power for the laptop at the same time charge the laptop battery. The best choice for your replacement adapter.We can meet your specific requirement of the products, like label design. The plug type is US/UK/AU/EU. The material of this product is PC+ABS. All condition of our product is 100% brand new.


Our products built with input/output overvoltage protection, input/output overcurrent protection, over temperature protection, over power protection and short circuit protection. You can send more details of this product, so that we can offer best service to you!


Adapter For Sony,Charger For Sony,Laptop Charger For Sony ,Sony Laptop Adapter

Shenzhen Waweis Technology Co., Ltd. , https://www.waweisasdapter.com

Posted on