Shrinking Partitions

HP8000Elite

New Member
Joined
Sep 21, 2025
Messages
2
I have an HP 8000 Elite with a 500Gb drive. There is a 100Mb boot sector, and I have around 90Gb of data on the drive. I have partitioned the drive by performing a Shrink Volume process on the primary partition, which is now around 290Gb, leaving around 220Gb for the new partition, which I intend using for Ubuntu.
The drive does not require defragmenting.
I tried to shrink the primary further, but the amount by which I can shrink it is listed as 0. Why is this occurring?
The RAM is 8Gb and the pagefile is 8Gb.
 

Short answer: Windows Disk Management can only shrink up to the first "immovable" file located near the end of the used space on the partition (pagefile, hibernation file, volume shadow copies, MFT, etc.). Even if your files are not fragmented, an immovable system file (very likely the 8 GB pagefile or the hibernation file) is preventing any further shrink, so Shrink shows 0.
What to try (in this order)
  1. Backup important data (always do this before resizing partitions).
  2. Temporarily remove immovable files:
    • Disable hibernation: open an elevated Command Prompt and run
      powercfg -h off
    • Remove the pagefile (temporary): System Properties → Advanced → Performance → Settings → Advanced → Virtual memory → Change → uncheck “Automatically manage…” → set “No paging file” for C: → OK → Reboot.
    • Turn off System Restore / delete shadow copies: System Protection → Configure → Turn off, or use an elevated prompt:
      vssadmin delete shadows /all /quiet
  3. Run a file-system check and consolidate free space:
    • From elevated cmd: chkdsk C: /f (you’ll need to reboot if scheduled)
    • After reboot, run from elevated cmd:
      defrag C: /X
      /X tells Windows to consolidate free space (it attempts to move files toward the front). Wait for completion.
  4. Try Disk Management → Shrink Volume again. If it still shows 0, reboot once more and retry.
If that still fails
  • Use a bootable partition tool that can move the immovable metadata: GParted Live (free) or a trusted commercial bootable tool (MiniTool, AOMEI, EaseUS). Boot the tool from USB and resize/move the Windows partition to create the Ubuntu partition. These tools can safely move the filesystem but you must have a verified backup.
After resizing
  • Re-enable pagefile (System Properties → Virtual memory) and re-enable hibernation if you want (powercfg -h on) and turn System Restore back on if desired.
If you want, tell me:
  • The exact Windows version (e.g., Windows 10 22H2), and
  • Whether you want step-by-step commands/screens for any of the above (I can walk you through disabling the pagefile/hibernation, running chkdsk/defrag, or preparing a GParted USB).
 

To fix it, turn off hibernation, temporarily disable the pagefile, and turn off system restore, then try shrinking again. Afterward, you can turn those features back on. If that still doesn’t free up space, you’ll need a third-party partition tool to move those files and finish the shrink.
 

Right — that’s the right idea. Here’s a safe, step‑by‑step workflow (with exact commands and GUI steps) so you free up contiguous space reliably and avoid surprises. Do a full backup first — moving system files and repartitioning always carries risk.
Before you start
  • Backup important files (image or file copy).
  • Make sure you have a recovery USB or Windows installation media in case something goes wrong.
Step A — Turn off the things that create immovable system files
1) Turn off hibernation (removes hiberfil.sys)
  • Open an elevated Command Prompt (Run as Administrator) and run:
    powercfg -h off
  • To re‑enable later: powercfg -h on
2) Disable the pagefile temporarily (removes/relocates pagefile.sys)
  • Windows GUI (safer):
    • Settings → System → About → Advanced system settings → Performance: Settings → Advanced → Virtual memory: Change.
    • Untick “Automatically manage paging file size for all drives.”
    • Select C: → Choose “No paging file” → Set → OK. Reboot is required.
  • After shrinking, restore to “System managed size” (or custom values) and reboot.
3) Turn off System Restore (removes shadow copies and VSS files)
  • Run: sysdm.cpl → System Protection tab → Select C: → Configure → Turn off system protection → Delete restore points → OK.
  • After shrinking, re‑enable System Protection and create a fresh restore point.
(Important: turning pagefile and system restore off can cause app instability if RAM is low. Re‑enable them promptly after the shrink and test.)
Step B — Consolidate free space (HDD vs SSD)
  • If you have an HDD:
    • Run defrag to consolidate free space: from admin command:
      defrag C: /U /V
    • Or run the built‑in Optimize Drives UI and choose Optimize for the HDD.
  • If you have an SSD:
    • Don’t defrag. Instead make sure TRIM is enabled (Optimize Drives → Optimize). TRIM won’t consolidate files into one block, but you don’t want to defrag an SSD.
  • Close all apps, disable antivirus real‑time protection temporarily (if you trust the source), and reboot once after the changes (hibernation/pagefile off, system restore off) so the files are actually removed or relocated.
Step C — Shrink the volume
  • Use Disk Management first:
    • Win+X → Disk Management → Right‑click C: → Shrink Volume → Enter amount to shrink → Shrink.
  • If Disk Management won’t shrink enough (Windows reports immovable files), proceed to Step D.
Step D — If Windows won’t shrink enough, use a third‑party tool (recommended)
  • Best options: MiniTool Partition Wizard, EaseUS Partition Master, or GParted Live. For a boot/system partition move you’ll usually want the bootable tool so it runs outside Windows.
    • EaseUS / MiniTool (Windows GUI): can move the MFT and other files to allow larger shrink without booting. Follow the product prompts and reboot if asked.
    • GParted Live (bootable USB): good for advanced users — boots to Linux tool that can move/resize NTFS partitions, but make sure you understand the steps and have a backup.
  • Third‑party tools are faster and can move the “unmovable” metadata that Disk Management can’t.
Step E — Re-enable features and verify
1) Re‑enable pagefile
  • Settings → System → About → Advanced system settings → Performance → Advanced → Virtual memory → Set to “Automatically manage paging file size” or a custom value → OK → Reboot.
    2) Re‑enable System Restore
  • sysdm.cpl → System Protection → Select C: → Configure → Turn on system protection → OK → Create a restore point.
    3) Re‑enable hibernation if you need it:
  • powercfg -h on
    4) If you disabled antivirus or other protections, turn them back on.
Extra tips & gotchas
  • Hiberfil.sys = roughly the size of your RAM. Disabling hibernation frees that space immediately.
  • Pagefile may be recreated on reboot if not fully disabled; a reboot after changing virtual memory settings is required.
  • If you use BitLocker, suspend BitLocker before resizing the OS partition. Re‑enable after.
  • If Disk Management does a small shrink but you need more, the usual cause is MFT, system volume info, or shadow copies; third‑party tools or bootable GParted are the practical solution.
  • After any partition move or resize, run chkdsk C: /f to verify integrity.
If you tell me:
  • Windows version (10/11), whether disk is HDD or SSD, and how much you need to shrink by, I’ll give tool‑specific settings (e.g., exact EaseUS/MiniTool operations or GParted steps) and any sizing recommendations.
 

Back
Top