Partitioning file system linux

Partition design

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.)

Читайте также:  Ноутбук линукс как пользоваться

Use Gparted to create/manage partitions

The easiest way to do this is to use the GParted Live CD as a partition manager, or the GPartEd utility on the Ubuntu LiveCD.

Examples

Basic Partitioning Scheme for a 2TB Desktop HDD

  • Primary Partition — 1Gb (1024Mb) of Free Space — bootstrap files, boot loaders and stuff you’ll may need to run multiple operating systems
  • Extended Partition
    • 10Gb (10240Mb) — swap
      • (0.5% is not much, and 10Gb is double the memory size of typical 4Gb system)
      • (for Ubuntu system files and applications)
      • (system/application dependent config, data and other files)

      Partitioning Scheme for Multiple systems

      • one primary partition for each Windows OS
      • an extra small primary partition (which can be resized later, in case it is needed). If there is a Windows recovery partition already installed, leave it alone (as the second partition).
      • one primary partition for the small boot partition (for storing a set of GRUB bootloader files)
      • an extended partition for the Linux (or Mac) OSs (must be the last partition on the hard drive)
      • the Windows partition 20 — 30 Gb — filesystem type NTFS (or can even be FAT32) and with the boot flag checked
      • an «extra» partition 2 Gb — can be formatted as ext3, ext4, or FAT32. If this already exists as a Windows recovery partition, leave it unchanged.
      • Temporary Edit xxxx a GRUB boot partition 100 Mb, formatted to filesystem type ext3 xxxx Unless you want to end up in Ubuntuforums asking for help with a package manager that is complaining about a full boot partition, DO NOT create and use a separate boot partition. For 99% of home installations it is totally unnecessary.
      • the extended partition is the remainder
      • (At the end of the hard drive a few Gb of free space can be left (to allow for extra logical partition needs that were not foreseen. This can’t be done unless the extended partition is the last partition.)
      • Divide the extended partition into multiple logical partitions:
      • a /swap logical partition that is 2 Gb — filesystem type linux-swap
      • a logical partition for the / (root) folder of each planned Linux (or Mac) OS (at least 10 Gb each, but 20-50 Gb is better) — formatted as ext3 (or ext4 if you are planning to use a newer Linux OS)
      • optionally, a logical partition for each planned specific use, such as a groupware partition (Kolab, for example). Often, 20 Gb data partitions formatted as an ext3 filesystem is suitable, since many specific programs (like Kolab) will be comfortable with ext3 filesystems. Many users often also create a separate partition for the /home directory (so that all personal data files can be stored in a partition separate from the operating system).

      Partitioning Scheme for SSD

      • Better leave all read-only files on SSD and use hard disk for everything else
      • https://wiki.debian.org/ReadonlyRoot should clarify which parts of the filesystem tree can be read-only: moving /usr to read-only would be the most significant thing (greatest space required) I guess but you have to ensure it is remounted as required when doing apt-get install or remove. See that page for more info.

      Other resources

      PartitioningSchemes (последним исправлял пользователь 188-67-179-238 2014-11-07 19:27:44)

      The material on this wiki is available under a free license, see Copyright / License for details
      You can contribute to this wiki, see Wiki Guide for details

      Источник

Оцените статью
Adblock
detector