I was running out of space on one drive so I decided to move my Cygwin installation to another drive.
It turned out not to be too difficult thanks to this article Hints for Setting up Cygwin. This is how I did it though there might be a simpler way.
- In a bash shell save the mount points as a batch script.
$ mount -m > /c/cygwin-mount.bat
- Close the bash shell.
- Move the cygwin folder from one drive to the other. In my case that was from C:\cygwin to D:\cygwin.
- Update all the short cuts for Cygwin in the Start Menu to use the new drive.
- Update cygwin.bat, which is in the top level of your Cygwin installation, to use the new drive.
- Update your Windows environment variable to use the new Cygwin bin path, e.g. D:\cygwin\bin.
- Open a DOS cmd prompt. Run umount to unmount the old Cygwin mounts.
- Next run the mount points script.
- Open a Cygwin bash shell to make sure everything is working correctly.