The following content requires some basic Linux knowledge. If you can't see it, remember that when installing Linux, you should at least score two shards "/" and "swap ". You may not consider other items for the moment.
BKJIA Editor note:Swap-swap partition, the system runs the "virtual memory ". As we all know, modern operating systems have implemented the "virtual memory" technology, which not only breaks through the physical memory restrictions in terms of functionality, so that programs can manipulate space larger than the actual physical memory, more importantly, "Virtual Memory" isolates the security protection network of each process so that each process is not disturbed by other programs.
The role of the Swap space is described as follows: when the system's physical memory is insufficient, a part of the physical memory needs to be released for use by the currently running program. The released space may come from some programs that haven't been operated for a long time. The released space is temporarily saved to the Swap space and will be executed by those programs, then, the stored data is restored from Swap to the memory. In this way, the system always performs Swap switching when the physical memory is insufficient. This phenomenon is common to computer users.
During partitioning, within the 8 GB physical memory, the swap partition is generally twice the physical memory .]
The "/usr" partition should be 1 GB idle so far. First, do you need to install a large number of software in your system? If you just try something fresh, stop here. As mentioned above, all the miscellaneous things are thrown into "/opt", and it is best to partition "/opt.
Divide "/opt" into five categories:
The system and all kinds of data need to be backed up, so we have "backup". Instead of putting all the user data in the "/" partition, we have created the "home" directory here "; if you have programs installed on your own, you can create the directory "prog". If you have public resources such as flash and mp3, you can create the directory "store". DOS/Window partitions are frequently accessed, therefore, it will not be placed in the temporary mount point "/mnt", but all will be placed in "zzz.
The first four directories can be divided into one partition for each directory, but I can only free up three more partitions. My own practice is to "backup" the next partition and "home" the next partition, "prog" is the next partition, "store" is actually created in "prog", and then linked to "/opt.
This is also subject to your actual situation. However, it is best to have a partition under "/opt/prog" because KDE handles some problems with links. In the personal home directory, various settings of the desktop environment are often stored, while the settings of different Linux distributions are different, therefore, under "/opt/home", I created some directories with the same name and permissions and linked them to the user's home directories respectively, named "123 ". Apart from installing software in it, all sorts of miscellaneous things are sometimes thrown into this "123" and are actually thrown into a directory under "/opt/home.
There are also several subdirectories in the "prog" directory:
"/Opt/prog/c ". "C", constant, fixed, and fixed. After installation, the old software cannot be moved to the nest, or too many may cause trouble to move the nest, such as the "JBuilder8" that has been used ". When a new software is installed, I don't know whether it works normally if I move the software to another location after the installation is complete, so the new software is usually installed here.
"/Opt/prog/l ". "L", linkable, can be connected everywhere. After the software in "/opt/prog/c" is installed, I will try to move the installation directory of the software to another place and rename the installation directory, then, use the original name as a symbolic link in "/opt/prog/c" to point to the installation directory renamed by shift. "Apache", "MySQL" and other software can still work normally under such circumstances. I will move this type of software from "/opt/prog/c" to "/opt/prog/l, in "/opt/prog/c", create a link pointing to the new location.
"/Opt/prog/m ". "M", moveable, can be moved around. There are also some software, such as "Tomcat", "JDK", and "PostgreSQL". Even if they are not in their initial installation location and change their names, you only need to change the environment variables, or do a little bit of setup, they can also work normally. This kind of software is very convenient to move, and I will move it to the place where I can leave immediately after I pat my ass.
"/Opt/prog/tmp ". Temporary utility stack. The installation file of the new software is temporarily put here. The new software is compiled and installed here.
"/Opt/prog/store ". I don't have more partitions for "/opt/store", so on my machine, "/opt/store" actually points to the symbolic link here.
To do this, we need to grab at least one partition from the Window.
During Linux installation, it is best not to change the three partitions and the partitions in front of the Linux system. Only the partitions after the Linux system will be transferred, which will not affect Win. If your Linux server is installed in the last few partitions, or the subsequent partitions are not enough, you have to grab the previous partitions. In this case, it is best not to change the number of partitions. This will not have much impact.
Unfortunately, if you have to change the number of partitions, your Linux may not start after the adjustment. Now you have to use the boot disk created during installation. Calculate again to see which partition is your Linux "/" at this time. Assume that the Linux "/" partition is "hdxy" at this time. Use a floppy disk to boot and enter "linux 1 root =/dev/hdxy" when ":" is displayed ", linux will start at runlevel 1. Alternatively, you can use another method to enable Linux to start at runtime Level 1. Follow the previous steps to create a new boot sector image for Linux. Don't forget to adjust "/etc/fstab", which is also based on your actual situation.
Related Articles]
- Common Methods for automatic mounting of Windows File System partitions
- Solaris File System Partition
- Linux installation (Special topics)