Click to See Complete Forum and Search --> : Primary and Logical partitions ?


LiD
05-24-2003, 11:29 PM
hello,
I have successfuly installed Linux Slackware, but i have the vaguest idea about Primary and Logical Partitions.
To be on the safe side, I divided my entire 40GB drive into 5 parts.
Primary = 8 Gb
Logical = 8 + 8 GB
Swap = 8 + 8 GB

Bear with me if that is dumb, and help me.
Thanks for any, in advance.

ekasteng
05-24-2003, 11:45 PM
If I had the whole drive to dedicate to linux, and I was not sure of what I was doing, I would have partitioned it as follows:

hda1 boot partition (ext2) 2 mb
hda2 swap partition (swap) Twice the size of your ram
hda3 / (root partition) ext3 or Reiser (the balance of the disk)

I do not see the need for you to have 2 swap partitions. And placing all of these as primary partitions will save some headaches if you are not sure of what you are doing. Of course, if it boots up and works, I'd leave it alone for now until you get more comfortable with linux in general.

LiD
05-25-2003, 05:08 AM
Thanks for the reply, but my question still remains unanswered.
What is a logical partition and what's a primary partition ? And how are these different ?

endoalpha
05-25-2003, 06:24 AM
You never asked a question in your original post. On PC, there are 4 primary partitions, and the logical partitions reside inside the primarys.

LiD
05-26-2003, 12:08 AM
, but i have the vaguest idea about Primary and Logical Partitions.


I did ask about this, only it didnt have a question mark in the end.
I guess i'll have to google then.
Thanks for all the replies everyone.

homey
05-26-2003, 12:23 AM
I guess i'll have to google then.
Now there is a concept! :)

endoalpha
05-26-2003, 12:33 AM
Originally posted by LiD
hello,
I have successfuly installed Linux Slackware, but i have the vaguest idea about Primary and Logical Partitions.....

There is absolutely no question in there even if it ends in a question mark. As a matter of fact, you have told us that you DO have a vague idea about primary/logical partitions.

Alex Cavnar, aka alc6379
05-27-2003, 05:42 AM
Okay, now that we're finished arguing over misplaced question marks, I will try to do my best to explain Primary/Logical partitions as I know them to be:

Primary Partitions
There are normally 4 of them available on an IDE drive's partition table. If you need more, you have to have an Extended partition to put Logical partitions inside. In Linux, these would be hda1,hda2,hda3 and hda4.

Extended Partition
You can only have one of these on a drive. If you have one, you can only have 3 more Primary partitions. You have to have an Extended partition if you want Logical partitions. If you have an Extended partition, it will usually be hda4, but since you don't actually do anything with it, most partition editors don't actually show it-- they just use it.

Logical Partitions
You can have as many of these on your drive as you want, AFAIK. They reside inside of an Extended partition, which is why they're called Logical-- I don't think they're actually entered in the physical disk partition table, only in the Extended partition map(?). You can only have a logical partition as big as the size of your Extended partition. For instance, if you have a 5GB extended partition, you could have a 2GB logical partition and a 3GB logical partition. Or, you could have one 5GB logical partition.

Hopefully that clears things up. Personally, I used to use this setup on a 20GB drive:

5GB Windows (Primary Partition)
1GB Linux swap (Primary Partition)
1GB / Partition (Primary Partition)
5GB /usr Partition (Logical)
500MB /home (Logical)
8.5GB /backup (Logical)


That may not be the most efficient management of disk space, but it worked out for me. If you use multiple partitions, you ensure your entire install won't get wiped out by a corrupt file on one of the other partitions.

Hope this helps, instead of arguing over whether he asked a question or not!

michaelk
05-27-2003, 08:27 AM
BTW: (to muddy the waters some more)
An extended partition can be assigned to any of the primary partitions. Windows usually uses the 2nd i.e. hda2.

Logical parititions IDs are anything greater then hda4 i.e hda5,hda6 ...

I believe you can only have 64 logical partitions. I have never tested this myself.

How much swap space depends on how you want to use your PC. For most desktop users 512mb would be sufficient. Also the max size swap file is 2gb. Unless in later kernels this has been changed.

galenthurber
05-27-2003, 08:55 AM
not sure of a better way than posted above,
but I'd put the SWAP on primary partition 1
so when the hard drive startts to fail you do not lose the boot section or important data

Alex Cavnar, aka alc6379
05-28-2003, 02:54 AM
Originally posted by galenthurber
not sure of a better way than posted above,
but I'd put the SWAP on primary partition 1
so when the hard drive startts to fail you do not lose the boot section or important data

I dunno... I wouldn't be so sure of that... Most older versions of Windows/DOS like to reside on the First Primary Partition on the Primary Master Hard drive. Just something to consider if you plan to dual-boot with Win9x/ME. This isn't neccesarily true with WinNT/2k/XP, though.

Besides, I've never had problems having my swap on the second Primary partition. Really, you could have your swap partition in either a logical or a Primary partition. If a drive's going to fail, it won't always fail at the beginning of the drive, anyways.