I have openSuse 11.1 installed on a desktop computer that is partitioned as followed (I’m not at the machine, so this is from memory):
Partition 1: ext3 openSUSE 11.1
Partition 2: swap
Partition 3: ntfs (currently unused after a failed attempt to install Windows)
Partition 4: extended
etc…
The limitation is that you can only have 3 primary partitions plus an extended (or 4 primary). The last time that I repartitioned my hard drive, I had linux taking the entire hard drive (partitioned as described above) with partition 3 being an open partition of about 8gig for a secondary OS should I ever decide that I want to dual boot.
Well, I recently found a reason to have Windows in a dual boot. Wine or Virtualbox works great for most things, but I’ve found situations where I came close to bricking devices when trying to perform a flash update through a virtual machine. Therefore, I want Windows in a dual boot for those situations. My dilema is that I have a perfectly running openSUSE installation, and my free partition is not large enough to hold Windows Vista. The machine cannot take XP because I can’t find any XP drivers for it. It originally came preinstalled with Vista. Anyway, I can’t simply resize that partition because it is a primary partition and the partitions that I want to “borrow” from are in the extended partition. Therefore I need to completely repartition.
Does anyone have any advice how I can best preserve my installation or is it a completely from scratch effort? I know that I can backup my home partition, etc, but I have things configured nicely in the main installation too that I was hoping to preserve. Clonezilla won’t work because the image it takes depends on the partition to remain intact (same size & location) in order to restore the image. Are there any other options?
I don’t mind doing a completely new install from scratch, but it would be great if I could avoid the extra work.
Basically, it looks like the partition that I’m interested in is sda1 (not 3 as I had originally thought). I have approx 10gig assigned to each sda1 (Windows) and sda3 (Linux root). I may want to keep /data the same because that’s where my MythTv recordings go. However, /home is way too big for my needs, which is sda6. If I’m going to increase the Windows allocation, I might as well go ahead and increase Linux too. Therefore, what it looks like I’ll have to do is this:
Shrink /home (sda6) down by at least 10 gig, maybe more
Move swap (sda5) to the right so that the freed space is at the beginning of the extended partition
Shrink extended partition (sda4) by the amount of freed space (???). I didn’t know this is possible. Can I actually shrink an entire extended partition using gparted?
What you want to do is quite easy with that CD. If you have DHCP on your network, you can even activate a network connection inside the Parted Magic GUI and use Mozilla to post questions here, complete with screenshots, if need be.
(I just wrote a review for Parted Magic for our company newsletter. I’m a little pumped about it.)
You’ve got a lot of data on NTFS. Defrag it before you move its boundaries.
If the NTFS partition sda1 was made in vista it is best to expand it using vista if possible. I don’t know if that’s feasible for you (e.g. put the drive attached in or to another PC running vista).
I’ll back up my data and give it a go. I’m not too concerned with the NTFS partition, though. I think it currently has XP on it, which is unusable anyway because I cannot find any drivers for it. Therefore, what I may do is completely delete sda1 so that when I’m done, I’ll have approx 15gig of unallocated space that I will then let Vista create and format.
There are no XP drivers at all for my particular machine (HP Pavilion a6337c), but there are Vista drivers. The drivers missing are chipset, sound, and ethernet to name a few. I can live without sound (maybe), and sometimes chipset is not big deal, but I can’t do much without internet.
I fired up partedmagic, and I did a shrink of my /home partition (sda6) by 10 gig. It appears as if sda6 is at the very back (at the far right) and sda7 is before it (left of it). The problem is that sda7 is an XFS partition. Right now after the shrink I have sda7 (300gig XFS), free space (10 gig), and sda6 (133.75 gig Ext3). I want to move sda7 to the right so that the free space is before it. Basically I’m trying to ultimately push the free space all the way to the front next to sda1. The problem is that I cannot move sda7. I’m getting an error at the step of moving and shrinking 300gig to 300 gig. All I’m trying to do is move it, not resize it. Is there a way to move an XFS partition without having to destroy it and recreate it?
I completed the task, not exactly the way I had originally planned, but it got the job done.
I used PartedMagic 4.2 (July 09). Here are my lessons learned:
You cannot move an extended partition. You can only resize it. (At least that was my experience)
Even though gparted/parted magic officially supports moving an XFS partition, I was unable to do it. For whatever reason, when I tried moving the partition, the tasks listed to complete is to shrink the partition (300gig to 300 gig, which really was not a shrink at all) and move the partition. Gparted does not support shrinking an XFS partition, so it failed even though all I was really trying to accomplish was move it.
Therefore, because of those two limitations, I had to accomplish my task slightly differently. Originally my partitions were set up as follows:
I wanted to shrink the /home partition by 10 gig and add 5gig to sda1 and sda3. I shrunk /home, but I was unable to move sda7 (the XFS) partition to the right. Therefore, I moved sda6 to the left so the free space is at the end of the extended partition. I deleted /sda1 and moved /sda2 and /sda3 to the left. At that point I had 10 gig before the extended partition and 10 gig at the end. When I discovered that I couldn’t move the extended partition to the left, I reallocated the first 10 gig to /sda3 (my linux partition) so it grew to 20 gig. I shrunk the /home partition by another 5 gig so that I had a total of 15 gig of unallocated space at the end of the extended partition. Therefore, the partition table is as follows:
I’m getting a bit confiused. But I think that you just might get the free space to format as a primary partition when vista gets hold of it, in which case vista will install. Good luck.