LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
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 01-13-2006, 08:49 PM   #1
john_b
LQ Newbie
 
Registered: Jan 2006
Posts: 11

Rep: Reputation: 0
can't partition free space from shrunken partition


Hello,
I am having some partitioning problems. Recently I repartitioned my drive to make some space for fedora, setting up a dual debian/fedora boot. After I got that working I shrunk my original hda1 with debian on it to make space for a partition that I wish to share between the two distros. However I can't seem to partition the free space that I made. I even tried moving the swap partition back to see if shuffling the placement of the free space would help. Parted gives different strange output depending on which version I use (i.e. from my distros or off the fedora cd) and fdisk won't even let me think about creating a new partition, claiming there is no free space, although it's 'p' output shows otherwise:

/---------------\
Command (m for help): p

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 3291 26434926 83 Linux
/dev/hda2 3292 3422 1052257+ 82 Linux swap / Solaris
/dev/hda3 4315 4327 104422+ 83 Linux
/dev/hda4 4328 4864 4313452+ 5 Extended
/dev/hda5 4328 4864 4313421 8e Linux LVM

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

I have even tried running a new fedora install to see if it would partition the free space, thinking I could get rid of fedora later, but it failed. 'disk druid' showed the space as being "free space" but it wouldn't let me use it.

Can anyone give me an idea how to do this. I just want another partition to hold media, etc. that I can share between distros.

Thanks for any help
 
Old 01-13-2006, 09:10 PM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,445

Rep: Reputation: 1068Reputation: 1068Reputation: 1068Reputation: 1068Reputation: 1068Reputation: 1068Reputation: 1068Reputation: 1068
Due to limitations that we inherit from the (MS-DOS) mists of time, there is only room for 4 entries in the partition table. As a work-around, the extended partition appeared as a container for logical partitions. Allowed for many more usable partitions, but it needs to occupy one of those 4 original slots.

Have a look at your partition list - you have all 4 occupied, and are trying to create another primary.
No go.
If both your systems have LVM support, I guess you could move swap into the LVM you have as hda5.
That would open up a slot in the partition table, and you could (should) use all that space as your shared partition.
 
Old 01-14-2006, 12:28 AM   #3
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728
4 entries in the FIRST partition table. If one is extended, then you go to the 2nd partition table--and the 3rd, 4th, etc.---with logical partitions.

On a typical system you can have 60+ sectors with partition tables---for a total of over 200 partitions. For a real trip into the absurd, does anyone know if there is an absolute upper limit?
 
Old 01-14-2006, 12:55 AM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,445

Rep: Reputation: 1068Reputation: 1068Reputation: 1068Reputation: 1068Reputation: 1068Reputation: 1068Reputation: 1068Reputation: 1068
Quote:
Originally Posted by pixellany
4 entries in the FIRST partition table. If one is extended, then you go to the 2nd partition table--and the 3rd, 4th, etc.---with logical partitions.
ALL those "extra" part tables you mention are the same structure - and have "only room for 4 entries in the partition table." as I said.
Regardless of how many of those entries are actually used.
 
Old 01-14-2006, 01:42 AM   #5
john_b
LQ Newbie
 
Registered: Jan 2006
Posts: 11

Original Poster
Rep: Reputation: 0
Thank you very much. I have seen the light. So how about if I trash my swap partition and make an extended partition that holds both swap and the shared logical partitions? I am going to post this before I try but if I understand this should solve my problems.

Thanks again :-)

edit: okay, won't work (see below)

Last edited by john_b; 01-14-2006 at 03:37 AM.
 
Old 01-14-2006, 03:46 AM   #6
john_b
LQ Newbie
 
Registered: Jan 2006
Posts: 11

Original Poster
Rep: Reputation: 0
Ugh, sorry... I think I get it now: four primary partitions, only one of which can be extended. I really don't want to get into LVM, just get this done fast and keep it simple. What if I do this:

-remove swap
-move part 3 (the /boot partition for fedora, which is on part 5) to start after part 1
-resize extended part 4 backward to cover the empty space
-add two logical partitions in the space created for swap and shared storage

That would mean my /boot partition for fedora is far away on the disk from the rest of the OS. Is this bad? Sorry I'm so dense; I'll wait to hear an opinion before I try this.

Thanks
 
Old 01-14-2006, 04:23 AM   #7
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,445

Rep: Reputation: 1068Reputation: 1068Reputation: 1068Reputation: 1068Reputation: 1068Reputation: 1068Reputation: 1068Reputation: 1068
O.k., seems we're getting closer to being on the same page...
Don't worry about the boot partition finding the root - it'll happen.
Of course, after moving everything, you'll need to re-install the boot-loader, and clean up the fstab.

As to your plan, the only other concern I would have is expanding the extended by "lowering" (for want of a better term) the start. The (primary) partition table entry defines the start and size of the (extended in this case) partition. Those "extra" partition table entries pixellany mentioned are all imbedded and relative to the start of the expanded partition.
See my concern ??? - yuck !!!.
I have used cfdisk (note, fdisk won't, or at least didn't, work for this) to expand an extended into contiguous free space higher than the extended - I've not tried expanding like you plan.
Might work, might not.


Nothing, repeat nothing should be attempted without a good backup. I prefer two backups personally.
 
Old 01-14-2006, 05:43 AM   #8
john_b
LQ Newbie
 
Registered: Jan 2006
Posts: 11

Original Poster
Rep: Reputation: 0
Thanks for your patience. I think the resizing backward of extended partitions is okay(theoretically). (Can't post links apparently, until I've made 5 posts... )

However, now my fedora boot partition #3 won't move. I get:
Error: File system has an incompatible feature enabled.
A quick google turned up this thread and some problem with 'dir_index':

(will post later)

I'm traveling tomorrow and probably won't have time to get to this for a couple days. Will post when I get something to work.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
partition used/free space elbriga Linux - General 2 09-24-2004 01:36 PM
Can't free space on root partition AThomsen Fedora 1 06-18-2004 03:58 PM
How do I check free partition space explorer Linux - General 5 04-14-2004 01:35 PM
Partition Free Space - Move /home to the new partition gregkise Linux - General 5 12-16-2003 11:19 PM
Partition Free Space? Gerardoj Linux - General 16 06-02-2003 02:16 AM


All times are GMT -5. The time now is 04:25 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration