Allocation space, I think the first thing to know what to install under the directory, so it is good to decide how much should be allocated.
/root directory
/bin to store the necessary orders
/boot Store the kernel and start the required files, etc.
/dev Storage device files
/ETC Storage System Configuration file
/home the home directory of user files, where user data is stored in its home directory
/lib Store the necessary run-time libraries
/MNT Store the temporary mapping file system, we often hang the floppy drive and the optical drive in the floppy and CDROM subdirectories here.
/proc Store stored processes and system Information
/root Super User's home directory
/sbin Storage System Management Program
/tmp directory where temporary files are stored
/usr contains applications that do not normally need to be modified, command program files, libraries, manuals, and other documents.
/var contains frequently changing files that are generated by the system, such as printers, mail, news, spool catalogs, log files, formatted hand albums, and data files for some applications, and so on. It is recommended that you put it separately in one partition.
The typical/usr directory is as follows:
/X11R6 Storage X Window System
/bin storage of Added user programs
/dict Store Dictionary
/doc an appended document
/ETC Storage settings File
/games Store games and teaching documents
/include Storage of C development Tools header files
/info holds GNU information file
/lib Repository Files
/local storage of locally generated incremental applications
/man Store online Help files
/sbin Storage of additional management procedures
/share storing structure-independent data
/SRC the source code of the store program
An Ubuntu user partition:
First of all, introduce the concept of partition in Linux, this is the first to learn I have suffered. In Linux, each hard disk device can have up to 4 primary partitions (which contain extended partitions), and any one of the extended partitions occupies a primary partition number, that is, on one hard disk, the primary partition and the extended partition are up to 4. For earlier DOS and Windows (previous versions of Windows 2000), the system recognizes only one primary partition, and can further refine the partition by increasing the logical disk character (logical partition) on the extended partition.
The primary partition is used by the computer to start the operating system, so every operating system startup, or boot, should be hosted on the primary partition. This is the biggest difference between the primary partition and the extended partition and the logical partition. The best example of this is to specify the primary partition when installing the bootloader to boot Linux.
Linux requires that the primary partition (or extended partition) occupy the first 4 digits of 1 to 16th code. As an example of the first IDE hard disk, the primary partition (or extended partition) occupies the hda1, Hda2, Hda3, HDA4, and the logical partition takes up 12 numbers from Hda5 to Hda16. As a result, there are a maximum of 16 partitions per hard disk under Linux.
For logical partitions, Linux requires that they be built on extended partitions (as is the case on DOS and Windows systems), not on primary partitions. As a result, we can see that extended partitions can provide a more flexible partitioning model, but not as a guide to the operating system.
Before these concepts are unfamiliar, zoning on a lot of detours. So, in the end what is a good zoning plan, I think a matter of opinion, I am so divided. In principle/and/home it is basically best to mount two partitions separately, because home can be viewed as my document in Windows, with more personal data than home. /A little bit indifferent, it is said at least 2G, I have not tried. Others, such as/TMP and/var, because of the very active documentation, in order to avoid the impact of their file fragments on other areas, it is best for them to hang a zone. Finally/opt mainly installs the large software, if has the redundant partition to give him to hang a bar. Start partitioning
Start with a 100M primary partition and Mount boot. The files required for grub startup are in the/b o O directory. So even if the work partition is out of the question, as long as the partition is not a problem, the same can be started. So the best way is to specialize in a section of the root file, the size of the general up to 64M, I gave the insurance to 100M.
The subsequent partitions are all in the form of an extended partition, with many logical partitions under the extended partition.
First, create an exchange partition that is twice times larger than the size of the memory. If your memory is 1G the same as mine, it's OK to row 1G. In fact, it's not nearly as big as that. Partition format remember to change to Linux-swap.
Then create a partition as large as possible to/usr, because there are most of the system software, including the X server and other graphical interface programs. I've split 20G.
Next, create the/home mount partition. Considering my working document is more, the source code and program also often put here, so gave 10G.
Other such as Tmp,var, Single-user machine is not to be considered. Of course do not know my machine will have server applications, I still give the Var 2G space.
All other spaces are mounted to/. Although the general 2G is enough, but the more the more. Note: Many times, if you use the Ubuntu CD-ROM with its own installation tool partition, there will be many problems. If you encounter problems, recommend two methods: 1 in the live CD environment, in the terminal directly with sudo fdisk/dev/xxx to partition, and then W save after reboot, and then into the installation tool, manually edit the registry when it recognizes that you edit the partition table, No need to modify the direct next step. 2 You can also use the LiveCD of Fdisk after the area, with the CD on the LiveCD installer program, installed at the command line. But this installer only requires you to mount/and swap. So what about the other partitions? Can be divided first, you can also install the system again points. If you want to mount the other partitions under the desired directory. Give an example. If you want to mount the/home/user to the new SDA8 partition, you can do this: first, mount the/dev/sda8 to/mnt/sda8. If you do not have this directory on your own mkdir. Then, Cp-r/home/user/*/mnt/sda8/user, and Cp-r/home/user/.*/mnt/sda8/user last modified/etc/fstab, adding one line/dev/sda8/home Defaults 0 2 (parameters determined by oneself) can be.