Linux partition naming will be clearer and more detailed

Source: Internet
Author: User
Tags ide hard drive

I would like to recommend Linux partitions that are very useful to you. For example, I would like to give you an introduction to Linux partitions. I hope it will be useful to you.

Linux partition details

What is a hard disk Linux partition? What is a Linux partition used? Linux partition is the "section" of the hard disk ". Windows partition has its own drive letter C:, D:, etc.), these partitions look like a separate hard disk.

The simplest case is to use the entire hard disk as a unique partition. This is basically the case if you have purchased a machine with window pre-installed. If you want to install more operating systems on your machine, you will need more Linux partitions. You cannot install Linux in this separate partition.

If you want to install Windows ME and Windows at the same time, you need two partitions. The reason is that the unused operating system uses different file systems in principle. If several operating systems support the same file system, they are usually installed in different disk Linux partitions to avoid having the same system directory under a Linux partition.

Linux partitions are different, and they have more partitions, for example, the root partition "/" and the swap partition "swap ". Note: When installing Linux, you should not consider how much space is available in windows partition, because Linux cannot be used in windows partition. Create a new partition outside Windows partition.

Linux partition type

There are three hard disk partitions: Primary partition, extended partition, and logical partition. A hard disk can have up to four primary partitions. You can create another extended partition to replace one of the four primary partitions. Then, you can create more logical partitions under the extended partition.

Extended partitions are only the "containers" of logical partitions ". In fact, only primary and logical partitions are used for data storage. Tip: the built-in partition program fdisk in Windows 9x/ME can only define one primary partition. That is to say, in Windows 9x/ME, you can only define up to one primary partition, one extended partition, and more logical partitions under the extended partition. If you want to use more primary partitions, you must partition them in Linux.

Linux partitioning and formatting

Each operating system has its own FDISK in Windows9x/M, which is used to change the hard disk partition. It has a very convenient graphic interface tool in Windows NT/2000/XP, his location is slightly different in different Windows versions, for example, control panel-management tools-Computer Management-disk management under 2000 ). In Linux, FDISK can be used for partitioning, or a graphic interface program with the same functions.

Each primary partition and logical partition are stored with additional information that identifies the file system. Operating System Windows, Linux, and so on) it is easy to identify and confirm which partition should be used through this information. Unrecognized operating system partitions are ignored.

Of course, no file system can be generated by partitioning. After partitioning, the disk space on the hard disk is reserved and cannot be used directly. After that, the partition must be formatted. In Windows, you can use the File menu or FOMATE program in the resource manager. in Linux, mke2fs is used in most cases.

Tip: Linux supports different file systems. Ext2 is the most widely used one. Ext2 is built with the mke2fs program we mentioned above. Linux also supports the reiserfs file system. Note: any changes to the disk partition or size will lose the previous data. Data must be backed up before partitioning.

Partition name in Dos/Windows

In Windows, the partitions used by the operating system are represented by the drive letter. A: And B: reserved for the soft drive. The primary and logical partitions on other disks are arranged in sequence from C. The extended partition does not have any drive letters and cannot be seen. I cannot see Linux partitions in indowsx)

If a machine has many hard disks, optical drives, and hard drives, the naming of disk partitions will be messy. In this case, the primary and logical partitions on the first hard disk will first get the name drive letter, then the second and third disks. For example, if you have three hard disks, each of which has a primary partition and two logical partitions, the first disk is named C:, F :, g:, the second is D:, H:, I:, and the third is E:, J:, K :.

In WindowsNT/2000/XP, you can change the names automatically named by these systems. For example, you can name an optical drive X, so that the name of the new partition will not change.

Partitions In unfamiliar file systems will not be named, and cannot be seen in most programs, such as resource managers. These partitions can only be displayed under FDISK in Windows 9x/ME, and Computer Management in Win2000-command interpreter.

Linux partition name

Linux partition names are clearer and more detailed than those in Windows, but the resulting names are not easy to remember. Different from the drive letter in Windows, Linux usually uses the device-name ). General hard disks, such as IDE hard disks, are named by/dev/hdxy. X indicates that hard disk a is the first hard disk, disk B is the second hard disk, and so on), and disk y is the Partition Number starting from 0, 1, 2, 3, and so on ). The SCSI hard disk is named by/dev/sdxy. The optical drive, whether it is an IDE type or SCSI, will be named like the hard disk.

Tip: IDE integrated circuit device) and SCSI small computer system interface) are currently two of the most popular computer hard drive, optical drive or soft drive systems. SCSI is faster than IDE, but it is more expensive. SCSI can be used on file servers and database servers. Linux supports these two systems. Of course, you can have both the IDE and SCSI devices on one machine)

The internal connection between the IDE hard drive and the optical drive device will be used to differentiate the device. /Dev/hda indicates the first device master of the first ide channel),/dev/hdb indicates the second device slave of the first IDE channel ). According to this principle,/dev/hdc and/dev/hdd are the master and slave devices of the second IDE channel. The two devices named "/dev/had" and "/dev/hdc" are theoretically the same. In this case, "/dev/hdb" is not used. In this case, the device is connected to the first and second IDE channels as the master)

The SCSI hard drive or optical drive device depends on the device ID. The missing ID number is not considered. For example, the IDs of the three SCSI devices are 0, 2, 5, and the device names are/dev/sda,/dev/sdb, And/dev/sdc. If you add another device with ID 3, the device will be named "/dev/sdc". The device with ID 5 will be called "/dev/sdd.

The partition number does not depend on the name of the IDE or SCSI device. Numbers 1 to 4 are reserved for the primary partition or extended partition. It is used to name the logical partition from 5. For this reason, there are often number vulnerabilities. For example, 1, 2, 5, 6, where 3 and 4 are number vulnerabilities. For example, the primary partition of the first hard disk is hda1 and the extended partition is hda2, A logical partition under the extended partition is hda5.

Here are some examples to help you understand

  1. /Dev/hda indicates the entire IDE Hard Disk
  2. /Dev/hda1 indicates the first primary partition of the first IDE hard disk.
  3. /Dev/hda2 indicates the extended partition of the first IDE hard disk.
  4. /Dev/hda5 indicates the first logical partition of the first IDE hard disk.
  5. /Dev/hda8 indicates the fourth logical partition of the first IDE hard disk.
  6. /Dev/hdb indicates the second IDE Hard Disk
  7. /Dev/hdb1 indicates the first primary partition of the second IDE hard disk.
  8. /Dev/sda indicates the first SCSI hard disk
  9. /Dev/sda1 indicates the first primary partition of the first SCSI hard disk.
  10. /Dev/sdd3 indicates the third primary partition of the fourth SCSI hard disk.
  1. The partition solution that saves the most in Linux
  2. Learn how to mount partitions in Ubuntu linux
  3. "4" why is there no Linux partition
  4. Linux partition scheme, file structure and mounting
  5. Linux partition knowledge and large disk partitions

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.