Resizing XP Partition and cloning

Topics about disk partitioning (fdisk, parted, gparted, partimage), Volumes Management (lvm, evms, dmraid), Storage, file systems, ...
Post Reply
PierreJ
Posts: 2
Joined: 18 Jul 2009, 12:31

Resizing XP Partition and cloning

Post by PierreJ » 18 Jul 2009, 14:29

Hello,
I want to resize my XP Partition since I want to install Linux (1 or 2 distros, 'haven't decided yet).

I noticed there is a similar thread but I haven't tried it yet and there's no error (knock on wood).

I have had help doing this before but I was wondering if I should try cloning the XP partition with Partimage or some program? Clonezilla? Or is Partimage good enough?

However, I am not sure how to 'save' the image or file. How large would the image be? I'm doing this on a laptop, a Thinkpad T41 and it only has a Matshita (Panasonic) UJDA745 which only has CD-RW capabilities (DVD portion is DVD ROM). The laptop has two USB ports if that helps with any ideas.

The XP partition has 4.6GB used up. The rest is free space. The HDD is an IDE 120GB (so 111GB of usable space in total). I thought of shrinking the XP partition to about 20GB. Is that a good choice?

So, XP is using up 4.6GB of the disk and the partition was divided like this:
C: (free space: 59.3GB and 63.9GB total)
The rest is in "E: free space 47.5 GB and total of 47.8 GB so .3 GB used)

There might be a chance I'd have to re-install XP but I'll cross that bridge when I come to it. I was curious about cloning the current state of XP and would like to try and learn how. I'm just not sure how to clone it but I have the impression I could use Partimage. How could I save it though? To CD? Or compress it and store it someplace?

Hopefully, I can obtain some answers, ideas and/or recommendations. Thanks to all who reply. ;)

P.S. I was thinking of re-installing XP because I have extra drivers installed (from previous owner so for e.g., T30 drivers etc.) and the seller of this Thinkpad sells other models and he cloned a drive of his so I received all these extra files and drivers. I was going to try to preserve the install as it applied to my T41 but maybe it is easier to re-install? I still would like to try Partimage, though, for the experience.

Ruler
Posts: 35
Joined: 29 Jul 2009, 19:20

Post by Ruler » 30 Jul 2009, 20:58

If you just want to resize your XP partition, gparted is perfect. Type startx (or follow the on-screen directions to set up X if it doesn't work) and start gparted. Click on resize, enter how much you want free after your partition, and apply changes. Voila - XP is now smaller. :)


There are a couple of ways to clone the XP partition to another. In either way, you'll need to create a new partition of the same exact size. I use fdisk, but you can also use gparted for a pretty GUI. Then see below.

1. Binary Copy - This will copy EVERYTHING, bit-for-bit, from one partition to another. Type fdisk -l and you'll be able to see your partition table. In the following command, /dev/sda2 is the new partition you created and /dev/sda1 is the one where XP is installed. dd if=/dev/sda1 of=/dev/sda2 bs=1M Do that and it'll take quite a while, but you're assured of the target partition being identical to the source.

You can even use this method to clone entire drives by omitting the number and changing the of (out file) to another device node. I've done exactly this when a co-worker ran out of space on his 40 gig drive. He didn't want to format, so he bought another drive. I hooked them up so that /dev/sda was his 40 gig and /dev/sdb was his new 160 gig. dd if=/dev/sda of=/dev/sdb bs=1M and a couple hours later, it was done. I used gparted to resize the partition on the 160 gig drive and bam - he had 4x the space, didn't have to reinstall, everything was still set up how he liked it, and didn't lose a thing. :)

2. partimage - Partimage copies only the used parts of a given partition. This makes it much faster and the image files tiny compared to dd. However, you need to create an image, then restore it. I personally have images on my 32 gig flash drive for the PCs I'm working on. Mount your flash drive and then simply type partimage to start it up. Save the image to wherever you mounted your flash drive, then start it again and restore the image file to the new partition you created.

Since partimage saves everything on the disk that's being used, the hibernation and page files are included. This is wasteful IMO, so before I snap an image of a windoze drive, I mount it and delete these two files, then umount and image. (They're automatically re-created when windoze starts if they don't exist.)


An appropriate size for your XP partition depends entirely on what you plan on doing with it. If you want to install lots of applications and games, 20 gig is WAY too small. If you want to use it to surf and check e-mail, it's probably fine. The size has got to be up to you. gparted makes it nice though, in that you can resize partitions without losing data. :)


Once you get used to using it, the system rescue CD is a fantastic tool. I've built over 60 PCs using identical hardware for my employer. I have one image on my flash drive and can reinstall windoze, all the drivers, and all applications we use in under 10 minutes. Slap an IP on it and it's back in business after the sales person mucks it up. Bad thing is the 20-30 PCs of different models that're scattered around. Don't have an image for most of them and it sucks actually having to do work instead of just using partimage. (Imagine - they want me to work while I'm at work! The nerve of some people.... ;) :lol: )

Post Reply