1

Topic: Is partition primary or extended? If the first, can I change it?

I have two questions.

Can I tell using GParted (or anything else) whether a partition that came on my Windows 7 computer is primary or extended?

If it's primary, can I change it to extended using GParted (or something else)?

The background to the questions is that the computer came with four partitions already on it and I want to shrink one and then create additional partitions in the freed-up space so that I can install Linux on them.

Leslie

2

Re: Is partition primary or extended? If the first, can I change it?

Primary, extended and logical aren't just "attributes" we could change by modifying some bytes.

Primary partitions are directly listed in the partition table.
Extended partition is a special type of partition that is allowed to contain not a filesystem but other partitions, that are named "logical" partitions.

There are only 4 entries in the msdos-type partition table (there are many types but msdos type only is used in the intel-architecture personal computer working with operating systems like mswindows or Linux).

If you already have 4 partitions, you can't create any 5th. You can see if any of them is a logical one.
It is quite easy under Linux to know if a partition is primary or logical. Logical partitions are numbered 5,6, and up. Numbers 1,2,3,4 are reserved for the 4 primary entries in the partition table.
So, a primary (or extended) partition looks like
/dev/sda1 or /dev/sda2 or /dev/sda3 or /dev/sda4.
A logical partition looks like /dev/sda5, /dev/sda6 etc.
So, you can boot the computer with the GParted Livecd.
From the terminal (command line) you have to give the command
sudo fdisk -l
to list the partition tables of every hard drive connected to the computer.
If your hard drive contains
/dev/sda5,
you can be sure that there is already an extended partition.
One of the other partitions will have "extended" or "ext" to the end of the line.

In this case, you can resize other partitions to make space for new logical partitions (Linux usually needs 2 or more partitions: 1 for swap and 1 for the system and user files).

If you see only 1,2,3,4, no "ext" or "extended", then you have no extended partition.
In this case, you have to delete one of the existing partitions, to greate a new extended partition and logical partitions in it.
If some of the partitions is a data partition, you can backup the data, delete the partition, make an extended partition and make a smaller logical partition to restore data there. In the remaining space you can make the Linux partitions.
Alternatively, you could move the data content to the system partition, eventually resize it, delete the data partition, and make the extended partition for the new system installation.

If there is data content only, then it could work as said.
If there are programs installed in the partition to remove, then you will need to install them again in the new hard drive state. There are usually many (usually undocumented) references in the system registry, so that it is better to uninstall these programs and re-install them after.

In any case, everything depends on the exact content of the partitions. Often there is a system check partition and a "system restore" partition. Some users don't want to keep one of them. It is better to first make a search for the specific computer model, to be sure on the exact content of each partition.


Is is possible to detect an extended partition from the mswindows "disk management" screen. The extended partition in the graph is marked by an external frame, so that a logical partition has a double frame. However, it can be not easy to see it.

In any case, modifying the partition table is quite "dangerous", so we always recommend a backup.

*** It is highly recommended to backup any important files before doing resize/move operations. ***

3

Re: Is partition primary or extended? If the first, can I change it?

Thank you very much for your reply.

You've satisfied me that each the four pre-installed partitions on my computer (an HP Pavilion dv7) is a primary one.

I've now found in an HP support forum instructions which I'll try that are said to allow me to create the new partition I want. They're of the kind you foreshadowed in your reply, but with specific reference to the partitions that HP seems generally to pre-install on its computers.

Thanks again for your help,

Leslie

4 (edited by Antheniolli 2011-12-17 18:58:36)

Re: Is partition primary or extended? If the first, can I change it?

lesliek wrote:

You've satisfied me that each the four pre-installed partitions on my computer (an HP Pavilion dv7) is a primary one.

How can all four partitions be primary?
Regards, mobile development

5

Re: Is partition primary or extended? If the first, can I change it?

Antheniolli wrote:
lesliek wrote:

You've satisfied me that each the four pre-installed partitions on my computer (an HP Pavilion dv7) is a primary one.

How can all four partitions be primary?

I'm not quite sure how to answer your question. My limited understanding of these matters is that a hard drive can have up to four primary partitions or, instead, three primary partitions and one extended partition (with the latter available for cutting up into logical partitions, resulting in more partitions than four on the drive). Certainly before I deleted one of the pre-existing partitions, Windows 7 disk management claimed that all four partitions were primary. I deleted one of those, replaced it by an extended partition and then divided that extended partition into two logical ones, thus winding up effectively with five partitions on the drive.

If I haven't understood your question, please let me know and I'll try to give a more suitable answer.

Leslie

6

Re: Is partition primary or extended? If the first, can I change it?

a hard drive can have up to four primary partitions or, instead, three primary partitions and one extended partition

That's right (unless we use the newer GPT partitioning scheme).

*** It is highly recommended to backup any important files before doing resize/move operations. ***

7

Re: Is partition primary or extended? If the first, can I change it?

As a Newbie, I note the answer to lesliek's question; I have exactly the same problem.  I have an HP Pavilion dm1 with the same four primary partitions.  I thank you for the answer; I shall examine the HP support forum to find the same answer (I hope !).

8 (edited by groware 2011-12-14 07:42:28)

Re: Is partition primary or extended? If the first, can I change it?

"I've now found in an HP support forum instructions which I'll try that are said to allow me to create the new partition I want.... "   -- quote from above....

Lesliek has solved my problem but I cannot find the reference in the HP support forum.
Can Leskiek, or anybody help ?

I have the same situation in a similar notebook (Pavilion dm1) with four primary partitions and I wish to add some more (three if possible -- 1 Data, and two for Linux Mint).

I would like to find the reference in the HP support Forum if possible.