Create a Windows 11 Bootable USB Using Linux
If you’re looking to install Windows 11 on your PC or Mac using a Linux operating system, you’ve come to the right place. This guide will walk you through the process of creating a bootable USB drive with the Windows 11 ISO file, using tools available on Linux. By the end of this tutorial, you will have a fully functional bootable USB ready for installation. Make sure you have a USB drive with at least 8 GB of space, and follow these steps carefully to avoid any issues during the installation process.
Before we begin, ensure you have the following prepared:
- Windows 11 ISO file, which you can download from the official Microsoft website: Download Windows 11 ISO.
- Homebrew, a package manager for Linux that helps install necessary software.
- wimlib, a library for working with WIM files.
- A USB drive with a minimum capacity of 8 GB.
Step 1: Download the Windows 11 ISO
First, visit the official Microsoft website and download the Windows 11 ISO file. Ensure that you select the correct version that suits your needs. This file will be used to create the bootable USB.
Step 2: Install Homebrew and wimlib
Before installing Homebrew and wimlib, update your system to ensure you have the latest packages. Open your terminal and run the following commands:
sudo apt update
sudo apt upgrade
Once your system is updated, install Homebrew using the command:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
If you encounter any errors, follow the prompts to resolve them. After Homebrew is installed, execute this command to install wimlib:
brew install wimlib
Once both installations are complete, you can close the terminal.
Step 3: Prepare the USB Drive
Insert your USB drive into the computer. You will need to format it to ensure it’s ready for use. Open your terminal and type the following commands to list the drives:
lsblk
Identify your USB drive (e.g., /dev/sdb) and proceed with formatting it using the following command, replacing ‘sdb’ with your USB drive identifier:
sudo mkfs.vfat /dev/sdb
This command formats the USB drive to FAT32, which is required for compatibility with Windows installations.
Step 4: Mount the Windows 11 ISO
Next, you need to mount the Windows 11 ISO file to access its contents. Create a directory to mount the ISO:
mkdir ~/iso
Then mount the ISO using the following command, adjusting the path to your ISO file:
sudo mount -o loop path_to_your_windows11.iso ~/iso
Replace path_to_your_windows11.iso
with the actual path to the downloaded ISO file.
Step 5: Copy Files to the USB Drive
Begin copying the files from the mounted ISO to your USB drive. Open the file manager or use the command line:
cp -r ~/iso/* /media/your_username/USB_DRIVE_NAME/
Be sure to exclude the sources folder during this process.
Step 6: Prepare the Sources Folder
After copying the files, create a new sources folder on the USB drive:
mkdir /media/your_username/USB_DRIVE_NAME/sources
Then copy all files from the sources folder of the mounted ISO to the new sources folder on your USB, excluding the install.wim file:
cp -r ~/iso/sources/* /media/your_username/USB_DRIVE_NAME/sources/
Step 7: Split the install.wim File
The install.wim file needs to be split because it exceeds the 4 GB file size limit of FAT32. To do this, use the following command in the terminal:
wimlib-imagex split ~/iso/sources/install.wim /media/your_username/USB_DRIVE_NAME/sources/ 3800
This command will split the install.wim file into smaller parts that can be copied to the USB drive.
Step 8: Finalize the USB Drive
Once the splitting process is complete, you can safely unmount the ISO and eject the USB drive:
sudo umount ~/iso
The bootable USB drive is now ready to be used for installing Windows 11 on any compatible PC or Mac.
Extra Tips & Common Issues
Make sure to use the correct USB drive identifier to avoid data loss. Always double-check the commands you enter, especially when using commands like sudo
that can modify system files or drives. If you encounter issues with partitions during installation, check your drive format and ensure it is set up correctly.
Frequently Asked Questions
Can I use a USB drive with less than 8 GB?
No, Windows 11 requires at least 8 GB of space for the installation files. Using a larger USB drive is recommended for better performance.
What should I do if the USB drive is not recognized during installation?
Make sure the USB drive is properly formatted as FAT32 and that all files are copied correctly. You may also want to try a different USB port or cable.
Is this process the same for other Windows versions?
While the general steps are similar, there may be differences in the specific files and sizes for older Windows versions. Always refer to the respective documentation for those versions.