LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-29-2006, 01:07 AM   #1
newcomer4
LQ Newbie
 
Registered: Jan 2006
Posts: 21

Rep: Reputation: 15
unable to create new linux partition


I am having 40GB harddisk with 4 GB free space.I want to create a new linux partition,but when I use fdisk it is giving me error.

[root@localhost lfs]# /sbin/fdisk /dev/hda

The number of cylinders for this disk is set to 4865.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): p

Disk /dev/hda: 40.0 GB, 40020664320 bytes
255 heads, 63 sectors/track, 4865 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 17 526 4096575 b Win95 FAT32
/dev/hda2 527 3586 24579450 f Win95 Ext'd (LBA)
/dev/hda3 3587 4415 6658942+ 83 Linux
/dev/hda4 4416 4448 265072+ 82 Linux swap
/dev/hda5 527 1546 8193118+ b Win95 FAT32
/dev/hda6 1547 2566 8193118+ b Win95 FAT32
/dev/hda7 2567 3586 8193118+ b Win95 FAT32

Command (m for help): n
No free sectors available


Plz help me..........
 
Old 04-29-2006, 01:14 AM   #2
GrueMaster
Member
 
Registered: Aug 2005
Location: Oregon
Distribution: Kubuntu.
Posts: 848

Rep: Reputation: 30
Your problem is partition fragmentation. You have two primary partitions (hda3, hda4) after your extended partition (hda2), the first of which starts where the extended parition ends. If I were you. I'd back up the whole drive and start over. If that isn't an option, but redoing at least the Linux partitions is an option, then I'd delete them (hda3 & hda4), and recreate them as extended partitions (hda8, hda9). Then you should be able to create another partition with the unused space.
 
Old 04-29-2006, 02:14 AM   #3
b0nd
Senior Member
 
Registered: Jan 2005
Distribution: Slackware, BackTrack, Windows XP
Posts: 1,020

Rep: Reputation: 45
Hi,
You may be knowing these things but in case i'm explaining them a bit.
when you partition a hard drive you can have the following combinations:

1 primary + 1 extended + several logical drives in extended ( logical always resides inside extended)

2 primary + 1 extended + logical in extended
3 primary + 1 extended + logical in extended
4 primary ( in this case you won't have exteded hence no logical)

so you have 3rd combination i.e 3 primary and 1 extended

Quote:
/dev/hda1 * 17 526 : 1st primary
/dev/hda2 527 3586 : extended
/dev/hda3 3587 4415 : 2nd primary
/dev/hda4 4416 4448 : 3rd primary
/dev/hda5 527 1546 : logical
/dev/hda6 1547 2566 : logical
/dev/hda7 2567 3586 : logical
now see 17-526 + 527-3586 + 3587-4415 + 4416-4448
here you haven't included rest of 4 gb space hence won't be able to utilize that.
you should have included that as part of extended. As logical can't exist without extended so you can't use that.
you have do something like what GrueMaster has suggested.

regards
 
Old 04-29-2006, 02:24 AM   #4
es7us
Member
 
Registered: Jul 2004
Distribution: ubuntu 6.06, openSuSE 10.0, Mandriva 2007
Posts: 47

Rep: Reputation: 16
I second GrueMaster's idea -- starting over from scratch (or something close to it) is probably your best bet. Think of it as a perfect opportunity to get some partitioning practice.
 
Old 04-29-2006, 01:35 PM   #5
ioerror
Member
 
Registered: Sep 2005
Location: Old Blighty
Distribution: Slackware, NetBSD
Posts: 536

Rep: Reputation: 34
Quote:
I'd delete them (hda3 & hda4), and recreate them as extended partitions (hda8, hda9
Can't do that, a drive can only have 1 extended partition, as ruudra indicated above.

I agree with the others, starting from scratch is really the only sensible option.
 
Old 04-30-2006, 12:03 AM   #6
GrueMaster
Member
 
Registered: Aug 2005
Location: Oregon
Distribution: Kubuntu.
Posts: 848

Rep: Reputation: 30
Quote:
Originally Posted by ioerror
Can't do that, a drive can only have 1 extended partition, as ruudra indicated above.

I agree with the others, starting from scratch is really the only sensible option.
Actually, this can be done. Once hda3 & hda4 are deleted, hda2 can be extended to contain the rest of the drive, then hda8 & hda9 can be created from there. The problem is that hda3 starts where the extended partition ends, thus breaking the chain.

Starting over though, is still the optimal solution for stability reasons.
 
Old 04-30-2006, 04:30 AM   #7
ioerror
Member
 
Registered: Sep 2005
Location: Old Blighty
Distribution: Slackware, NetBSD
Posts: 536

Rep: Reputation: 34
Quote:
Actually, this can be done. Once hda3 & hda4 are deleted, hda2 can be extended to contain the rest of the drive, then hda8 & hda9 can be created from there.
Well, yeah you can do that. I thought you were suggesting that more than 1 extended partition could be created, that's what is sounded like (since you said "extended partitions" <- plural!).
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Using partition magic to create Linux partition then install EviLBoX Linux - General 5 09-12-2008 05:01 AM
unable to create or delete files on fat32 partition Barrett Linux - Newbie 9 12-21-2005 04:19 PM
Unable to create 6TB partition OCS_MCT Linux - Enterprise 7 11-19-2005 05:48 AM
create NTFS partition in linux titanium_geek Linux - Software 19 06-20-2005 10:02 PM
How to create linux partition Shailendra Singh Linux - Software 5 11-18-2003 10:24 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:59 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration