We help IT Professionals succeed at work.

Partitioning for Linux

rking asked
Medium Priority
Last Modified: 2013-12-15
I am having trouble partitioning my hard drive for Linux.
I have a Western Digital 2.1 gig EIDE drive in a AMD 5x85 133 PC with an IDE CD ROM and 3.5 " 1.44 floppy 24 Meg memory.

Note, when I installed the 2.1 gig hard drive, to replace a
failed 540 Meg drive, my plan was to divide the drive between Win95 and Linux. Since I had read that Linux might have problems booting if loaded in a partition that started above 1024, I set up Win95 drive C at the beginning of the drive and the Extended DOS partition (drive D) at the end, leaving the middle available for Linux.  I can successfully create a Linux swap partition and a Linux native partition. My question is, how can I set up the 902 meg section in the middle with a Linux swap partition, and two native partitions, one for root and one for everything else?

DOS FDISK information
Part. type  Mbytes -------  Usage  ID  size
 1 A Pri DOS 504    FAT 13   25%   C  528,482,304
 2   Non DOS 902             45%      945,815,552
 3   Ext DOS 606             30%   D  635,437,056

Linux Fdisk information
          beg  start   end    blocks    ID system
/dev/hda1 1     1      256    516,064+   6   DOS 16-bit>=32
/dev/hda3 715   715    1022   620,928    5   Extended
/dev/hda5 715   715    1022   620,896    6   DOS

Linux verify reports 1850812 unallocated sectors
I assume the 1,850,812 sectors lie in the area between 257
and 714.
at this point if I try to create a new logical partition Linux Fdisk reports  "no free sectors" when I specify a 'l'
as the partition type.

I then sucessfully allocate a primary 96 Meg swap partition and a 75 Meg primary Linux native partition.
If it would be helpful, I can supply a partition map from
Linux Fdisk at this point.

I then try to alloc another primary partition and the system responds "No free sectors", if I try to alloc a logical partition I also get "No free sectors"
if I use the Verify command I get 1,495,996 unallocated sectors.

Watch Question


Edited text of question

i have a western digital 3.2gb and my
linux partition is the third gig out at
the very end, doubtless well past the
1024th cylinder, though i havent checked.  
you might try just putting it at the end
of the disk anyway.  where did you hear to
put it before 1024?

the 1024 Cylinders limitation only applies to old bioses which don't know LBA access. If your machine is less than three years old, you don't have to care about it (just look at the more in the setup, but if Win95 can acces the drive, linux can do so).


The question is HOW DO I GET 3 Linux partitions in the 902 meg
section of my drive.  The part about 1024 Megs was to explain
why I put the Linux disk area in the middle.

oh, well in that case, i thought i read in
the linux install docs that if you are
putting linux in with another OS you
should make the linux partitions with that
other OS's fdisk (dos's in your case) and
then use linux's fdisk to merely set the
types (linux native, linux swap, etc).  i
used os/2's fdisk to make the linux
partitions and then turned them to type 83
and 82 (i think those are the numbers)
with the linux fdisk.  worked fine for me.
i couldn't get more than three primary
partitions on the same drive though, so
the two linux ones are both extended as
far as os/2 cares, but since they are
formatted with the linux file system the
are invisible anyway.
hope this helps.


To be sure I understand your answer: I should use win95 and create a primary and extended partition. In the extended partition I create dos partitions for win95 and Linux. I then use
Linux fdisk to change the partition types to Linux.
The master boot record (MBR) of a disk can only hold information on 4 partitions. One of these can be an extended partition, which may contain several 'logical partitions'.
You now have a primary DOS partition and an Extended partition containing a logical DOS partition.
If you add a linux root partition and a linux swap partition, you have defined 4 partitions in the MBR, leaving no space for another one. And you can't create another logical partition within the extended one, because all space in the extended partition is used up by the logical DOS partition.
To solve your problem you will have to delete and re-create the extended partition:
1 Primary DOS partition (25% of space)
2 Extended partition (rest)
Within the extended partition, create logical volumes using 45% and 30% of space respectively. The latter one is your logical DOS partition.
Boot linux and use fdisk to delete the 45% non-dos partition, and create your linux partitions as logical partitions within the extended one.
You may run into trouble here, because I don't know if you can boot linux from a logical partition. Perhaps you have to leave a little space (7%-8%) between the primary DOS partition and the extended partition. That space would be filled by your linux root partition later.

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts


The andwer did not tell me how to create 4 linux partitions so
I can have a root partition, a usr partition, a user partition, ect, and that was my question.  I can leave the dos partitioning
as it is and create a 96 Meg Linux swap file and an 806 Meg Linux
boot root everythig partition. I have in fact done that and proceded with the instalation.  pc provided good information, and by extrapolation I could create a small native partition for boot root and then create as many logical partitions as I wanted.  I didn't want to go through backing up my D drive and recreating the Dos extended partition.
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.