can't partition free space from shrunken partition
Linux - NewbieThis 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!
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.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
can't partition free space from shrunken partition
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.
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.
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.
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.
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:
-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.
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.