Detailed description of UbuntuLinux hard disk partitioning Solution

Source: Internet
Author: User
How can we reasonably divide Ubuntu into multiple zones? In the past, Linux was installed using automatic disk space allocation. I felt this was not very professional, so I found a good article in Baidu and GOOGLE .. The depressing thing is that I didn't find the extended partition settings mentioned in this article (only the primary partition and logical partition are displayed in the option, and I understand that it will automatically include these logical partitions in the extended partition, are you sure you want ?). I have not seen the option to mount swap (I manually entered it) I. Linux partition Concept

How can we reasonably divide Ubuntu into multiple zones? In the past, Linux was installed using automatic disk space allocation. I felt this was not very professional, so I found a good article in Baidu and GOOGLE .. The depressing thing is that I didn't find the extended partition settings mentioned in this article (only the primary partition and logical partition are displayed in the option, and I understand that it will automatically include these logical partitions in the extended partition, are you sure you want ?). No option for swap mounting is displayed (I manually entered it)

I. Linux partition Concept

First, I would like to introduce the partition concept in linux, but it hurts me from the beginning. In Linux, it is stipulated that each hard disk device can have a maximum of four primary partitions (including the extended partition). Any extended partition must occupy one primary Partition Number, that is, in a hard disk, there are a maximum of four primary and extended partitions. For earlier DOS and Windows (versions earlier than Windows 2000), the system recognizes only one primary partition. You can add a logical drive letter (logical partition) to the extended partition, further refine the partition.

A primary partition is used by a computer to start the operating system. Therefore, the boot of each operating system, or a boot program, should be stored in the primary partition. This is the biggest difference between primary and extended partitions and logical partitions. This is the best example when we specify the bootloader for Linux installation and boot on the primary partition.

Linux requires that the primary partition (or extended partition) occupies the first four numbers from 1 to 16. Taking the first IDE hard disk as an example, the primary partition (or extended partition) occupies hda1, hda2, hda3, and hda4, while the logical partition occupies 12 numbers from hda5 to hda16. Therefore, each Hard Disk in Linux has a total of 16 partitions.

For logical partitions, Linux requires that they must be built on extended partitions (also in DOS and Windows systems), rather than on the primary partition. Therefore, we can see that the extended partition provides a more flexible partition mode, but it cannot be used as a boot for the operating system.

I used to be unfamiliar with these concepts and made a lot of detours in partitioning. So what is a good partition solution? I think this is my opinion. In principle, it is best to mount two partitions/AND/home separately, because home can be regarded as my document in windows. If you have more personal data, home must be larger. /It doesn't matter if it is small. It is said that at least 2 GB, and I have never tried it. Others such as/tmp and/var because there are a lot of active files, to avoid the impact of their file fragments on other areas, it is best for them to mount a zone. Finally,/opt mainly installs large software. If there are extra partitions, you can mount one for it.

Related Article

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.