How to Shrink a Windows Partition to Make Room for Fedora

Before installing Fedora alongside Windows, you must shrink the Windows partition from within Windows itself to create unallocated space for the Linux partitions.

You boot the Fedora installer and the disk selection screen shows a single massive Windows partition taking up every byte

There is no unallocated space. The installer refuses to proceed because it needs room to write the root filesystem and boot loader. You cannot just delete Windows, and you cannot install Fedora over it without losing everything. The disk is full, but the solution is to carve out space from the Windows side before Fedora ever touches the drive. Modifying partition tables while the filesystem is active risks corruption. The safest path is to let Windows shrink its own volume while it holds the lock on the data.

What the disk layout actually looks like

A disk is divided into partitions, which are contiguous blocks of sectors. The partition table records where each block starts and ends. Windows uses the NTFS filesystem, which maintains a Master File Table (MFT) tracking every file's location and cluster allocation. When Windows is running, it locks the NTFS volume to prevent corruption. It also creates immovable files like the page file, hibernation file, and system restore points that sit at the end of the partition. These files act as anchors.

The shrink operation cannot move these anchors. It can only reclaim space after the last immovable file. If the page file sits at byte 490 GB on a 500 GB drive, you can only shrink to 490 GB. You must move or delete these files to shrink further. Windows hibernation writes the contents of RAM to hiberfil.sys and locks the filesystem in a dirty state. This prevents any resizing tool from modifying the partition table safely. Fast Startup behaves similarly by keeping the kernel session alive across reboots. You must disable both before shrinking.

Reboot Windows after disabling hibernation. The filesystem lock releases only after a full shutdown.

Disable Windows locks

Open an Administrator PowerShell and run the command to disable hibernation. This deletes hiberfil.sys and unlocks the volume.

# Disable hibernation to release hiberfil.sys and unlock the NTFS volume
powercfg /h off

Navigate to Control Panel > Power Options > Choose what the power buttons do > Turn on fast startup and uncheck the option. Fast Startup leaves the NTFS volume in a state that blocks resizing tools. Disabling it ensures a clean shutdown releases all locks.

Shrink the Windows partition

Use Disk Management when you prefer a graphical interface and need to visualize the disk layout before committing. Use Diskpart when you are scripting the operation or working on a machine without a desktop environment.

Press Win + R, type diskmgmt.msc, and press Enter. Right-click your primary Windows volume, usually C:, and choose Shrink Volume. The system calculates available space. Enter the amount to shrink in megabytes. To free 60 GB, enter 61440. Click Shrink. Disk Management creates a block of Unallocated space next to the Windows partition.

Verify the unallocated space appears in Disk Management before rebooting. If the space is missing, the shrink failed silently.

Command-line alternative with diskpart

The diskpart tool provides precise control over the shrink operation. The shrink desired command sets a target size rather than a maximum, which is safer than the raw shrink command.

# Launch the disk partition manager
diskpart
# List all physical disks to identify the target
list disk
# Select the disk containing Windows, usually disk 0
select disk 0
# List partitions to find the Windows volume number
list partition
# Select the Windows partition, adjust the number if needed
select partition 3
# Shrink the partition by the desired amount in megabytes
shrink desired=61440
# Exit the tool
exit

The shrink querymax command shows the maximum amount of space available to shrink. Run this before shrink desired to check for immovable files. If querymax returns a value smaller than expected, Windows has files pinned at the end of the partition.

Install Fedora into the free space

Boot from your Fedora USB drive and launch the Anaconda installer. Under Installation Destination, select your disk and choose Custom partitioning. The unallocated space appears as a blank region. Create your partitions there. Fedora Workstation defaults to a btrfs filesystem with subvolumes. The installer creates a @ subvolume for the root and @home for user data. This layout supports snapshots and efficient storage.

You do not need to create a separate swap partition. Fedora creates a swapfile inside the root subvolume by default. The swapfile grows and shrinks as needed. A dedicated swap partition is only necessary if you plan to hibernate Fedora, which requires swap space equal to or larger than your RAM. Assign /boot/efi to an existing EFI System Partition if one is present. Create a new EFI partition only if the disk lacks one.

Trust the installer to format the new partitions. Do not touch the Windows partitions during Fedora installation.

Configure GRUB to detect Windows

GRUB is the bootloader Fedora installs to the EFI System Partition. It presents a menu at startup. The os-prober script scans other partitions for operating systems. It reads the Windows Boot Manager entry from the EFI partition or detects the NTFS boot sector. Fedora disables os-prober by default in some configurations to reduce boot time and avoid probing issues on complex disk layouts. You must explicitly enable it.

The configuration lives in /etc/default/grub. Changes here do not take effect until you regenerate /boot/grub2/grub.cfg. The generated file is overwritten on kernel updates if the package manager triggers a rebuild. Manual edits to grub.cfg are lost on the next update. Always edit the default file.

# Install os-prober if it is missing from the system
sudo dnf install os-prober
# Append the configuration line to enable os-prober detection
echo 'GRUB_DISABLE_OS_PROBER=false' | sudo tee -a /etc/default/grub
# Regenerate the GRUB configuration file to include Windows
sudo grub2-mkconfig -o /boot/grub2/grub.cfg

The output of grub2-mkconfig should include a line like Found Windows 10 (loader) on /dev/sda1. If the output shows os-prober: disabled, the configuration change did not apply. Check /etc/default/grub for the correct line.

Regenerate the configuration immediately after enabling os-prober. The change does not apply until the config file is rebuilt.

Verify the dual-boot setup

Reboot the system. The GRUB menu should appear with entries for Fedora and Windows. Select Windows to confirm it boots correctly. Boot back into Fedora and check the partition layout.

# List block devices to verify partition layout and mount points
lsblk -f

The output shows the disk structure. The Windows partition should appear as ntfs and be unmounted. The Fedora partitions should show btrfs or ext4 with the correct mount points. The EFI partition should be mounted at /boot/efi.

Boot into Windows and check Disk Management one last time. The unallocated space should be gone, and the Fedora partitions should appear as healthy volumes.

Common pitfalls and error messages

Windows may refuse to shrink past immovable files. The Disk Management dialog shows "Not enough free space" or the shrinkable space is far less than the free space. This happens when the page file, system restore points, or the MFT reside at the end of the partition. Disable the page file temporarily, turn off System Protection, and run a defragmentation. Reboot and try again.

The shrink operation failed.
Error: The requested operation requires elevation.

This error appears if you run diskpart without Administrator privileges. Restart the command prompt as Administrator.

If you use GParted from a live USB to resize the NTFS partition, Windows must be fully shut down. GParted uses ntfs-3g to access the filesystem. If Windows is hibernated or using Fast Startup, ntfs-3g detects the dirty bit and refuses to mount the volume.

NTFS is either inconsistent, or you are not administrator, or the partition is in use.
Please run chkdsk /f on Windows to fix it.

Run chkdsk /f in Windows before attempting a third-party resize. A dirty NTFS volume will cause GParted to abort. GParted handles NTFS safely only when Windows is not running and the volume is clean.

Run chkdsk /f in Windows before attempting a third-party resize. A dirty NTFS volume will cause GParted to abort.

When to use each tool

Use Windows Disk Management when you need a safe, supported way to shrink the partition without third-party tools. Use GParted from a live USB when Windows refuses to shrink past immovable files and you have disabled hibernation and page files. Use diskpart when you prefer command-line precision or are automating the disk layout. Stay on the Windows-native tools whenever possible to avoid filesystem corruption risks.

Use Windows-native tools whenever possible. Third-party resizers carry a higher risk of data loss.

Where to go next