Dear MizFrog
Thank you for posting in the Microsoft community.
**I. Preparation**
Before starting the installation, make sure that your computer meets the following conditions:
- a Linux distribution, such as Ubuntu, Fedora, or openSUSE, is already installed on the computer.
- you have a free partition on the computer for your Windows system.
- You have created a Windows installation file (ISO image file) that can be downloaded from the official Microsoft website.
- you have backed up your important data to an external disk, just in case.
**II. Install Windows to Linux Partition**
- Use a command line tool to enter the root directory of your Linux distribution, e.g.
cd / command on Ubuntu.
- Create a new partition for installing Windows. Enter the following command at the command line:
sudo fdisk /dev/sda
- Press
n to create a new partition, p to select “primary”, 1 to select the first partition, and + to increase the partition size.
- Press
w to save your changes, and then press q to exit the fdisk utility.
- Use the
parted tool to format the new partition. Enter the following command at the command line:
sudo parted /dev/sda
- Select the partition you just created and type
mklabel gpt. This will format the partition using the GUID partition table (GPT).
- Type
**mkfs.msdos -l “Windows” -b 446 -n “Windows” /dev/sda1**. This creates an MSDOS (MBR) format for the partition and labels it as “Windows.”
- Use the
ls command to view the partition. Enter the following command at the command line:
ls /dev/sda
- Use the
fsdisk command to view the partitions.
- Use the
fdisk command to confirm that the partition is formatted. Enter the following command at the command line:
sudo fdisk /dev/sda
- Press
p to view the partition information and you should see a partition named “Windows”.
**Installing Windows
- Use the command line utility to mount the Windows installation files. Enter the following command at the command line:
sudo mount /dev/sda1 /mnt/windows
- Enter the directory where the Windows installation files are located. Enter the following command at the command line:
cd /mnt/windows
- Extract the Windows installation files. Enter the following command at the command line:
sudo tar -xvf winnt.x86_64.tar
- Create a temporary directory for the Windows installation. Enter the following command at the command line:
sudo mkdir /tmp/install
- Copy the Windows installation program to the temporary directory. Enter the following command at the command line:
sudo cp winnt.x86_64 /tmp/install
- Change the permissions of the temporary directory so that the Windows installer can access it. Enter the following command at the command line:
sudo chmod +x /tmp/install/winnt.x86_64
- Run the Windows installation program. Enter the following command in the command line:
. /winnt.x86_64
- Follow the on-screen prompts to complete the Windows installation process.
**IV. Completing the Installation**
After the installation is complete, you will need to reboot your computer on the Linux distribution. You can then see two operating system menus on your computer and you can choose to boot Windows on the Linux distribution.
Please note that this method may not work for all Linux distributions and computers. Before trying this method, be sure to consult the documentation for the Linux distribution you are using to ensure that it supports this operation. Also, you may encounter some problems during the installation process, and it is recommended that you back up your data before installing so that you can easily restore it if you encounter problems.
I hope the above information will help you.
Looking forward to your further reply.
Best Wish
Shawn.Z-MSFT | Microsoft Community Support Specialist