LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Modifying partition layout & partition order (https://www.linuxquestions.org/questions/linux-general-1/modifying-partition-layout-and-partition-order-565023/)

rm_-rf_windows 06-28-2007 01:07 AM

Modifying partition layout & partition order
 
I've got a 120GB machine with 4 OSs as follows:

Primary partition: Windows NFTS (60GB)
Primary partition: DATA FAT32 (3GB)
Extended partition:
- logical partition: DATA ext3 (5GB)
- logical partition: Mandriva ext3
- logical partition: Debian ext3
- logical partition: Slackware ext3
- logical partition: SWAP ext3

I would like to install a UNIX OS. I need a primary partition for FreeBSD. What I wanted to do is shrink my Windows partition to 50GB, get rid of my data partitions and then create one 18GB primary partition for FreeBSD, which would reside between Windows and Mandriva. THIS MUST BE A PRIMARY PARTITION, FreeBSD REQUIRES IT TO BE A PRIMARY PARTITION.

Could anybody offer me some advice as to whether this is possible? ...and perhaps send me a link that deals with partition order, deleting partitions in the middle of a series of other partitions and creating new partitions in the middle of other partitions? I was thinking of using GParted to shrink the Windows partition. What order should I follow? Can I just delete the data partitions, shrink the windows partition and then create a partition in the middle of the Windows and Linux extended partition? Oh yeah! The 5GB ext3 data partition is the first of a series of logical partitions within my extended partition! Crap!! Perhaps a better idea would be to shrink the Windows partition to 45GB and leave the 5GB ext3 data partition as is...

Another question. When I created this partition layout, it didn't let me create a third primary partition (even before having created the extended partition, I think!). I thought you were allowed up to 4 primary partitions. Can anybody offer a logical explanation for this? Might there be two hidden primary partitions within the Windows bit, one for boot and the other for data? I can't see it when I use different tools to see the partition layout...

Many thanks.

blackhole54 06-28-2007 02:06 AM

First, I don't guarantee anything, so proceed at your own risk. Unless you are willing to lose what you have, it would be a really good idea to backup what you have first. You could look into tools like partimage, Norton Ghost, or even plain old dd for this. While I have successfully resized partitions, etc., once (for reasons unknown) I had things go wrong and I had to recover everything from backup.

Quote:

Originally Posted by rm_-rf_windows
Oh yeah! The 5GB ext3 data partition is the first of a series of logical partitions within my extended partition! Crap!! Perhaps a better idea would be to shrink the Windows partition to 45GB and leave the 5GB ext3 data partition as is...

I would think this would be a little safer than your first proposal, because you would not have to move the beginning of the extended partition (I don't know if that would even be possible). While I don't know of any howtos to refer you to, I would think this should be straightforward; after deleting the second partition you should have both the partition table entry and disk space available for a new primary partition, and it will be in the correct order.

Quote:

Another question. When I created this partition layout, it didn't let me create a third primary partition (even before having created the extended partition, I think!). I thought you were allowed up to 4 primary partitions. Can anybody offer a logical explanation for this? Might there be two hidden primary partitions within the Windows bit, one for boot and the other for data? I can't see it when I use different tools to see the partition layout...
With the Linux tools I have used, I think all of the partitions should be visible. If you were using a Linux tool for partitioning (all bets are off with MS tools!), I can think of no reason why you should have had any problems creating a 3rd primary partition unless you had already created the extended partition. You are correct than on x86 machines there are 4 entries in the primary partition table. It is possible to use all 4 for primary partitions if you don't need an extended partition.

In fact -- now that I think of it -- if there had been two hidden partitions, you would not have been able to create the extended partition, as that takes up an entry in the primary partition table.

Junior Hacker 06-28-2007 02:28 AM

Gparted will probably do that for you. Only after you back up important data because it somehow seems to figure that out and will scare you after you did (more or less), what you wanted, then you'll be back crying because you can't get to your data. (Most Gparted horrors have that "unaccessible data" thing). But those that have their data backed up don't seem to have issues after using Gparted.

syg00 06-28-2007 05:16 AM

I can't imagine there is any way freeBSD would require an 18 Gig (single) partition (never installed it though).
Shrink the 'doze, give it what it needs to boot (as a primary), and make the rest logical.
KISS.
gparted is good for this sort of thing.

Things can always be moved, but why make it more messy than necessary.
Ummm ... note my sig ...

As for the inability to allocate a fourth primary, this is usually a limitation in the user interface - presuming space is available.
I like cfdisk personally rather than the GUI-fied tools.


All times are GMT -5. The time now is 05:30 PM.