Guide on Creating a Windows USB Installer with Linux

Guide on Creating a Windows USB Installer with Linux

Installing Windows from Linux: A Step-by-Step Guide

In 2015, I transitioned to Linux, abandoning Windows due to the compatibility of Linux with my older hardware and its perceived performance gains, especially since I am not a PC gamer. Recently, however, a unique requirement arose: a specific software tool that only works on Windows.

To run this software, I had to spend several hours preparing my laptop. This involved backing up files, resizing my Linux partition, and installing Windows 11 on a dedicated partition. One of the more challenging tasks was creating a Windows installation USB, a noticeably different process compared to installing Linux distributions.

The Challenge of Writing Windows to USB

Unlike Linux, where tools like GNOME Disks can restore an ISO image relatively easily, creating a Windows USB installer requires a more specialized approach. In this guide, I will detail the steps to help you successfully create Windows installation media from your Linux environment.

These instructions specifically target Ubuntu-based distributions, as they are the most commonly used among Linux users. If you’re using a different distribution, such as Fedora, you may need to adjust installation commands accordingly. For this guide, I will focus on WoeUSB, a terminal tool that I have personally tested, which is effective for this purpose. Although there is a graphical version, WoeUSB-ng, I cannot guarantee its functionality since I haven’t tested it.

Installing WoeUSB

To get started, we first need to install WoeUSB via the command line. Here’s how to do it:

  1. Add the WoeUSB repository by executing the following command:
  2. sudo add-apt-repository ppa:tomtomtom/woeusb

  3. Update your package list by running:
  4. sudo apt update

  5. Finally, install WoeUSB with this command:
  6. sudo apt install woeusb

If all goes well, WoeUSB should now be installed on your system. However, we need to prepare the USB installation media before plugging it in.

Identifying the USB Device

To identify your USB device, begin by running the following command:

lsblk

This command displays a list of storage devices and their partitions. Note the storage mediums available before connecting your USB drive; look for identifiers labeled as ‘disk’ or ‘part’.After plugging in your USB drive, execute the command again to see which device has been added; this will be your Windows installation USB.

From the output of lsblk, note the identifier for your USB device, which typically appears as something like sdb.

Important Warning:

Proceeding with the next steps can erase all data on your USB device and could potentially lead to data loss on your hard drive if not followed precisely.

Writing Windows to the USB

Assuming you’ve already downloaded the Windows ISO file, you can now write it to your USB device using the following command. For convenience, you can drag and drop the Windows ISO file into your terminal window; this will automatically fill in the file path, minimizing the chances of errors. Don’t forget to replace sdX with the actual identifier of your USB device.

sudo woeusb --target-filesystem NTFS --device '/path/to/file.iso' /dev/sdX

The writing process will take a few minutes, depending on the performance of your hardware. Once completed, you can reboot your computer and begin the Windows installation from your newly created USB stick.

Additional Considerations

This guide does not cover the complexities of installing Windows alongside an existing Linux installation. If you’re interested in partition management, I recommend using Linux Mint Xfce on another USB stick to resize your hard drive using GParted. Prioritize data backup before making any changes to your disk layout. Should you encounter boot issues after installing Windows, you can revert to Linux Mint Xfce and utilize the built-in boot repair tool that allows you to select either Linux or Windows at startup.

Source & Images

Leave a Reply

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