RackNerd Billboard Banner

How to Install Windows After Ubuntu Linux in Dual Boot

Most dual boot setups start with Windows, then add Ubuntu. But what if you did it the other way around? Installing Windows after Ubuntu flips the usual script—and it can break your bootloader if you’re not careful.

Here’s a step-by-step guide to install Windows after Ubuntu, and still keep access to both operating systems.

Before You Start

What You’ll Need:

  • A USB drive (8GB or more)
  • Windows installation media (use Microsoft’s Media Creation Tool)
  • A backup of your data
  • An active internet connection (optional, but helpful)

⚠️ Warning: Installing Windows after Ubuntu will overwrite the GRUB bootloader. You’ll need to restore it after installing Windows to get back into Ubuntu.


Step 1: Make Space for Windows

  1. Boot into Ubuntu.
  2. Open GParted or Disks utility.
  3. Shrink an existing partition to create unallocated space for Windows (at least 50GB recommended).
  4. Leave the space unformatted—Windows will format it during installation.

Step 2: Create a Bootable Windows USB

  1. Download the Windows ISO from Microsoft’s official website.
  2. Use Rufus (on Windows) or WoeUSB (on Ubuntu) to create a bootable USB.
  3. Plug it in and reboot your system.

Step 3: Install Windows

  1. Boot from the USB. You may need to press F12, F10, or Esc at startup to open the boot menu.
  2. Follow the Windows installer steps.
  3. When asked where to install Windows, choose the unallocated space you created earlier.
  4. Format the partition, then install Windows.
  5. Once done, Windows will boot by default, and Ubuntu will no longer show up.

Don’t panic—that’s expected.


Step 4: Restore GRUB Bootloader

  1. Boot from an Ubuntu Live USB.
  2. Choose Try Ubuntu (don’t install).
  3. Open a terminal and run these commands:
sudo mount /dev/sdXY /mnt        # Replace sdXY with your Ubuntu partition
sudo mount --bind /dev /mnt/dev
sudo mount --bind /proc /mnt/proc
sudo mount --bind /sys /mnt/sys
sudo chroot /mnt
grub-install /dev/sdX            # Replace sdX (no number) with your disk
update-grub
exit
sudo reboot

Example: If your Ubuntu partition is /dev/sda5, mount it as sdXY = sda5, and use sda for the grub install target.


Step 5: Dual Boot Is Back

After rebooting, the GRUB menu should appear, letting you choose between Ubuntu and Windows.


Final Tips

  • You can customize GRUB with tools like Grub Customizer to change boot order or timeout.
  • If GRUB doesn’t show up, check your BIOS settings for Secure Boot and UEFI/Legacy Boot options.

Wrapping Up

Installing Windows after Ubuntu takes a few extra steps, but it’s totally doable. The key is understanding how Windows takes over the bootloader—and how to reclaim it with GRUB.

Got stuck? Drop your issue in the comments and I’ll try to help out.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

RackNerd Billboard Banner
Copy link