Forum Discussion

LandonParker's avatar
LandonParker
Copper Contributor
Dec 06, 2024

How do I create an Ubuntu bootable USB drive on Windows 11?

Recently, I tried to make an Ubuntu bootable USB drive on Windows 11 to install Ubuntu, but I encountered some problems. Since I am more accustomed to using the command line, I decided to use the command line to make a bootable disk, but the result was a bit stuck, so I came to ask for help.

I downloaded the ISO file of Ubuntu, which is about 2-3GB, and then prepared an 8GB USB drive. Through the command line tool, I used the diskpart command to format the USB drive, and then used the dd command to write the ISO file to the USB drive. However, every time I finished, it always prompted that the system file was not found or the USB drive could not be recognized when it was started.

Can friends who have done similar operations share the steps to use the command line to make an Ubuntu bootable USB drive on Windows 11? I may have missed some key steps or there are other things I need to pay attention to. Thank you very much for your help!

 

  • Nguyenais's avatar
    Nguyenais
    Iron Contributor

    You can the mkusb command tool. mkusb is natively available and widely used on Linux distributions and macOS. By default, Windows 11 does not include the dd command. However, you can still use dd on a Windows PC through Windows Subsystem for Linux (WSL). It allows you to run a Linux environment directly on Windows without the overhead of a virtual machine.

    Step 1: Open PowerShell as an administrator and run:

    wsl --install

    Step 2: After installation, open the Linux distribution from the Start menu.

    Step 3: Once in the Linux terminal, you can use dd commands similarly to how you would on a native Linux system.

    Step 4: Now, you can use the dd command to create ubuntu bootable USB on Windows 11/10/8/7 PC.

    sudo mkusb ~/Downloads/ubuntu-XX.XX-desktop-amd64.iso /dev/sdb bs=4M status=progress

    Explanation of Parameters:

    • bs=4M: Sets the block size to speed up the process.
    • status=progress: Shows progress during the operation.
  • RyderAspen's avatar
    RyderAspen
    Copper Contributor

    Hey, I recently did something similar, trying to make an Ubuntu bootable USB drive using the command line on Windows 11, and ran into some issues. I think the steps you mentioned are generally correct, but there may be some details that I didn't understand. Let me share the steps I took and some things to note when doing this operation, I hope it can help you!

    First format the USB drive: I used the diskpart command to clear all the contents of the USB drive. You can do this:

    diskpart
    list disk
    select disk X   # X is your driver.
    clean
    create partition primary
    format fs=ntfs quick
    assign
    exit

    The USB drive is now clean and an NTFS partition has been created. Be sure to check the partition format, as Ubuntu can boot using NTFS.

    Write the ISO to the USB drive: I used the dd command for this step, but I recommend using a Windows version of dd, such as Win32 Disk Imager or Rufus, as dd can sometimes be unstable on Windows. However, if you insist on using the command line, you can try the following method:

    Open a command prompt (with administrator privileges) and enter:

    dd if=C:\path\to\ubuntu.iso of=\\.\X: bs=4M

    If is followed by the path to the Ubuntu ISO file, and of is the path to your USB drive (e.g. \\.\D:). Make sure bs=4M, which will increase the writing speed.

    Confirm that the USB drive is bootable: If the USB drive is formatted correctly and the ISO file is written successfully, the next step is to check if the USB drive is bootable. You can restart your computer, enter the BIOS setup, set the USB drive as the first boot item, and see if Ubuntu can be successfully booted.

    If you still get a message saying that system files are missing after following these steps, it may be because the USB drive partition is not formatted correctly, or the dd command did not write all the necessary boot files correctly. You can also try using the Rufus tool, which has a nice GUI that can avoid the tediousness of the command line and supports UEFI boot mode.

    I hope this information is helpful to you!

     

  • F-Markup's avatar
    F-Markup
    Copper Contributor

    Windows 11 has WLS, which is an easy tool to install Ubuntu in Windows 11. After that, you can create Ubuntu Linux bootable USB in Windows 11 with the dd command.

    First, ensure that WSL is installed and configured on your Windows 11 system with a distribution like Ubuntu. Install necessary tools like dd and lsblk by updating your WSL environment. Also, download the Ubuntu ISO file onto your Windows machine.

    To proceed, insert your USB drive and determine its identifier using lsblk in WSL. Be cautious to correctly identify the USB drive to avoid overwriting the wrong device. Once identified, unmount the USB drive. Then, use the dd command to create the bootable USB:

    sudo dd if=/path/to/ubuntu.iso of=/dev/sdX bs=4M status=progress

    Finally, after the process completes, safely eject the USB drive using sudo eject /dev/sdX. Your USB drive is now ready to boot Ubuntu. Remember to backup any data on the USB drive beforehand, as the dd command will erase all existing data. This method is versatile but requires attention to detail for safe and accurate execution.

  • EvergladeEagle's avatar
    EvergladeEagle
    Copper Contributor

    You can use the Command Prompt and diskpart to create Ubuntu bootable USB drive on Windows 11. 

    1. Open Command Prompt as an administrator.
    2. Run diskpart to open the Disk Partition tool.
    3. Type list disk to identify your USB drive.
    4. Select your USB drive using select disk X (replace X with your USB drive number).
    5. Clean the USB drive with clean.
    6. Create a new partition with create partition primary, then select it with select partition 1.
    7. Format the partition with format fs=fat32 quick.
    8. Assign a letter using assign.
    9. Mount the Ubuntu ISO by right-clicking it and choosing Mount.
    10. Copy all files from the mounted ISO to the USB drive manually.
  • Valin's avatar
    Valin
    Copper Contributor

    Making sure you're using a good USB stick! I once grabbed a random old USB that had been sitting in my drawer, and it turned out to be corrupted. All sorts of errors popped up while trying to create an Ubuntu bootable USB drive. Stick with a USB that's at least 4GB and is in good shape. Also, remember that everything on that USB will be wiped, so make sure you don't need any of the files on it!

Resources