How to determine the partition type in linux using numbers

Source: Internet
Author: User
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.
Related Article

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.