Ubuntu allocates disk space for users Linux hard disk partition scheme __linux

Source: Internet
Author: User
How to give Ubuntu a reasonable division of the area. Previously installed Linux is used to automatically allocate disk space, feel so less professional, so in Baidu and Google find a pass, see a good. What's depressing is that the extended partition settings are not found in the article (only primary and logical partitions are seen in the option), and I understand that he will automatically include these logical partitions in the extended partition. )。 I didn't see the option to mount swap (I filled it myself manually) I. Linux partitioning concept
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.

Second, start the partitionOK, that's what I'm looking at, starting with a 100M primary partition and mounting the 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 are having trouble
Go, recommend two ways: 1 in the live CD environment, in the terminal directly with Sudo fdisk/dev/xxx
To partition, then W save after reboot, and then into the installation tool, manually edit the registry when it recognizes that you edit the partition table, do not
Use the modification to direct the next step. 2 You can also use LiveCD's fdisk to divide the area, with the LiveCD on the CD
Installer the program to install 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 take/
Home/user is mounted under the new SDA8 partition, you can do this: first, mount the/dev/sda8 to the/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 nbsp defaults  0  2 (the parameters are determined by themselves).  

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.