Expand Your Mind
After the recent release of Visual Studio 2008 SP1 and .Net 3.5 SP1 I thought it would be a good idea to upgrade my Windows development environment to take advantage of some of the cool new features. I do .Net development on my Ubuntu machine by using VirtualBox to run a Windows 2008 Virtual Machine. It works quite well, especially if you're mainly doing server side stuff or Windows Forms. I'm not sure how it would handle the DirectX goodness of WPF, but I'm willing to live without that for the moment, and I can always install Vista x64 on another box if need be.
When I originally set up the VM, 20 gig sounded like a good size for the hard drive, so I set up a 20 gig dynamically expanding VDI file using VirtualBox and started installing. The dynamically expanding disks are cool in that they will only expand if need be, so if you create a 300 gig image and only use 20 gig of it, the VDI file for the drive only uses 20 gig of your actual disk space disk. I wasn't planning on installing office or anything else, so I thought that the drive would be more than big enough. How wrong I was.
After installing the Windows 2008, Visual Studio 2008, SQL Server 2008 and Firefox 3.0 I had around 3 gig free. Where did all my drive space go??? "No matter", I thought, "3 gig should be enough to work with for the moment, especially as I'm using network drives for all my data storage". I continued working like this for a few months, right up until I went to install the VS 2008/.Net 3.5 Service Pack 1 updates.
Half way through the install I merrily discovered that the service packs require over 6 gig of free space just to install themselves. But.. but.. but... I don't HAVE 6 gig of free space! It should be noted that the installation program says that it is merely "recommending" that you have this amount of free space, but it won't let you continue unless you free up the "recommended" 6 gig. That's a pretty definite recommendation.
My first thought was that to free up that amount of space I would have to uninstall either Visual Studio or SQL Server, which would sort of defeat the purpose of installing the service packs. Obviously this wouldn't do, so I went looking for ways to save a few gig here and there, and quickly discovered that I had a 2 gig page file by default. I reduced this to 200 meg or so, but I still needed to free up more space to install the service packs.
At this point I gave up on the idea of trimming back my install to allow the service pack to continue. I went hunting for some free hard drive cloning software, and found the excellent (and free) HDClone. HDClone allows you to copy one hard drive to another, and it can also expand partition so that it takes up all the space on the new drive.
I downloaded the free version of HDClone and mounted the ISO in VirtualBox, then I created a new 230 gig dynamically expanding VDI file which should be enough to install the service pack (cough). I mounted the new drive as the secondary master for my Windows 2008 Virtual Machine and mounted the ISO in the virtual CD-ROM drive.
A quick reboot of the machine presented me with the HDClone interface, and in 4 clicks I was ready to copy my drive. It even asked me if I wanted to covert the partition to take up all 230 gig of the new virtual drive. I let it do the conversion and left it to copy all my data.
An hour or so later it was done. HDClone asked me if it wanted me to automagically set up my partition data, so I let it do that and then reboot. "Yay!", I thought, "finally I'll be able to install the service pack!".
Unfortunately it was not to be. When trying to boot off my new VDI file I discovered that it wouldn't boot, even though it new the OS was on there. I dug around for my Win2k8 install media and went into repair mode. Sure enough, Windows was reporting my partition as being 0 meg. Something wasn't quite right here.
I could have downloaded something like the Ultimate Boot CD to play around with the partitions, but it was late and quite frankly I couldn't be bothered, so I booted back into HDClone again and redid the copy, this time making sure that I said "no" to its overzealous partition magic (no pun intended).
Once that was finished I removed the old 20 gig VDI, gave it a reboot and bingo, I now had Win2k8 installed on a 224 gig drive. This was more than enough space for the Service Pack 1 installer to work with. I might even have enough room to install MOSS 2007 now.

