Solved

Partitioning for Linux

Posted on 1997-06-16
8
552 Views
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.

 
0
Comment
Question by:rking
8 Comments
 

Author Comment

by:rking
ID: 1628236
Edited text of question
0
 
LVL 13

Expert Comment

by:magarity
ID: 1628237
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?
0
 
LVL 2

Expert Comment

by:jprohart
ID: 1628238
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).
bye
0
 

Author Comment

by:rking
ID: 1628239
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.
0
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 
LVL 13

Expert Comment

by:magarity
ID: 1628240
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.
0
 

Author Comment

by:rking
ID: 1628241
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.
0
 
LVL 3

Accepted Solution

by:
pc012197 earned 100 total points
ID: 1628242
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.

0
 

Author Comment

by:rking
ID: 1628243
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.
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Join & Write a Comment

Network Interface Card (NIC) bonding, also known as link aggregation, NIC teaming and trunking, is an important concept to understand and implement in any environment where high availability is of concern. Using this feature, a server administrator …
How many times have you wanted to quickly do the same thing to a list but found yourself typing it again and again? I first figured out a small time saver with the up arrow to recall the last command but that can only get you so far if you have a bi…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now