Centos 5.5 hard disk partitioning Solution

Source: Internet
Author: User
Tags what file system

Hard Disk partitioning scheme

Installing Linux on a computer is an important step in partitioning a hard disk. The following describes several partitioning schemes.

(1) solution 1
/: The recommended size is 5 Gb or above.
Swap: swap partition. the recommended size is 1 ~ of the physical memory ~ 2 times.

(2) solution 2
/Boot: used to store programs related to Linux Startup, such as boot loader. the recommended size is 100 MB.
/: Linux root directory. All directories are mounted under this directory. the recommended size is 5 Gb or above.
/Home: stores the data of common users, which is the home directory of common users. The recommended size is the remaining space.
Swap: Implements virtual memory. The recommended size is 1 ~ of physical memory ~ 2 times.

(3) solution 3
/Boot: used to store programs related to Linux Startup, such as boot loader. the recommended size is 100 MB.
/Usr: used to store applications in the Linux system. The related data is large. It is recommended that the data size be greater than 3 GB.
/Var: used to store frequently-changing data and log files in Linux. It is recommended that the value be larger than 1 GB.
/Home: stores the data of common users, which is the home directory of common users. The recommended size is the remaining space.
/: Linux root directory. All directories are mounted under this directory. the recommended size is 5 Gb or above.
/Tmp: place the temporary disk in an independent partition to avoid affecting the system stability when the file system is full. The recommended size is more than MB.
Swap: Implements virtual memory. The recommended size is 1 ~ of physical memory ~ 2 times.

Bytes -------------------------------------------------------------------------------------------------------------------------------

Disk Partition Configuration

If it is a brand new hard disk, the following error message may occur. This information only prompts you That the installer cannot find the partition table, so don't worry. Press the "yes" button, as shown in.

(1) Partition Mode

As mentioned above, disk partitioning is the most important part of the installation process. Centos presets four partition modes:

<1> delete all partitions on the selected disk and create the default partition structure:
If this mode is selected, your hard disk will be used by Linux, and all partitions in the hard disk will be deleted, and then the partition structure will be re-established by the preset method of the installer, pay special attention to the usage!

<2> Delete Linux partitions on the selected driver and create the default partition structure:
In this hard disk, Only Linux partitions are deleted, and then the partitions are re-created by default of the installer.

<3> use the free space in the selected drive and create the default partition structure:
If there is still unsplit disk space in your hard disk (note that it is not split, rather than there is no data in the partition !), After this project is used, it will not change the original partition, but will only build the default partition for the remaining unsplit blocks.

<4> create a custom partition structure:
This is what we want to use! Do not use the preset Splitting Method of the installer. Use the required splitting method.

(2) default partition Mode

As shown in the disk partition Settings dialog box, select default (delete Linux partitions on the selected driver and create the default partition structure. Click "Next", and a prompt is displayed, as shown in. Click "yes". Next, the system default disk settings shown in are displayed. Click "Next.

(3) custom partition Mode

As shown in the "disk partition Settings" dialog box, select "create custom partition structure. Create four partitions, which are /,
/Boot,/home and swap.

After you press 'Next', the following Partition window appears. This screen is mainly divided into three major blocks:
The top part is the partition of the hard disk. Currently, because the hard disk is not partitioned, the entire partition is displayed and it is free. In the middle is the command area, and below is the device file name, mount point directory, file system type of each partition, whether to format, partition capacity, start and end of the magnetic column number, etc.

As for the command area, there are a total of six blocks. Raid and LVM are special hard disk applications. We will introduce this part separately. The functions of other commands are as follows:

New: adds a new partition, that is, the partition action, to create a new disk partition;

Edit: edit an existing disk partition. You can click the partition you want to modify in the actual status display area, and then click 'edit' to edit the partition.

Delete: delete a disk partition. Similarly, You must select the partition you want to delete in the actual status display area.

Resetting: restores the original disk partition status.

TIPS: Of course, your system and the author's system cannot be exactly the same, so the hard disk information on your screen should not be the same as the author's! So don't be too nervous when you see the difference. That's normal.

Next, create the root directory (/) partition. After you press "new", the following screen is displayed. Because the root directory we need is a Linux File System, the default file system is ext3. As for the mount point, you can manually enter or use the mouse to select. Enter the required disk capacity in MB. However, since the author's system only has one hard disk, it cannot be freely selected in the "allowed drive.

 

The final result of creating a/boot partition is as follows. It will take the initiative to move the/boot special directory to the front of the hard disk, so you will see that the hard disk partition of/boot is/dev/hda1, the starting column is 1. As shown in:

TIPS: Some installers do not specify swap as memory 1 ~ A warning message is sent twice. In this case, you only need to ignore the warning message and click Next.

Let's continue to complete the last partition/home. Press "new" and enter the correct information in sequence, including the mount point, file system type, and size.

 

Shows the final result of the partition. You will find that the system automatically converts/dev/hda4 into extended partitions. Then, all the capacity is assigned to/dev/hda4, and swap is allocated to/dev/hda5.

In, press "new" to switch the space (SWAp ). As mentioned above, because swap is a swap space, there is no need for a mount point. Select "Swap" in "file system type", as shown in ".

The file system types are:

Ext2/ext3: Applicable file system type in Linux. Because the ext3 file system has a log record while restoring the system quickly, we recommend that you select a new ext3 instead of using ext2.

Physical volume (LVM): This is a mechanism used to elastically adjust the file system capacity. It can increase or decrease the capacity of your file system without changing the original file content.

Software raid: simulates the disk array function with software based on the features of the Linux operating system.

Swap: The swap space! Because SWAp does not use directory tree mounting, you do not need to specify a mount point when using swap.

Vfat: The file system types supported by both Linux and Windows. If your host's hard drive has both Windows and Linux operating systems, you can build a vfat file system for data exchange.

We continue to press "new" to create the/boot partition. Enter the correct information in sequence, including the mount point, file system type, and size. Make sure that the partition is located at the beginning of the entire hard disk. Therefore, we select "force-partitioning" for/boot ". As shown in:

If you want to know what file system types are supported by Linux, click the ext3 button in the following figure.

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: 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.