Split a partition with GParted
You cannot shrink a mounted partition. Boot from a live CD/USB and from there run gparted. This way you can shrink the partition. After the install, you must use this live media again to repair grub.
Edit:
- Back up your files.
- Create the live media if you don't own it already.
- Boot from it, and run
gparted
. - Select the partition, and click resize, which will bring you to a new window.
- Grab the bar at the right end with the mouse, and shrink the bar.
- Now execute the task, it will take time, because first it will do some tests and later it will move some data.
- If a message pops up that you might ruin the boot process, you should not execute the task. (If this happens, then you need to repair grub.)
- I suggest, that when it is over, you reboot.
- The new partition can be created from the normal ubuntu.
- After you installed windows, do come to this site, and you will find how to repair grub, which was overwritten by windows. Here is the solution for this: How can I repair grub? (How to get Ubuntu back after installing Windows?)