Your resource for web content, online publishing
and the distribution of digital products.
S M T W T F S
 
 
 
1
 
2
 
3
 
4
 
5
 
6
 
7
 
8
 
9
 
10
 
11
 
12
 
13
 
14
 
15
 
16
 
17
 
18
 
19
 
20
 
21
 
22
 
23
 
24
 
25
 
26
 
27
 
28
 
29
 
30
 
31
 
 

How to Install Windows on Disk With Linux

DATE POSTED:January 8, 2025
Preface

Setting up a dual-boot system on a PC typically requires installing Windows first and then Linux. This sequence is recommended because Windows tends to overwrite the bootloader (like GRUB) during its installation, which can complicate a pre-existing Linux setup. However, I successfully reversed the process—installing Windows after Linux—by employing a series of workarounds. In this post, I’ll document the method, explaining the technical challenges and how I addressed them so others can replicate them.

\ To summarize the tutorial: You will Install Windows on top of the old Linux, Install the new linux, and clone data from the old linux to a new one.

Step 1 - Existing Linux

I assume you have installed Linux; otherwise, do not bother and install it in the usual order.

Use the following commands to identify your disk's EFI, swap, and root partitions, and write them somewhere.

lsblk -l sudo blkid Step 2 - Install Windows
  1. Prepare Windows Installer onto USB; use Rufus if you have other Windows; otherwise, use Ventoy or WoeUSBng.

    Do not use BalenaEtcher; it is not designed to flash Windows on USB.

  2. Boot to Windows Installer

  3. Delete EFI and swap all other partitions, except for one partition with the root file system of the existing Linux.

  4. Resize existing OS and create new space for Windows

  5. Create a new partition for “Step 3” more than 20GB of space. At least the size of the original OS used space.

  6. Install Windows

    \

Now, you cannot boot into the original Linux, but you should be able to boot into Windows.

Step 3 - New Linux 2

We will install a second linux to have a functional bootloader and restore data from the original OS.

\

  1. Flash USB with Linux image, use the same distro as the original OS.
  2. Install it on the partition from “Step 2”.
  3. Ensure the Linux bootloader is above the Windows boot manager in the BIOS/UEFI boot order.
  4. Now, the following commands will clone data from old Linux and move it to the new one.
sudo su # if original disk encrypted, decrypt it. cryptsetup luksOpen /dev/ cryptdisk mount /dev/mapper/cryptdisk /mnt # If disk is not encrypted, just mount it directly for i in /opt /usr /home /.config /.local /bin /root ; do rsync -avz /mnt$i $i ;done
  1. Reboot
Step 4 - Cleanup
  1. Boot into live USB linux

  2. Delete the original OS partition.

  3. Resize the Linux 2 partition, so it has more space.

  4. Boot into new linux

  5. Clean up with the following steps if any leftover stuff from the original OS is on the EFI partition.

  6. Regenerate initramfs file on Manjaro, use mkinitcpio

  7. Use update-grub command to regenerate GRUB config.

  8. Reboot

Conclusion

You have successfully installed Windows on the existing Linux and restored the original data.

\ \