Knowledge about Linux partitions.

Source: Internet
Author: User
Tags ide hard drive
For more information about Linux partition, see Linux general technology-Linux technology and application. Take a look at the video tutorial.
Http://www.pc120.net.cn/pctv/pc51down/linuxinstall.rar

In linux, we recommend that you use only two "SWAP" partitions, which are twice the memory size and all available space for one "/" partition.
Here we will introduce the Linux partition in detail, taking Red Hat Linux7.1 as an example.

First, we need to have a preliminary understanding of the basic concepts of Hard Disk partitioning. Hard Disk partitioning is mainly divided into basic partitions.
(Primary Partion) and Extension Partion.
And cannot be greater than four. The basic partition can be used immediately but cannot be partitioned. The expanded partition must be partitioned again.
Yes, that is, it must be partitioned twice. So what will be further divided by the expanded partition? It is
There is no limit on the number of Logical partitions.

For users who are used to Dos or Windows, there are several partitions with several drives, and each partition has
Then you can use the letter to specify the files and directories in the partition.
The file structure is independent and easy to understand. But is it annoying for these users to get started with Red Hat linux?
People. For Red Hat linux users, no matter how many partitions there are, which directory is assigned for use, it is ultimately
There is only one root directory and an independent and unique file structure. In Red Hat linux, each partition is used to form an integer.
File system, because it uses a processing method called "LOAD", its entire file system contains
A complete set of files and directories, and associate a partition with a directory. In this case, a partition to be loaded will make its
The bucket is obtained in a directory. Next, let's take a look at how Red Hat linux drives are identified.

For an IDE hard drive, the drive identifier is "hdx ~", "Hd" indicates the type of the device where the partition is located. Here is
Indicates the IDE hard disk. "X" indicates the disk number (a is the basic disk, B is the basic slave disk, c is the auxiliary master disk, and d is the auxiliary slave disk ),
"~" The first four partitions are represented by numbers 1 to 4. They are primary partitions or extended partitions. They are logical partitions starting from 5.
Partition. For example, hda3 indicates the third primary or extended partition on the first IDE hard disk, and hdb2 indicates the second partition.
The second primary or extended partition on the IDE hard disk. For a SCSI hard disk, it is marked as "sdx ~", SCSI hard disk is used
"Sd" indicates the type of the device where the partition is located. The rest are the same as the representation of the IDE hard disk.

We can see from the above that the partitions in Red Hat linux are different from those in other operating systems.
The format is Ext2 and Swap. Ext2 is used to store system files, and Swap is used as the Swap partition of Red Hat linux.
Now we can know that Red Hat linux requires at least two dedicated partitions (Linux Native and Linux
Swap) Moreover, Red Hat linux cannot be installed in the Dos/Windows partition. In general, we use Red Hat Linux
Install one or more hard disk partitions of the "linux Native" type, but in each partition of Red Hat Linux
You must specify a "Mount Point" (load Point) to tell Red Hat linux that the directory must be
To which directory to use. A "Swap" partition is generally defined and does not need to define a load point. Next we will first
Have a preliminary understanding of "linux Native" and "Linux Swap.

* The SWAP partition is the SWAP partition for LINUX to temporarily store data that is not used in the primary memory.
Yes, it is re-tuned into the memory when necessary, and the "Mout Point" (loading Point) does not need to be specified for the partition used as the SWAP ),
Since it is used as a swap partition, we should give it a specific size, which must at least be equal to the actual amount of memory on the system,
Generally, it is twice the memory size. Specifically: After the installation process is successfully started, a boot: prompt is displayed,
In this case, you only need to type boot: linux mem = 512 MB (assuming your computer memory is MB ). In addition, you can create and use more than one exchange
Partition, up to 16.

* Linux Native stores system files. It can only use the EXT2 partition type, as mentioned above. Pair
For Windows users, the operating system must be installed in the same partition. Is it commercial software! So you have no choice!
For Red Hat linux, you have a lot of options. You can divide the system files into several zones (you must
Indicates the load point), or you can install it in the same partition (the load point is "/"). Next let's take a look at what can be created
Partition (only several types of columns are commonly used ).

/Boot partition, which contains the kernel of the operating system and the files used during system startup.
Zone is necessary, because most PCs are currently subject to BIOS restrictions, and if there is a separate/boot
Dynamic partition, even if the main root partition has a problem, the computer can still start.

/Usr partition: the place where the software is stored in Red Hat linux. If possible, allocate the maximum space to it.

/Home partition is the location of your home directory. The size of this partition depends on the number of users. If there are multiple
If you use a computer together, this partition is completely necessary, and the root user can control the common
Users use computers, such as implementing limited disk usage for users or user groups, and restricting normal users to access files.
In fact, it is also necessary for a single user to establish this partition, because without this partition, you can only Log On As the root user.
This is dangerous because the root user has the absolute right to use the system. However, if you mistakenly operate the system
As well as the trouble.

/Var/log partition is the System log Record Partition. If this independent partition is set up, even if the system
Log files are faulty, and they do not affect the primary partition of the operating system.

/Tmp partition, used to store temporary files. This is necessary for multi-user systems or network servers. This
Even if a large number of temporary files are generated during the program running, or the user has performed an incorrect operation on the system
It is still safe. Because this part of the file system is still subject to read/write operations
Its parts cause problems faster.

/Bin partition, which stores standard system utilities.

/Dev partition to store device files.

/Opt partition, which stores optional installed software.

/Sbin partition, which stores standard system management files.

This section describes several common partitions. Generally, we need a SWAP partition, A/boot partition, and
/Usr partition, one/home partition, and one/var/log partition. Of course, there is no rule. It is based on your individual
. But remember that there must be at least two partitions, one SWAP partition and one/partition. Next let's take a look at how to partition.

You can use two partitioning tools:

1. Disk Druid: it is a hard Disk management tool provided by Red Hat linux. It was initially released with Red HatLinux5
Released together, it can create and delete hard disk partitions according to user requirements, in addition to each partition management Load
Point, this is a good partition software, it is recommended for readers to use. This article also introduces the Red Hat linux
Partition.

2. Fdisk: it is a traditional linux hard Disk partitioning tool, which is more powerful and flexible than Disk Druid. However
Fdisk requires you to have some experience in hard disk partitioning and be able to adapt to and understand simple text interfaces. If you are the first
If you partition a hard drive at a time, it is best to avoid programs such as Fdisk. Although it is powerful
The usage is not very good.

Note: In addition, Red Hat linux also provides a partition software called fips, but such partition software has a certain
Is not recommended. Although many people have successfully used fips to partition their hard disks
There is no guarantee that fips will run normally in your system. Moreover, Red Hat linux does not support fips,
We recommend that you use this partitioning software with caution.

If you want to install Red Hat linux on a disk that already contains other operating systems, that is, multiple operating systems
This situation is complicated, because a mistake can destroy the data that you have worked hard to save and make you cry
Tears. If you want to make Red Hat linux and OS/2 coexist, you must use the OS/2 partition software to create hard disk partitions,
Otherwise, OS/2 won't recognize hard disk partitions.

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: info-contact@alibabacloud.com 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.