0

I'm new to Linux and I need help with understanding partition types when setting up mount points.

So I'm doing a project where I have to set up mount points for:

  • /boot
  • /var
  • /home
  • swap
  • /tmp
  • /

So far, setting up the type of file system, size and options are quite straight forward.

However, the project mentioned that the partition type for /boot, /var, and /home should be Primary, while the partition type for swap, /tmp, and / should be logical.

So, right now I'm very confused on to what the Partition type means when setting up mount points and the difference between Primary and Logical partition types.

Or am I just misunderstanding those terms?

1

Partitions are indexed in a partition table. MBR was one of the first indexes and it has room for four partitions (named primary). If you need more than that, then you have to create an extended partition, whose only mission is to hold the indexes to many logical partitions_.

Once in the kernel they are all just partitions, be they logical or primary (the extended is used to map the logical but it is not one you would mount). They behave the same way and are mounted the same way. But for the boot loader for example, the distinction is important and some systems can only be booted from a primary partition.

The newer GUID Partition Table (GPT) can hold a very large number of partitions and the distinction logical/primary does no longer exist.

There are other types of partition tables. fdisk for example understands GPT, MBR, Sun, SGI and BSD partition tables

  • Thank you for answering! So its not possible to configure whether the mount point will be primary or logical? – Zack Jun 27 '20 at 20:18
  • 1
    You can set the mount point to whatever block device you have available. If you want to use one of primary partitions or one of the logical, or even the whole disk without any partition at all (you don't need partitions), the kernel does not care, as long as you have a mountable filesystem there. The condition you have makes sense for a homework assignment. I don't know about a real life situation. – Eduardo Trápani Jun 27 '20 at 20:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.