How to Install Windows After Ubuntu With GParted
Installing Windows after Ubuntu is trickier than installing Ubuntu after Windows, because Windows setup overwrites the boot loader. With GParted and a live USB, you can resize partitions safely and restore dual-boot afterward. Follow these steps carefully and back up important data first.
What you need
- Ubuntu live USB or GParted live media
- Windows installation DVD or USB
- At least 30–40 GB unallocated or free space for Windows
Shrink Ubuntu with GParted
- Boot from the live session and open GParted.
- Select your disk, right-click the Ubuntu partition (often ext4), and choose Resize/Move.
- Shrink from the right side to leave unallocated space for Windows. Apply operations and wait for completion.
Install Windows
Boot the Windows installer, choose Custom install, and select the unallocated space. Windows will create its own System Reserved and C: partitions. Finish setup — GRUB will no longer appear until you repair it.
Restore GRUB
Boot the Ubuntu live USB again, open a terminal, and run:
sudo mount /dev/sdaX /mnt
sudo grub-install --boot-directory=/mnt/boot /dev/sda
sudo update-grub
Replace sdaX with your Ubuntu root partition. Reboot — you should see GRUB with both Ubuntu and Windows entries.
Always defragment (on older Windows disks) and verify backups before resizing. GParted makes the partition work straightforward; planning boot repair saves frustration after Windows installs.
