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 stored in this directory.
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.
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:/,/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.