Logical and primary partitions linux

Primary or logical partition

I am planning to install Debian and am wondering which partition should be primary and which should be logical. I want to create four partitions:

/boot 300 MB ext2 --> primary or logical? / 30 GB ext4 --> primary or logical? swap 4 GB swap --> primary or logical? /home 100 GB ext4 --> primary or logical? FREE SPACE for a possible other OS 

If I make every partition primary, the partition manager does not allow me to create another partition in FREE SPACE. I guess this is because I can at most make four primary partitions. So should I make one partition primary (which?) and the rest logical, or all logical or.

2 Answers 2

MBR only allows a maximum number of four partitions. Hence you must create at least one extended partition for the logical partitions. In general the extended partition should be placed at the end of the drive.

The real partitioning scheme depends on you. You can create only /boot as primary, or /boot and / (root) as primary, and the rest as logical.

Previous versions of Windows require the system partition to be primary, otherwise it won’t boot. Windows Vista and later versions could be installed to a logical partition without problem, but a primary system partition may still be recommended. So in general creating the first three partitions as primary and the rest as logical is recommended. You may reserve one of the primary ones for Windows and let Linux use the rest.

Lưu Vĩnh Phúc’s answer is basically correct for disks partitioned with the older MBR scheme, although I personally would recommend minimizing the use of primary partitions, since this will give you greater flexibility should you later need primary partitions for some other purpose.

Most new computers, though, use EFI/UEFI firmware, which generally uses the newer GUID Partition Table (GPT) partitioning system. Under GPT, there’s no such thing as primary, extended, or logical partitions; GPT has one partition type (which some tools report as «primary» partitions, although that term is meaningless in the absence of the other types). GPT supports up to 128 partitions by default, although that value can be raised with the right software, if necessary.

Читайте также:  Линукс виртуалбокс общая папка

If you’re using a computer that was sold in the last two years, you probably have the option of booting it in EFI mode or in the older BIOS (aka CSM or legacy) mode. If you’re dual-booting Linux with Windows, you should be sure to install Linux in the same mode that Windows uses. Computers that ship with Windows 8 almost invariably use EFI-mode booting, so if that’s your situation, you should plan to use EFI-mode booting and GPT. If you’re dual-booting an older computer, it probably uses BIOS-mode booting by default, although you’ll need to check your computer to be sure. If you’re setting up a Linux-only computer, you have your choice. Note also that Linux can use GPT even on a BIOS-based computer, although there are caveats with some BIOSes. Also, Windows requires MBR partitioning when booting in BIOS mode, so if you’re dual-booting with Windows in BIOS mode, you must use MBR.

  • BIOS-mode dual boot with Windows: Use MBR
  • BIOS-mode Linux-only setup: Use MBR or GPT, as you see fit (but MBR is the safer and more traditional choice)
  • EFI-mode Linux-only setup: Use GPT
  • EFI-mode dual boot with Windows: Use GPT

Источник

Ubuntu installation partitioning: Logical or primary?

Ubuntu Partitioning

I am in the process of reinstalling Ubuntu. When I got to this step: I was prompted to choose a logical or a primary partition. I’ve never seen this dialog box before — before it just told me to choose the mount point and the format. Should I choose logical or primary? The default is logical.

2 Answers 2

The short answer «it does not matter much».

MBR partitioning scheme allows you to have up to 4 partitions on a drive, one of those partitions can be an «extended partition», which acts as a container for any number of «logical partitions». The partitions which are not inside the extended partition are called «primary partitions».

Читайте также:  Install oracle database 11g on oracle linux

There’s no difference in how they function or anything. So, if you don’t have specific reasons, just go with the default choice.

FWIW, when I get a new drive, I usually create one big extended partition, with no primary partitions at all. This give full freedom to create as many logical partitions as I need, and to resize any partitions in the future without too much fuss. I’ve never had a problem doing it this way with any OS.

I think the explanation below is too basic for the OP, but I think it could be useful for a beginner.

That choice between «primary» and «logical» has always seemed confusing to me, because the terms are not alternatives (logically, I mean).

For a clear definition of the terms — there is a good answer here.

The difference between «primary» and «logical» is imposed by the limits of the MBR partition scheme, where a drive can only contain 4 partitions. When such partitions are created on a such derive, they are called «primary». In order to go above that limit, there is the «extended» partition, which is different from the primary in that it is not a partition on which you can put things and boot from it, but a sort of container for other partitions, a sort of virtual «drive» which can include more than 4 partitions.

In layman’s words: when a partition is created simply on a drive (in a MBR partition-scheme), it is called «primary», when it is created within an extended partition, it is called «logical».

What about the confusion? There is no confusion when partitioning with Gparted or similar tools which provide a choice between creating primary or extended partitions: we are not asked whether we want «logical» ones, because we need an extended one before having a logical one, and when we create a partition within an extended one, the new partition can only be logical.

The real choice is between primary or extended, and that’s what we see in a partitioning tool.

The GUI tool in the question is an installer, not a partitioning tool, and the choice it provides can be misleading: if we select «primary», that will result in what the terms says; but if we select «logical», it will create an extended partition containing one logical partition.

Читайте также:  Linux set default browser

That GUI doesn’t say anything about «extended» partitions, we are supposed to know that a logical partition can only be inside an extended one, etc. But the fact that it doesn’t ask if we want more than one logical partition within that extended one, and simply creates one logical that fills the entire extended partition is confusing to me. I don’t understand what the use of that could be.

Источник

What is the difference between primary partition and logical partition in Linux? [duplicate]

This isn’t Linux-specific. A given disk with a DOS disk label can only have four (4) primary partitions. To get more than four partitions, the fifth and beyond are logical partitions, which are wholly contained within the fourth and last primary partition. Effectively, it’s an artifact of the DOS disk label, and there’s no other real difference at the level you’re asking about.

must the logical partition(s) be only within/after the 4th primary partition? Or can primary partition 1 contain N logical partitions, and primary partition 2 can contain N logical partition, and primary partition 3. ?

Only the last primary partition, always numbered four, can contain logical partitions. That’s just how the DOS partition table works.

In a DOS partition table, you can have partitions 1 and 5 in existence (with 4, the fourth primary, also called the extended partition, present but effectively invisible). It’s not really intuitive, nd more modern partition tables handle things much better, but it’s all legacy dating back to the 1980’s and earlier.

enter image description here

The logical partitions are basically extended partitions. there can be four primary partitions in a system but when u want more partition then you can divide the primary partion into logical partitions. thes partitions are inside the primary partition only.

Above image is of primary partitioning

Below image is of logical partition

Источник

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