SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
On my notebook I have a ~ 115GB HD, I resized the NTFS partition to get ready for Slackware 11.0. NTFS is now 54.7GB, made a 26.5GB FAT32 partition for sharing files between Linux and XP, made a 100MB ext2 partiton for boot, 22GB ext3 for home, though I will probably change that to reiser or jfs, but thats far as I can get, I get limited to only 4 primary partitons... Why the limit to only 4? I originally wanted this kind of setup....
You can only have 4 primary partitions I think. You can make 1 primary NTFS for windows, then make an extended partition of the remaining space and create as many logical drives in that as you like. So it will look like:
You can have 4 primary maximum. If you want more than 4
partitions, you can make 1 (as dive said) or up to 3 as
primary, then the rest must be logical partitions in the
extended partition.
Windows is going to want to have it's boot partition in
the primaries -- Linux doesn't care -- it's just happy
to be selected and will run anywhere.
The ExtHEADER's consider as primary in HEADER and the logicals means nothing to the HEADER. The extended header's only as little as 1 sector i guess. And the number of logicals can be up to at least 15 depending on the partitioner. Please correct me too if I'm wrong.
hda1 - NTFS 10GB /mnt/windows for Windows XP
hda2 - ext2 60MB /boot
hda3 - ext3 15GB / for Main Linux distr
hda5 - swap 1GB
hda6 - ext3 25GB /home
hda7 - fat32 5GB /mnt/shared for sharing between Linux and XP, shows up as D:\ in XP
hda8 - ext3 4GB /mnt/extra for testing distros, or re-mastering knoppix etc, anything else basically.
So as you can see you can pretty much partition your HD anyway you want as far as Linux is concerned.
Just to be more confusing....
When hard drives became available for the PC one could only create 4 total partitions. As hard drives started increasing in capacity this became a big limitation. The extended partition was developed to overcome this limitation but still retain backwards compatabilty. The original 4 partitions are now known as primary.
An IDE drive can be subdivided into 64 partitions, 4 primary (1 designated as extended) and 60 logical partitions. A SCSI can be subdivided into 16 partitions (AFAIK this is a linux limitation). BTW Windows has a limitation of 26 total partitions i.e. A-Z. Any primary partition can be designated as an extended partition.
konsolebox, I believe you are refering to the boot sector as a header. Each primary partition has a boot sector. The extended partition has an extended master boot record which is just a pointer to the first logical. Probably too much information for the OP to comprehend at this time.
yes and as you can see there's no hda4. it's simply the extended partition header. btw it's not just 1 sector perhaps it's 1 head.
I don't want to be agruementative here just to clarify this.
If you do a fdisk -l on your system you will find something like this;
Code:
Disk /dev/hda: 40.0 GB, 40007761920 bytes
255 heads, 63 sectors/track, 4864 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hda1 * 1 499 4008186 c W95 FAT32 (LBA)
/dev/hda2 500 561 498015 82 Linux swap
/dev/hda3 562 811 2008125 83 Linux
/dev/hda4 812 4864 32555722+ 5 Extended
/dev/hda5 812 1061 2008093+ 83 Linux
/dev/hda6 1062 1438 3028221 83 Linux
/dev/hda7 1439 1563 1004031 83 Linux
/dev/hda8 1564 2062 4008186 83 Linux
The partition /dev/hda4 exists but is an extended partion containing the logical partitions. As for the proper terms of disk layout I suggest that you read this tutorial. A good example of the ext2 filesystem layout.
Quote:
Originally Posted by Galaxy_Stranger
You can only have 4 primary partitions. If you need MORE partitions, you can have up to 3 primary and the last extended containing logical partitions.
So, you could have 1-3 be primary and 4 be extended while containing more logical partitions.
-=[EDIT]=-
Duh - you beat me to it.
You can create the extended partition anywhere on the device that has primary partition numbers available. If you have a /dev/hda that has /dev/hda3 available and you wish to create an extended on that partition then do it. Of course the first logical will be /dev/hda5.
My personal taste is too create my swap if needed as device /dev/hda2 as seen in the below fstab example. Reasoning is the device access times for primary vs extended. You could create the swap on an extended but there would be propagation.
The partitition /dev/hda4 exists but is an exetended partion containg the logical partitions. As for the proper terms of disk layout I suggest that you read this tutorial. A good example of the ext2 filesystem layout.
No need thanks. I believe you're correct. That's what I believed about extended partitions before and I don't know how it changed. Perhaps it was the time when I created perfect-sized partitions (i mean *,000,000,000 in size) and I found out that creating a partition next to the header makes this impossible as this require at least that the partition starts on a cylinder and the header's only 1 head and not 1 cylinder. I don't know how but suddenly I've been thinking that the extheader is a primary partition.
About the illustration I posted above I think there's still nothing to change.
A bit of advice for keeping windows happy on the same HD as Linux:
Make the first and last logical partitions either NTFS or FAT. Otherwise Windows may have trouble reading the partition table. This is covered in several MS Knowledge Base advisories.
The easiest way to accomplish this is to create all your partitons as windows-type, then afterwards change the ones you want to be Linux using Linux fdisk, but without destroying them or changing the size.
About that tutorial -I never in my life saw so much disinformation in so little space. It may help you to understand in a round-about way, but that guy needs to read up before writing anymore...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.