1 - Live CD
First, you'll need to boot from a Ubuntu Live CD.
2 - Resize the Windows partition
Using the Gparted Partition Editor, you can resize your Windows partition so that it uses the whole disk again, if you wish to do so.
To resize a partition in Gparted, select the disk that contains the partition in the dropdown list in the top-right corner of the Gparted main window.
Click on the partition's graphical representation, then go in the
Partition menu and click on
You can now resize the Windows partition by dragging its graphical representation to your desired size. Alternatively, you can also type in the exact size you want.
- The yellow portion represents used space on the partition.
When you're satisfied, click on the
And now, to apply the resize action, go in the
Edit menu and select
Apply All Operations.
3 - Restore the Windows bootloader
To restore the Windows bootloader, follow these steps.
Open a terminal from the Live CD, and run the following commands:
sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo apt-get update
sudo apt-get install -y boot-repair
After a few seconds, Boot Repair's main window will open.
Main options tab select
MBR options tab, select the drive and the partition that contains your Windows installation. By default, all the options should be correct, but double-check anyways.
Finally, click on
Reboot to test everything out. :)