Not sure why partitioning not working as I want

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
mipcar

Not sure why partitioning not working as I want

Post by mipcar »

Never thought I was that thick :?
Anyway, here is what is happening.

I'm booting Gparted as standalone (as opposed to using it from within a Linux distro)
There is no pre-existing O/S on the HDD I am trying to partition.
Gparted will overwrite everything at the begining when I select "New Partition"

Ok, so far so good... HDD physical size not an issue so I'll just speak in % of drive used for simplicity.

I am aware you can only have a max of 4 Primary partitions or extended partitions or a combination of both and I know that to give yourself more partitions you create logical ones within the extended ones.

Now what happens is this.
I try to set up Linux Swap first. It only allows me the option of selecting Primary partition. That should be okay as that leave me 3 more.
Next I put in an extended partition of about 25% of the drives Capacity and it then lets me put 3 logical partitions within that extended one.. Great.

Now though for my next partition of the still unused portion of the drive it will only give me option of primary partitions or extended and will set them up okay but wont then give me the options to set up logical partitions within them as I did in the first part.

I've tried calling them extended but then get no choices to add logical.
I tried making them Primary to see if they would then allow extended/logical still no luck.

Whatever I've tried so far only my first slice of the drive allows itself to be set up with logical partitions inside the extended ones. No problems making the partitions whatever size I want, just in getting more logical ones.

Help please, getting a little disheartened, trying to move on a bit.. Although I can run Mint 6 as a standalone O/S.

Mychael
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Aging Technogeek

Re: Not sure why partitioning not working as I want

Post by Aging Technogeek »

Mychael;

I read your post and spent a little time playing with Gparted; both the stand alone version and the version on the Mint main edition live CD. Apparently, once you create an extended partition, you must stay within that partition if you want to continue creating logical partitions. I could create as many logical partitions as I wished within the extended partition that contains my Mint XFCE install. But as soon as I created one primary partition , I lost the option to create any more logical or extended partitions.

Maybe we are both missing some nuance of Gparted that a more experienced Linux user would know about. I will continue to watch this thread so I can learn along with you if/when someone (like maybe Fred) comes up with the answer to this dilemma.

As always, nice chatting with you,
John
DataMan

Re: Not sure why partitioning not working as I want

Post by DataMan »

You can have a maximum of 4 primaries. You can have one extended. The logicals go into the extended partition (no limit that I'm aware of with the number of logicals).

DataMan
mipcar

Re: Not sure why partitioning not working as I want

Post by mipcar »

DataMan wrote:You can have a maximum of 4 primaries. You can have one extended. The logicals go into the extended partition (no limit that I'm aware of with the number of logicals).

DataMan
Well that is also how I understood it to be, but it does not seem to work that way. I don't get the option box highlighted to put more logicals within the various Extended. I'll keep trying various ways to "trick" it.

Mychael
DataMan

Re: Not sure why partitioning not working as I want

Post by DataMan »

Do you have un-allocated space within the extended?

DataMan
mipcar

Re: Not sure why partitioning not working as I want

Post by mipcar »

DataMan wrote:Do you have un-allocated space within the extended?

DataMan
No, Starting from a "blank" HDD and running Gparted live What i was trying to achieve was one Swap and then 4 Extended partitions with logical partitions within them.

It only gives me the option of a primary partition when I select Linux swap as the first partition.. I can size all my extended partitions in such as way as to use up all space on the drive but it only allows me to put logical partitions within one of the extended ones.

Mike
DataMan

Re: Not sure why partitioning not working as I want

Post by DataMan »

Yikes...

Try something like this:
sda1 swap
sda2 ext3 (size for your "/")
sda3 extended the balance of the drive
sda4 data or whatever within the extended , etc.

DataMan
mipcar

Re: Not sure why partitioning not working as I want

Post by mipcar »

DataMan wrote:Yikes...

Try something like this:
sda1 swap
sda2 ext3 (size for your "/")
sda3 extended the balance of the drive
sda4 data or whatever within the extended , etc.

DataMan
Thanks, I will try that.. does your advice change if I add that the reason I was trying to set up multiple partitions was so I can load in more then one disto and the have the data accessible from whichever one I've loaded?

Mike
Aging Technogeek

Re: Not sure why partitioning not working as I want

Post by Aging Technogeek »

Mike;

The only way to get what you want is to create one extended partition that fills the disk and create as many logical partitions inside the extended partition as you need for your various distros. If you want a separate data partition, add a primary partition after your extended partition and mount it in the /home partition of each distro. If you install a data partition, place it at the end of the disk so it doesn't reduce the size of your extended partition. This way you can access the files in data from all installed OS. Just keep in mind that once you close the extended partition or create a primary partition, you lose the ability to create more logical partitions farther down the disk.

You can run as many distros as you want from one extended partition. I've had Mint 6 main ed., Mint 6 XFCE and Ubuntu 8.10 all in one extended partition with no trouble. I add a 500 Mb to 1 Gb buffer partition between OS (using the live CD partitioner, you have a selection under "mount as" "do not use this partition"). With this method you are limited in number of distros you install only by disk size.

Also, don't try to partition the entire disk at once.. Install the partitions you need as you need them and leave the rest of the disk unallocated.
mipcar

Re: Not sure why partitioning not working as I want

Post by mipcar »

Thanks guys,
I'll give it a whirl tomorrow and then report back, I'm sharing one monitor and input device between the two pc's so cannot try your suggestions and remain online at the same time. I'll give you an update soon as I can .

Cheers,
Mike
altair4
Level 20
Level 20
Posts: 11458
Joined: Tue Feb 03, 2009 10:27 am

Re: Not sure why partitioning not working as I want

Post by altair4 »

I'm a little confused ( my natural state lately ).

You can only have 4 primary partitions on a hard drive. One ( and only one ) of those primary partitions can be an extended partition which acts as a container for logical partitions. Within that extended partition can be a number of logical partitions, the exact number gets confusing:
SCSI drives can have a total of 15 partitions, while IDE/ATA drives can have up to 63 partitions. The Linux kernel developers chose to treat SATA drives as if they were SCSI drives, even though they are actually Serial IDE/ATA drives. Since the newer kernels now treat all IDE/ATA drives the same as SATA, all IDE/ATA drives are now artificially limited to the same 15 partitions as SCSI.
This is what's confusing me:
Next I put in an extended partition of about 25% of the drives Capacity and it then lets me put 3 logical partitions within that extended one.. Great.
Now though for my next partition of the still unused portion of the drive it will only give me option of primary partitions or extended and will set them up okay but wont then give me the options to set up logical partitions within them as I did in the first part.
and this:
Starting from a "blank" HDD and running Gparted live What i was trying to achieve was one Swap and then 4 Extended partitions with logical partitions within them.
There can only be one extended partition. The GParted I'm using won't allow me to create 2 extended partitions. DataMan has the answer and although I've never seen a hard disk formated with just one extended partition encompassing the whole disk I suppose that would work also.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
mipcar

Re: Not sure why partitioning not working as I want

Post by mipcar »

altair4 wrote:I'm a little confused ( my natural state lately ).
Starting from a "blank" HDD and running Gparted live What i was trying to achieve was one Swap and then 4 Extended partitions with logical partitions within them.
There can only be one extended partition. The GParted I'm using won't allow me to create 2 extended partitions. DataMan has the answer and although I've never seen a hard disk formated with just one extended partition encompassing the whole disk I suppose that would work also.
I'm only the new boy so don't have answers, only questions but my version of Gparted live would allow me to set multiple extended or primary up to a total of four partitions. Just not logical partitions within all of them.. Which as I am to understand now is not want I needed anyway.

Mychael
mipcar

Re: Not sure why partitioning not working as I want

Post by mipcar »

Well sorry guys, wish I could say I'd "done ya proud" but it did not work and for the moment I'm over it.
Either I'm too thick to get it or something is being lost in translation with your help.

I loaded Gparted live, it "zero'd" the drive that had a distro on it, showed the entire drive space as unallocated.

I tried various ways, it would allow me to create one extended partition that filled the disk as was suggested to me to try, it would then allow me to create the logical partitions I wanted, but when I clicked "apply" I got the message that "An Error occurred while applying operations" . It only achieved the extended partition.

Next attempt was to apply after the extended partition and do the logicals one at a time.. Same error message when I clicked apply. Tried doing all the Logicals in one go then clicking apply, same error message.

Also it would not let me set up a swap file at the end. It looks okay as a pending operation but as soon as I clicked apply the swap partition would be lost and it would go back to unallocated with an exclamation mark alongside it.

I'm sure it's not the drive and as been installing and unstalling various distros on it to try and those that work , work fine.

So I'm done with it. I think I need to see it done hands on.

For now I'll stick with my one install of Mint 6 which works fine.

Thanks for your help.

Cheers,
Mychael
Fred

Re: Not sure why partitioning not working as I want

Post by Fred »

Maybe I can clarify a bit.

1.) You can have only 4 major partitions on a drive. The major partitions are primary and extended. You do not have to have 4 major partitions but you can not exceed 4.

2.) One, and only one of those major partitions can be an extended partition.

3.) Within an extended partition you can have up to 255 logical partitions. Later kernels however will allow only 15 partitions total per drive to be automatically mounted by /etc/fstab. You can auto mount more with a script run on start-up if you wish though. That usually isn't necessary however. You can of course mount more manually also.

Lets take a uncompleted example:

160 Gig drive

1 primary partition 30 Gig
1 extended partition 100 Gig
.... 4 - 20 Gig logical partitions
.... 20 Gig unallocated
30 Gig unallocated

The above example completed.

1 primary partition 30 Gig
1 extended partition 100 Gig
.... 5 - 20 Gig logical partitions
1 primary partition 30G

When you make the extended partition, it must be made large enough to contain all the logical partitions you wish to have. Anything left after you create the extended partition will be available as additional primary partitions if you haven't used all three of them available to you.

I hope this helps a little bit.

Fred
Last edited by Fred on Sat Apr 18, 2009 8:09 am, edited 1 time in total.
altair4
Level 20
Level 20
Posts: 11458
Joined: Tue Feb 03, 2009 10:27 am

Re: Not sure why partitioning not working as I want

Post by altair4 »

Should you try to do this in the future I would respectfully suggest the following:

(A) If your copy of gparted is allowing you to create multiple extended partitions throw it out and download and burn a new one because the one you've got is faulty. Or use the one that came with a LiveCD.

(B)Lets start step by step with DataMan's suggestion:

sda1 - primary partition - swap
sda2 - primary partition - ext3 ( for your "/" )
Create an extended partition that encompasses the whole rest of the disk
sda5 - 1st logical partition - created within the extended partition - ( for your "/data" )
( Note: this is not a typo, logical partitions always start with 5 regardless of how many primary partitions
you have. Gparted will do this automatically so you don't have to worry about it. The exception to this occurs when you've done way too much adding and deleted of partitions and you get a " partititon table entries are not in disk order" message when you do an fdisk -l.)

I really and truly believe that your troubles are caused by a faulty gparted. Anywho, that's my opinion. :wink:

EDIT: It looks like Fred and I posted almost simultaneously. I don't think I said anything that contradicts what Fred wrote but if I did listen to Fred - he is the jedi master around here.
Last edited by altair4 on Sat Apr 18, 2009 8:09 am, edited 1 time in total.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
mipcar

Re: Not sure why partitioning not working as I want

Post by mipcar »

Fred wrote:Maybe I can clarify a bit.

1.) You can have only 4 major partitions on a drive. The major partitions are primary and extended. You do not have to have 4 major partitions but you can not exceed 4.

2.) One, and only one of those major partitions can be an extended partition.

3.) Within an extended partition you can have up to 255 logical partitions. Later kernels however will allow only 15 partitions total per drive to be automatically mounted by /etc/fstab. You can auto mount more with a script run on start-up if you wish though. That usually isn't necessary however. You can of course mount more manually also.

Lets take a uncompleted example:

160 Gig drive

1 primary partition 30 Gig
1 extended partition 100 Gig
.... 4 - 20 Gig logical partitions
.... 20 Gig unallocated
30 Gig unallocated

The above example completed.

1 primary partition 30 Gig
1 extended partition 100 Gig
.... 5 - 20 Gig logical partitions
1 primary partition 30G

When you make the extended partition, it must be made large enough to contain all the logical partitions you wish to have there. Anything left after you create the extended partition will be availiable as additional primary partitions if you haven't used all three of them availiable to you.

I hope this helps a little bit.

Fred

Thanks Fred, Does it matter what order you put the partitions in? As must it be a primary first, then extended etc?
I was pretty sure I was trying to do it as you described..I think I tried all convolutions of ways to break up the drive. I did for instance make a 100gig extended and it did allow me to create the logical partitions within it,, Until I tried to click the "Apply" button whereby I then got that error message I mentioned before.

Mychael
mipcar

Re: Not sure why partitioning not working as I want

Post by mipcar »

altair4 wrote:Should you try to do this in the future I would respectfully suggest the following:

(A) If your copy of gparted is allowing you to create multiple extended partitions throw it out and download and burn a new one because the one you've got is faulty. Or use the one that came with a LiveCD.

(B)Lets start step by step with DataMan's suggestion:

sda1 - primary partition - swap
sda2 - primary partition - ext3 ( for your "/" )
Create an extended partition that encompasses the whole rest of the disk
sda5 - 1st logical partition - created within the extended partition - ( for your "/data" )
( Note: this is not a typo, logical partitions always start with 5 regardless of how many primary partitions
you have. Gparted will do this automatically so you don't have to worry about it. The exception to this occurs when you've done way too much adding and deleted of partitions and you get a " partititon table entries are not in disk order" message when you do an fdisk -l.)

I really and truly believe that your troubles are caused by a faulty gparted. Anywho, that's my opinion. :wink:

EDIT: It looks like Fred and I posted almost simultaneously. I don't think I said anything that contradicts what Fred wrote but if I did listen to Fred - he is the jedi master around here.
Thanks again, It had crossed my mind the Gparted might have been faulty but being a newbie and never having tried to run it before I had nothing to use for comparison so have been assuming the error is mine (it still might be). I have been running a Gparted that is designed to run as standalone not as part of a Distro. The fact that it was loading okay and seemingly doing it's thing gave me no real cause to think it might be faulty.
It's no big deal to download another copy, certainly worth a try.

Mychael
Fred

Re: Not sure why partitioning not working as I want

Post by Fred »

mipcar,

I would suggest you use a primary partition as the first partition. The reason I say this is some BIOSs in the past haven't played well with a logical partition being the first. This is a hold over from BIOSs being designed for Windows. Otherwise it makes no difference where the extended partition is in the partition order.

Just remember, all you logical partitions must be contiguous in the single extended partition, regardless of the size of the extended partition or the placement and number of the primary partitions.

Fred
Fred

Re: Not sure why partitioning not working as I want

Post by Fred »

mipcar,

One other thing about using Gparted. I strongly recommend you do one thing at a time and apply it. Then make another partition and apply it, etc. Don't pile up a number of operations and apply them all at one time.

Fred
mipcar

Re: Not sure why partitioning not working as I want

Post by mipcar »

Fred wrote:mipcar,

One other thing about using Gparted. I strongly recommend you do one thing at a time and apply it. Then make another partition and apply it, etc. Don't pile up a number of operations and apply them all at one time.

Fred
Yep, tried that also Fred, Tried as many variations as I could think of to get it to work.

Mychael
Locked

Return to “Beginner Questions”