suse tpx60s wrote:
>
> Thanks for the tips. So if you can only extend a partition from the end,
> is it possible for me to move all the partitions to fill the empty space
> created by shrinking the XP partition, effectively moving the free space
> to the end of the disk?
>
> Every way I look at this makes me think I’ll just be better off saving
> my Linux data and doing a factory restore from the recovery partition,
> shrink the partition and reinstall the few apps I need in XP; then
> partition the rest of the disk for a fresh 11.1 and 11.2 install. I just
> don’t have the time for that at the moment.
You can play musical chairs any way you want and with a little planning
things could work out pretty simply. Here’s an example.
Let’s say you machine came with XP, no recovery (maintenance) partition, so
XP has the whole disk. For illustration purposes, let’s assume a 100GB
drive. You boot XP and then shut down. You boot your favorite partition
editor tool and you shrink XP as far as it will go. Best you will do at
this point is free something under 50GB because XP has put files at the
midpoint of the drive - 50GB out. Now, XP will run fine with 10GB or a
little less but you can’t get there from here. You only have less than
50GB free for Linux. If you had planned ahead and shrunk the XP partition
before you ever booted it, you might get it down close the 10 GB or so
range but you didn’t because that’s what you want to do now.
OK, you put Linux on 3 (sda2 as /, sda3 as /home, sda4 as swap. XP is on
sda1) new partitions that fill the rest of the disk and they are all
primaries - you’re SOL because you just filled all 4 MBR partition table
entries so you can’t create any more. OK, let’s put all 3 Linux partitions
into and extended partition and logical partitions; Linux uses sda5, 6, and
7. Now you have some play room. There are some other quirks due to MBR
partition table order and such but that’s just going to confuse matters and
shouldn’t cause a problem. FYI, with just a single Win partition, I
allocate two more primaries and and extended partition just to insure an
order in the table I’m sure will work for any OS but that’s not really
relvant to the problem.
OK, you manage to shrink XP to 10GB. That leaves you with a free space hole
between XP and your first Linux partition of some 40GB. Figure out how
much room you have to have to hold you root partition - use df. Allow a
comfortable fudge factor and allocate a PRIMARY partition at the head of
the free space. Note that this becomes sda2 and this is not the final
size - you’ll expand it later. If your original root partition was sda2,
it will shift to being sda3, so it WILL NOT BOOT unless /home was on a
logical partition (sda5 or higher)! Use a live cd and copy the entire
original root partition to the new sda2. If the original root partition
was sda2, you’re home free - it will start to boot (but it won’t complete
since you have an extra partiton between / and /home right now unless /home
was on sda5+). If the original / partiton was sda2 and is now sda3, you
can delete sda3 and probably boot very happily. Assuming / was originally
on a primary partition as sda2, deleting it after the copy will leave you
with another hole. Repeat the process of creating a new partition but make
it just a little larger than the data size in your /home. Copy /home
contents to this, free the original /home and you have an even bigger free
space. Delete and recreate /swap at the head of this and every thing is
free to the end of the disk. Play with the mapping you want in that free
space and repeat the process above to finally get things where you want
them in the sizes desired. Draw lots of pictures of the drive map and that
should be fairly straight forward. If all you Linux partitions were on an
extended partition, things get sticky. Just remember that the partition
assignment (sda1,1,3,etc.) is affect by any partitions you create or delete
and you should be OK. Also bear in mind that XP will be very unhappy if
you move it to any partition that does not start where the original started
or if you try to add a partition ahead of it.
If you elect to re-install XP and do it from recovery disks you should know
that most of these recoveries recreate the original disk map and will
overwrite anything you have added. Of all the ones I’ve messed with, only
IBM/Lenovo was nice enough to restore to whatever drive C you provide and
don’t mess with existing partitioning - the rest just seem to grab the
whole disk.
If you decide to press on, email me directly and I’ll try and help you as I
can - the email address here is valid.
I think that backing up your /home and starting over might be simpler. The
only time I do the image copy thing is when re-configuring a system running
lot’s of added apps that install in the / patriron (/opt, /user, etc) and
would have to be re-installed and tweeked.
–
Will Honea