How to install Windows after I’ve installed Ubuntu?
Tags: ubuntu, bootsystem, dual, installationwindows
Published: 2021-11-25 10:05:32

---
title: How to install Windows after I’ve installed Ubuntu?
published: true
date: 2021-11-22 11:53:10 UTC
tags: Ubuntu,bootsystem,dual,installationwindows
canonical_url: https://stackallflow.com/ubuntu/how-to-install-windows-after-ive-installed-ubuntu/
---

<header>
<p><span style="font-size: 1.2em; color: initial;">dual-boot</span><span style="font-size: 1.2em; color: initial;">system-installation</span><span style="font-size: 1.2em; color: initial;">windows</span></p>
</header>

I have Ubuntu on my laptop. Now I want install Windows 7 in a dual-boot. How can I do this?

I can’t lose my Ubuntu files, and I’m afraid that I might break [GRUB](http://en.wikipedia.org/wiki/GNU_GRUB).

Go [here](https://askubuntu.com/a/1120062/344926) for **UEFI only!**

#### Accepted Answer

Here’s the general outline:

1. Make space for Windows
2. Install Windows
3. Mount the `/boot` directory or partition
4. Install the bootloader ([GRUB](http://en.wikipedia.org/wiki/GNU_GRUB))

# Step Zero – Backup your important data before doing anything

# Step One – Make space for Windows

Open up [GParted](http://en.wikipedia.org/wiki/GParted), and make sure that you have at least 20 GB available for Windows 7, either as a partition you can remove, or as unpartitioned space. If it’s a partition, remove it from GRUB to make sure it doesn’t break your Ubuntu install — GParted will complain if anything bad is about to happen.

_Make note of current `/boot` device. If that doesn’t show up there, make note of the `/` device. The device name is something like `sda5`_.

# Step Two – Install Windows

Install Windows 7 into the space you just made

# Step Three – Mount `/boot`

> <sub>Note: Instead of mounting the boot directory or partition from the installation in the live media environment you can specify the path with the <code>--boot-directory</code> parameter for grub-install, more information on the manpage.</sub>

Load up from your [Ubuntu live CD](https://help.ubuntu.com/community/LiveCD), and then run these commands.

- If you DO NOT have a separate `/boot` partition:
```
sudo mount /dev/DEVICENAME_FROM_STEP_ONE /mnt
sudo rm -rf /boot # Careful here, make sure YOU ARE USING THE LIVE CD. I tried it, it works.
sudo ln -s /mnt/boot /boot

```
- If you have a SEPARATE `/boot` partition:
```
sudo mount /dev/DEVICENAME_FROM_STEP_ONE /boot

```

# Step Four – Install the bootloader

> <sub>Note: These instructions were initially written for Windows 7 and BIOS booting computers. If you have UEFI and Windows 8 and above you probably need to replace <code>grub-pc</code> with <code>grub-efi-amd64</code> in <code>sudo apt-get install grub-pc</code>.</sub>

Then continue with those commands:

```
sudo apt-get update
sudo apt-get install grub-pc
sudo grub-install /dev/sda # NOTE THAT THERE IS NO DIGIT
sudo umount /boot

```

And restart. It should work fine and boot both systems.

The post [How to install Windows after I’ve installed Ubuntu?](https://stackallflow.com/ubuntu/how-to-install-windows-after-ive-installed-ubuntu/) appeared first on [Stack All Flow](https://stackallflow.com).