How to determine the partition type in linux using numbers
Developer on Alibaba Coud: Build your first app with APIs, SDKs, and tutorials on the Alibaba Cloud. Read more ＞
How to determine the partition type of a linux system by using numbers-general Linux technology-Linux technology and application information. The following is a detailed description. In linux, a hard disk has only four partitions, one of which is a logical partition. In linux, primary partitions are marked with numbers 1, 2, 3, and 4. numbers above 5 represent logical partitions. Therefore, you can use numbers to determine the partition type.
All linux Startup information files are in the/boot directory. A user can put the directory in a separate partition or an MBR partition. If it is created in a separate partition, you need to make this partition a boot partition, And the/boot directory basically occupies about 60 MB of space.
The linux system also needs a swap partition, which acts as the virtual memory and is used to quickly swap memory files. You can also choose not to create the partition. If you create a partition, the size of the partition is generally twice the size of the memory.
In linux, all hardware devices are represented by files in the/dev directory. For example,/dev/cdrom indicates the optical drive on the host. Hard disks can be divided into two types of physical interfaces: SCSI and IDE. SCSI has many applications on the server, and general PCs use hard disks with IDE interfaces. Linux uses S to represent the SCSI interface, h to represent the IDE interface, and d to represent the disk ". There are two slots IDE1 and IDE2 on the Main Board of the PC. The IDE slots are used to connect the main board and the hard disk to transmit system data through the data cable. One data cable can connect two hard disks. Therefore, hard disks are arranged in sequence. linux uses a to represent the first hard disk on the IDE1 interface data cable and B to represent the second hard disk; use c to represent the first hard disk on the IDE2 interface data line, and use d to represent the second hard disk. For example, hda indicates the first hard disk on the IDE1 interface data line. Symbol sda indicates the first hard disk on the SCSI controller. The symbol/dev/hda1 indicates the first primary partition of the first hard disk on the IDE1 interface data line, symbol/dev/hda5 indicates the first logical partition in the extended partition of the first hard disk on the IDE1 interface data line. Similarly,/dev/sda1 indicates the first partition of the first hard disk on the controller.
This article is an English version of an article which is originally in the Chinese language on aliyun.com and is provided for information purposes only. This website makes no representation or warranty of any kind, either expressed or implied, as to the accuracy, completeness ownership or
reliability of the article or any translations thereof. If you have any concerns or complaints relating to the article, please send an email, providing a detailed description of the concern or
complaint, to firstname.lastname@example.org. A staff member will contact you within 5 working days. Once verified, infringing content will be removed immediately.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
and provide relevant evidence. A staff member will contact you within 5 working days.