Eating Microsoft's Dog Food – A Self-Experiment With Windows 7, Part 1: Preparation

After reading a lot about the speed and stability of Windows 7 (beta 1), I decided it was time for me not only to use it for real work, but also to move from 32-bit Windows to a 64-bit installation. This mini-series serves as a documentation of the steps I took and the lessons I learned.

You may call me reckless for using a beta, and an early one at that, on my production system, and you may even be right – time will tell. But at least I am trying not to be negligent: I chose not to replace my Vista installation with Windows 7, but install Win7 into a virtual hard disk (VHD) file that can be located anywhere on an existing NTFS volume.

Space Requirements

I reckoned I would need a 40 GB partition in order to really be able to work with the Windows 7 installation. Add to that the size of the paging file (located on the partition containing the boot loader). All in all I would need at least 45 GB of hard disk space.

Taking stock of the free space on my laptop’s hard drive, I realized that:

  1. the VHD file would have to be stored on Vista’s installation drive (C:), and
  2. that some serious cleaning-up was required to make enough room even on C:.

Housekeeping: Cleaning Up Vista’s System Partition

The Windows (Vista) partition where I wanted to install Windows 7 has a size of 60 GB of which 20 GB were free. Not enough for production use. First I tried several conventional steps to make room for the VHD:

  1. Removal of Vista SP1 uninstallation files by running vsp1cln.exe.
    Result: No change in free space. I may have done that already without remembering…
  2. Deactivation of system restore on C:. Yield: ~9 GB. Now free: 29.67 GB.
  3. Uninstallation of programs I do not really need. Yield: 2.9 GB. Now free: 32.61 GB.
  4. Removal of the cache used by Lenovo System Update, located in C:\Program Files\Lenovo\System Update\session. Yield: 1.2 GB. Now free: 33.80 GB.

Moving and Linking

Still around 10 GB missing. I had to resort to more drastic measures. I looked around the C: drive for large folders that would warrant moving to a different partition. Of course, directories that can be moved without consequences are scarce on the operating system volume. But I would not simply move data, I would make use of one of the lesser-known features of NTFS, junctions. A junction basically is a link pointing from one directory to another. So, after moving a folder from C: to E:, I would create a junction pointing from the original to the new location. Junctions, unlike Explorer’s links, are implemented by the file system and thus completely opaque to most applications.

Here is what I did in detail:

Move of MS Office’s MSOCache folder from C: to a different volume and replacing the original with a junction pointing to the new location:

robocopy /move /e c:\MSOCache "e:\Backup From Vista\MSOCache"
mklink /j c:\MSOCache "e:\Backup From Vista\MSOCache"

Yield: 655 MB. Now free: 34.55 GB.

Move of VMware Workstation’s pkg folder from C: to a different volume and replacing the original with a junction pointing to the new location:

robocopy /move /e "c:\Program Files\VMware\VMware Workstation\pkg" "e:\Backup From Vista\Program Files\VMware\VMware Workstation\pkg"
mklink /j "c:\Program Files\VMware\VMware Workstation\pkg" "e:\Backup From Vista\Program Files\VMware\VMware Workstation\pkg"

Yield: 640 MB. Now free: 35.19 GB.

Move of Visual Studio’s Windows CE folder from C: to a different volume and replacing the original with a junction pointing to the new location:

robocopy /move /e "c:\Program Files\Microsoft Visual Studio 9.0\VC\ce" "e:\Backup From Vista\Program Files\Microsoft Visual Studio 9.0\VC\ce"
mklink /j "c:\Program Files\Microsoft Visual Studio 9.0\VC\ce" "e:\Backup From Vista\Program Files\Microsoft Visual Studio 9.0\VC\ce"

Yield: 590 MB. Now free: 35.78 GB.

Move of the MSDN library folder from C: to a different volume and replacing the original with a junction pointing to the new location:

robocopy /move /e "c:\Program Files\MSDN\MSDN9.0" "e:\Backup From Vista\Program Files\MSDN\MSDN9.0"
mklink /j "c:\Program Files\MSDN\MSDN9.0" "e:\Backup From Vista\Program Files\MSDN\MSDN9.0"

Yield: 540 MB. Now free: 36.32 GB.

Move of the Windows ‘Installer’ folder from C: to a different volume and replacing the original with a junction pointing to the new location:

robocopy /move /e "c:\Windows\Installer" "e:\Backup From Vista\Windows\Installer"
mklink /j "c:\Windows\Installer" "e:\Backup From Vista\Windows\Installer"

Yield: 1,550 MB. Now free: 37.87 GB.

Move of the Windows driver store from C: to a different volume and replacing the original with a junction pointing to the new location:

robocopy /move /e c:\Windows\System32\DriverStore\FileRepository "e:\Backup From Vista\Windows\System32\DriverStore\FileRepository"
Manual step: Take ownership of the DriverStore folder and temporarily allow the administrators to create folders
mklink /j c:\Windows\System32\DriverStore\FileRepository "e:\Backup From Vista\Windows\System32\DriverStore\FileRepository"
Manual step: Restore permissions to their original state before taking ownership

Yield: 1,520 MB. Now free: 39.39 GB.

Final Steps

As a last cleanup step I ran “Disk Cleanup” which mainly removed the hibernation file. Yield: 3 GB. Now free: 42.4 GB. Along with the page file, which would be recycled by Windows 7, I had roughly 45 GB available. I reckoned that would be enough.

As a final preparatory step I defragmented the C: drive to create larger contiguous blocks of free clusters.

In the next article I will describe how to install Windows 7 x64 into a VHD located on a 32-bit Vista partition. Hint: The by now well-known method of booting the Windows 7 DVD and choosing “Windows Repair” does not work in this scenario because the x64 installation DVD does not allow repairing 32-bit installations.

, , , ,

6 Responses to Eating Microsoft's Dog Food – A Self-Experiment With Windows 7, Part 1: Preparation

  1. Kyle Yamnitz July 21, 2009 at 14:27 #

    Helpful article, thanks. One question though – after installing Windows 7, do you need to keep the junction linked Driver Store and Installer folders? Are those replaced with ones used by Windows 7? Thanks,
    –Kyle

    • Helge Klein July 21, 2009 at 15:02 #

      Kyle,
      the junctions along with their targets are only used by the old Windows installation. The are not replaced by Windows 7 since that is installed to a different partition (I did not perform an upgrade).

  2. Kyle Yamnitz July 21, 2009 at 16:00 #

    Thanks Helge. So can I assume if I upgrade to Windows 7 later it’s safe to delete those two folders (DriverStore\FileRepository and Installer)? Thanks,
    –Kyle

    • Helge Klein July 21, 2009 at 20:45 #

      Kyle,
      yes, if you did it the same way I did then afterwards it is safe to delete the junction targets.

  3. Makarand Yerawadekar April 23, 2010 at 11:35 #

    Hi,

    I have Win 7 installed, and C: has very little space about 2GB, can I use robocopy and mklink to move – MSOCAche, Installer directories to d: and continue running Win 7 normally?

    I am finding ways to make some more space on C:

    Regards

    -Makarand

Trackbacks/Pingbacks

  1. Eating Microsoft’s Dog Food - A Self-Experiment With Windows 7, Part 2: Installation at Helge Klein - March 23, 2009

    […] Helge Klein on the workings of Windows, Terminal Services and other things « Eating Microsoft’s Dog Food – A Self-Experiment With Windows 7, Part 1: Preparation […]

Leave a Reply