Currently, the released version of Linux has provided graphic interactive interfaces, and many people still feel unable to start. The main reason is that it is unclear about Linux partition rules and how to use the Linux partition tool & mdash; Fdisk. We will start from these two aspects to explain the problem that has plagued everyone. Linux partition rules
Currently, the released version of Linux has provided graphic interactive interfaces, and many people still feel unable to start. The main reason is that it is unclear about Linux partition rules and how to use the Linux partition tool Fdisk. We will start from these two aspects to explain the problem that has plagued everyone.
Linux partition rules
1. Linux partitioning tool-Fdisk Device Management
In Linux, each hardware device is mapped to a system file, which is no exception for hard drives, optical drives, and other IDE or SCSI devices. Linux allocates a file consisting of hd prefixes to various IDE devices, while a file consisting of sd prefixes to various SCSI devices. For example, for the first IDE device, Linux is defined as hda; for the second IDE device, hdb; and so on. The SCSI devices should be sda, sdb, and sdc.
2. Linux partitioning tool-Number of Fdisk partitions
To partition, you must operate on each hardware device. This may be an IDE hard disk or a SCSI hard disk. For each hard disk (IDE or SCSI) device, Linux assigns a serial number ranging from 1 to 16, which indicates the partition number on the hard disk. For example, the first partition of the first IDE hard disk maps hda1 in Linux, and the second partition is called hda2. For SCSI hard disks, such as sda1 and sdb1.
3. Linux partition tool-functions of Fdisk partitions
In Linux, it is stipulated that each hard disk device can have a maximum of four primary partitions (including the extended partition). any extended partition must occupy one primary partition number, that is, in a hard disk, there are a maximum of four primary and extended partitions. For earlier DOS and Windows (versions earlier than Windows 2000), the system recognizes only one primary partition. you can add a logical drive letter (logical partition) to the extended partition, further refine the partition. A primary partition is used by a computer to start the operating system. Therefore, the boot of each operating system, or a boot program, should be stored in the primary partition. This is the biggest difference between primary and extended partitions and logical partitions. This is the best example when we specify the bootloader for Linux installation and boot on the primary partition.
Linux requires that the primary partition (or extended partition) occupies the first four numbers from 1 to 16. Taking the first IDE hard disk as an example, the primary partition (or extended partition) occupies hda1, hda2, hda3, and hda4, while the logical partition occupies 12 numbers from hda5 to hda16. Therefore, each hard disk in Linux has a total of 16 partitions. For logical partitions, Linux requires that they must be built on extended partitions (also in DOS and Windows systems), rather than on the primary partition.
We can see that extended partitions provide more flexible partition modes, but they cannot be used as operating system boot. Apart from the differences between the above partitions, we can simply treat them equally.