Before analyzing and describing the LINUX partition recommendations, you must master the file structure of Linux, and then give a full description of the LINUX partition recommendations, linux is a complete software package consisting of development tool software, editor software, CPU graphical user interface, and network tool software. Linux has all the features of a modern, fully functional UNIX system, including real multitasking, virtual memory, shared libraries, excellent memory management, and TCP/IP network support.
Linux File structure, mounting, and partitioning suggestions
Windows File structure is a parallel tree structure with different disks (partitions) at the top, such as C, D, E, and F. The file structure of Linux is a single tree structure. At the top is the root directory, that is /. The root directory contains multiple subdirectories, including/bin,/boot,/dev,/etc,/home,/lib,/media,/mnt,/OPT,/proc,/root,/sbin,/tmp, /usr and/var. The specific functions of these directories are not described in detail here. All Linux partitions on the disk must be mounted to a specific directory in the directory tree for read and write operations. Obviously, the root directory is where all Linux Files And Directories are located, and a disk partition needs to be mounted. As mentioned above, LINUX partition swap also requires a separate partition. Therefore, installing a Linux system requires at least two partitions. (In fact, it is also possible to install linux using only one partition. If the physical memory of the computer is large enough, swap partitions is not necessary.) in different Linux installation tutorials, different authors explain different partition suggestions, and this article is no exception. Many of the following suggestions are personal preferences. Therefore, readers do not have to partition according to these suggestions. The best solution is to select the one that best suits them.
/Boot: In many old tutorials, users will mount an independent partition of about mb in the/boot directory. We recommend that you put this/boot in front of the hard disk, that is, before the 1024 cylinder. As a matter of fact, this is the legacy of Lilo's era of failing to guide the operating system kernel behind 1024 cylinders. Of course, some authors claim that the benefit of independent mounting/boot is that multiple Linux instances can share one/boot. In fact, no matter which of the above reasons, there is no need to separate the/boot partition. First, grub can boot the Linux kernel after the 1024 cylinder. Second, even if multiple Linux systems are installed, the/boot is completely available. Because the size of the/boot directory is usually very small, about 20 mb, a MB partition is undoubtedly a waste, and the hard disk is also fragmented, not convenient to manage. In addition, if two Linux systems share one/boot, every time the kernel is upgraded, grub configuration files may conflict with each other, causing unnecessary trouble. In addition, the non-independent/boot partition only occupies about 20 mb of space in the root directory, and does not affect the use of the root directory. It is worth noting that as the hard disk capacity increases, the Linux kernel cannot be guided to appear again, which is also known as the GB limitation. Unfortunately, grub cannot boot the Linux kernel in the shard after GB. If you encounter such a situation (I have met it), you should consider attaching/boot to an independent partition located in front of 137gb, or simply move all Linux partitions forward so that the root directory is located before GB.
/Usr/local: We recommend that you use the/OPT,/usr, or/usr/local independent tutorial, which is basically very old. When we use Ubuntu, we usually use the software package manager of the system to install software, and seldom compile and install any software by ourselves. However, we recommend that you use an earlier compiled version for independent/usr,/OPT, and/usr/local only to reinstall the system without re-compiling the software. Therefore, this suggestion is meaningless for most common users.
/Var: We recommend that you set/Var and/tmp independent tutorials for servers. Because high-load servers usually generate many log files and temporary files, and these files are often changed, separating/Var and/tmp is conducive to improving the server performance. We use Ubuntu as a desktop, and even some users never care about system logs, so there is no need to independently Mount partitions for/var and/tmp.
/Home: This may be the only directory worth mounting Linux partitions independently. /Home is the place where the user folder is located. A user may store a large amount of File Information in/home/user. If you mount/home independently, you can immediately reinstall the system even if the Ubuntu system is killed for no reason, obtain your own documents. Therefore,/home is the only directory that can be considered to independently Mount Linux partitions.
After reading some of the above introductions, you may already know my suggestions:
-Dual LINUX partition Solution
/:It should be at least 3 GB. We recommend that you try to score as many points as possible based on the actual situation, especially for users who like to play with various types of software.
Swap:The physical memory is less than or equal to 512 MB. We recommend that you allocate swap with 2 times the actual physical memory capacity. The physical memory is greater than 512 MB. We recommend that you allocate swap with physical memory and other capacity.
-3. LINUX partition Solution
/:It should be at least 3 GB. We recommend that you try to score as many points as possible based on the actual situation, especially for users who like to play with various types of software.
/Home:Allocate 1 GB ~ according to actual needs ~ GB or more, as appropriate.
Swap:The physical memory is less than or equal to 512 MB. We recommend that you allocate swap with 2 times the actual physical memory capacity. The physical memory is greater than 512 MB. We recommend that you allocate swap with physical memory and other capacity.
In addition, we recommend that you install Linux in the primary partition or mount a primary partition under/boot in some old tutorials. In fact, this is not required. All Linux partitions can be in logical partitions. Therefore, do not be misled by these old tutorials. Do not waste limited primary partitions. install Linux in logical partitions with confidence.
From: http:// OS .51cto.com/art/201001/175635.htm