Reassign Disk Space from Windows to Linux

do
Published

April 8, 2024

df command after mounting the new partition

I have been using a dual system of Windows and Ubuntu, and recently running out of storage space on Ubuntu. This caused various issues including occasional failure to recover from sleep.

Surely, there were already some answers addressing this matter.

These were helpful, but an error about swapfile.sys occurred when I tried Shrink Volume in Windows’ Disk Management. It turned out that swapfile.sys (and pagefile.sys) can be disabled and deleted, according to these articles. Not using Windows very often nowadays, I am happy to remove them.

If I remembered correctly, I followed these steps to reassign some disk space from Windows to Ubuntu:

  1. disable and delete pagefile.sys (see steps here);
  2. now delete swapfile.sys (refer to here);
  3. follow Option 2 in this answer;
  4. mount the new partition on Ubuntu.