1. 程式人生 > >Ubuntu分割槽小知識與分割槽方案

Ubuntu分割槽小知識與分割槽方案

Most PC operating systems still work with an ancient disk partition scheme that historically makes distinction between primary and extended partitions. It also places a limitation for four primary partitions or three primary partitions and one extended partition. When present, an extended partition can then be divided into any number number of logical partitions.
However, many recent (since 2011) machines use a different and incompatible scheme known as “gpt” which allows many more primary partitions. Search these pages for UEFI to learn how to tell which scheme your system is using; applying techniques for one scheme to a system that uses the other will definitely lead to possibly serious problems.
Each Windows installation will need to be installed on a primary partition. Windows systems commonly assign a drive letter to each individual (Windows) partition.
Linux operating systems need a minimum of one partition: one for the OS itself (and data files) and optionally one for a swap area (to be used as an extension for RAM memory) if preferred over a swap file.
While these two partitions can be primary partitions, more flexibility is afforded when logical partitions (within the extended partition) are used. In this manner, as many partitions can be created as is desired. Multiple (Ubuntu Linux and Mac) operating systems can be installed, each in its own partition, and data can also be more easily compartmentalized when it is placed within individually separate logical partitions. (The swap partition can also be located on a logical partition.)

一句話概括:Ubuntu系統在一個硬碟上只支援最多4個 Primary 分割槽或3個 Primary 分割槽加1個 Extended 分割槽。Extended 分割槽下面可以有多個 Logical 分割槽。

以2TB大小的硬碟為例,結合官方推薦的分割槽方案(單系統):

  • swap: 10GB (10240MB)
    這是10GB是以系統記憶體大小4GB的2倍為依據的。也就是說,swap 分割槽的大小要大於系統記憶體大小的2倍。

  • (root)/: 30GB (30960MB)
    存放 Ubuntu 系統檔案和程式

  • /home: 100GB (102400MB)
    存放系統/應用的配置檔案,資料和其他檔案。Ubuntu 下新建一個使用者會自動在/home

    資料夾下新建對應的資料夾/username,這個使用者的文件、下載等都存放在這個資料夾裡,所以這個分割槽不能太小。

  • 10850GB空間分給其他,比如/data/存放資料或/download當下載盤。

參考文獻

根據我自己查到的資料,分割槽型別為 Primary 或 Logical 本身並不影響分割槽的效能和使用。

參考文獻