TweakHomePC

Dual-booting all versions of Windows and Linux

   Dual-Boot    |    Win 8    |    Win 7    |    Vista    |    Win XP/2K/NT    |    Win9x/Me    |    How to    |    Legacy 9x Tweaks    |    SiteMap   


 

Here: Home > How do I ... >


Shrink or Resize the Windows 8, 7 or Vista Partition or Drive

Last reviewed: May 2009

On this page:
• About using Shrink
• Test Shrinking in Disk Management without Preparation or Defragmentation
• Prepare to Defragment
• Defragment with PerfectDisk10
• Shrink Windows 7 or Vista Partition in Disk Management

About using Shrink

Windows 8, 7 and Vista have a Shrink option in Disk Management that allows you to make a partition/volume smaller so you can then create another partition that will come after the shrunk partition. You can only shrink volumes that use the NTFS file system or have no file system (RAW). Unfortunately Shrink has other important limitations that affect many users.

When you shrink a partition, ordinary files on the selected partition area are automatically moved to an earlier part of the partition to create new contiguous Unallocated space at the end where the new partition(s) can be created. For some users shrinking the Windows 8, 7 or Vista partition will be very simple - just right-click the volume in Disk Management, select Shrink, enter the amount to shrink by, show a little patience and then you have exactly what you wanted. This scenario occurs when there are no unmovable files towards the end of the partition.

For many users those unmovable files will stop the shrinking process far too soon or may even prevent it starting. The unmovable culprits virtual memory (paging file) and hibernation can be stopped beforehand and restarted later. So can the unmovable VSS shadow copy by turning off Restore Points. Another major culprit is the Master File Table (MFT) which can be anywhere on the disk (even at the very end of it!) and this cannot, and must not, be switched off even temporarily. Disk Defragmentation will not touch any files marked as unmovable.

Raxco's defragmenting utility, PerfectDisk10 Professional, will gladly relocate all unmovable files including the MFT. You can download it for a free 30-day trial period. Relocating very many files, some quite large, can be a very time consuming exercise. It's pointless spending a lot of time moving unused or unnecessary files. To this end, a good disk cleanup and a thorough disk defragmentation is desirable before you start. It will improve your hard disk performance and should even speedup the shrinking process!

Windows partition editors often use a different disk geometry than that used in Linux. Many users would be tempted to use a third-party partitioning utility like the free and excellent GParted. Unfortunately Windows 8/7/Vista may become unbootable - the MFT may be destroyed and the hidden sectors value may not be updated. Also, shrinking the Windows partition under Windows' Disk Management usually creates small Unallocated partitions (about 1 MB) both before and after the Windows drive. If you resize with third-party partitioning utilities, these will not be created, or may even be removed, preventing Windows from booting.

It's strongly recommended that you use Shrink in Disk Management to resize the partition and not a third-party utility - play safe and let Windows do it. If the space achieved is inadequate, you can switch off unmovable files and defragment with PerfectDisk10 Professional before you run Shrink again.

If you intend reinstalling Win8/7/Vista then you have no problem at all in gaining a massive amount of Unallocated disk space provided you use Shrink immediately after the install is complete. Unfortunately this will not apply to many users.

Test Shrinking in Disk Management without Preparation or Defragmentation

It makes sense to test a Shrink in Disk Management before doing anything else. After all it may work! A failure of a test shrink does no harm to your computer. If it does not work you will know immediately (unlikely) or you may have to wait some time before you know if it gave you all the space you need.

The advantages of Preparing and Defragmenting are that you will have a faster/slimmer Windows 8/7/Vista and you can expect the desired result to be achieved.

If you decide to simply test it first, then skip down to Shrink Windows 8, 7 or Vista Partition in Disk Management below.

[top of page]

Prepare to Defragment

You will not want Shrink to spend a long time relocating files that are not required. Other files are possibly huge and can be recreated by Windows later. Nor will you wish to risk some unmovable files stopping the process before enough empty space has been gained. You can avoid this with just a few minutes work! Any changes made must be reset later.

To maximize you chances of total success you should complete this section, then use PerfectDisk10 to defragment, and finally use Shrink in Disk Management.

  1. Backup important data before making any changes to a partition. You can burn files to a CD, clone an image of your hard disk, copy files to a USB flash/pen/thumb drive, or use an USB external drive (good choice)
  2. Download, install, and run Ccleaner (freeware, 3 MB) or at least clear out much rubbish with Disk Cleanup Wizard (Start > All Programs > Accessories > System Tools > Disk Cleanup).
  3. Disable System Restore and VSS (Control Panel > System and ..... > System > System Protection - clear the Win8/7/Vista tick box, click Apply.
    Note: Disabling System Restore automatically removes all previously created Restore Points so enable it later.
  4. Disable the pagefile - Virtual Memory (Control Panel >System and ..... > System > Advanced System Settings > Advanced tab > Settings button in Performance > Advanced tab > Change button > Uncheck automatic setting, select No Paging File (or make it very small), click Set button, click OK.
  5. Disable Write Debugging (still in Advanced System Settings > click Settings button in Startup and Recovery > click the drop-down under 'Write debugging information', note the current entry, and then select None.
  6. Disable Hibernation (right-click Command Prompt in Accessories, select Run as administrator, type powercfg.exe /hibernate off).
    Use 'powercfg.exe /hibernate on' to re-enable it.
  7. Restart computer.
  8. Delete C:\Pagefile.sys file (if it's not visible, read How to Show Hidden Files in Windows).

[top of page]

Defragment with PerfectDisk10

  1. Download and install PerfectDisk10 Professional (Perfect Disk has a 30 day evaluation version).
  2. Close all programs correctly and Restart Windows 8/7/Vista.
  3. Run PerfectDisk. Check for and install updates (click on Product Resources or Help, and click Check for Updates).
    • Disable your Internet Connection.
    • Exit your Anti-Virus software.
    Click AutoPilot Scheduling in PerfectDisk.
    Click One-time scheduled defragmentation. A new window will appear.
    • In Schedule Name, enter a unique name.
    • In Select Drives, tick your Windows partition (probably C:).
    • In Defrag Method
      • Tick Reclaim Free Space before defragmentation, and tick both sub-entries.
      • Tick Defragment Files, and tick Consolidate Free Space.
      • Tick Offline Defragmentation of system files, and tick all sub-entries.
    • In Time and Date, accept the default (Run Now will actually be used).
    • Click Finish. The new window will close.
  4. Click the Run Now button, and then the Reboot Now button that appears.
  5. During startup, you'll see Starting boot-time defragmentation pass on screen
    PerfectDisk10 will quickly defragment and move the NTFS system files after which Windows will load and run.
    • When Windows is back again, PerfectDisk10 should continue to defragment and move all the ordinary files. It's probably running in the background (check for substantial disk activity and wait). If not, run PerfectDisk10 yourself, enable Consolidate Free Space and click Start.
    • PerfectDisk10 will probably do a second reboot but will be finished when Windows next appears.
    • To view the results of your efforts, run PerfectDisk10, highlight the partition, and click the Analyze button
      (use the Statistics tab to view Excluded Files details).
  6. Enable your Anti-Virus software, and then your Internet Connection.
  7. Restart computer.

You can now Shrink Windows 8, 7 or Vista Partition in Disk Management (next) and expect it to actually work!

[top of page]

Shrink Windows 8, 7 or Vista Partition in Disk Management

  1. Backup important data (if not done already) before making any changes to a partition. You can burn files to a CD, clone an image of your hard drive, copy files to a USB flash/pen/thumb drive or to a network location, or use an USB external drive (good choice)
  2. Close all programs correctly and Restart Windows 8/7/Vista.
  3. Click Start, right-click Computer, select Manage, and click Disk Management (in left pane)
    (in Windows 8 (press Win and X keys, select Disk Management).
  4. Right-click the Windows 8/7/Vista volume and select Shrink Volume.
    In Enter the amount of space to shrink in MB: enter enough for the total size of your new partition(s)
    (1000 MB is roughly the equivalent of 1 GB).
    Click the Shrink button
    (it can take a long time to finish depending on the number and sizes of files to be moved).
  5. Restart Windows when it's complete.

You can run a defragmentation with PerfectDisk10 again if the initial shrinkage is insufficient.

If you temporarily disabled items in Prepare to Defragment above, you must undo all changes now.
Don't forget this - it's of considerable importance.

Create a new Restore Point now.

Finished!

[top of page]

Please remember that you alone are responsible for the consequences of any changes you make to your computer hardware or software.

Copyright © LarryM 1998-2015 thpc@mail.com