Create a bootable USB for Windows 10 on Raspberry Pi using Raspbian.
Create a bootable USB for Windows 10 on Raspberry Pi using Raspbian.
I initially planned to use woeusb but encountered an issue. The command for installing grub wasn't available. I’m using a Raspberry Pi 4 now, which will serve as a bootable USB drive.
I haven't tried this on a Raspberry Pi before, but the ARM version of Rufus from their site should work: https://rufus.ie/downloads/. Choose the ARM64 option and attempt it. Next, download a Windows 10 ISO and pick it in Rufus. Be sure to choose all relevant settings for your bootable device (GPT/MBR). Rufus has been my go-to tool for creating bootable drives—it's one of the top choices.
I use balena.io/etcher but I'm curious about running it on a Pi. You might want to try gnome-disks if it's available for the Pi. Pick your drive and choose "Restore Image" via the hamburger menu.
WoeUSB relies on Grub. https://github.com/WoeUSB/WoeUSB-ng#inst...pendencies
Sure, Pi doesn't rely on grub, but you can still install it (it's the software, not the bootloader). It's compact and compiles fast. If you have an iso, you can use dd to transfer it.
I'm not sure how to proceed because I'm unfamiliar with Linux, particularly the Pi, and I recently purchased it just for browsing. Balena won't work with Windows ISO files.
In my last update there were no responses only more questions. I don’t have another way to create the drive and the Woe USB isn’t working because the Pi lacks GRUB. I tried Ventoy which said it needed an SDB instead of SD1 and Balena doesn’t support Windows. I’m currently paused.
ATA Spoiler Warning: The kernel is still using the old partition table. The new table will be used at the next reboot or after you run partprobe(8) or kpartx(8) The operation has completed successfully. and verification : sgdisk -p /dev/sdg Spoiler Disk /dev/sdg: 60063744 sectors, 28.6 GiB Model: SanDisk 3.2Gen1 Sector size (logical/physical): 512/512 bytes Disk identifier (GUID): 1F626CB9-595A-4668-8D2B-F856E48457E9 Partition table holds up to 128 entries Main partition table begins at sector 2 and ends at sector 33 First usable sector is 34, last usable sector is 60063710 Partitions will be aligned on 2048-sector boundaries Total free space is 2014 sectors (1007.0 KiB) Number Start (sector) End (sector) Size Code Name 1 2048 2099199 1024.0 MiB EF00 ESP 2 2099200 60063710 27.6 GiB 0700 DATA now lets first remove the usb from the pc wait a second and plugg it back in: lsblock should now list our two partitions : Spoiler ... sdg 8:96 1 28,6G 0 disk ├─sdg1 8:97 1 1G 0 part └─sdg2 8:98 1 27,6G 0 part ... next , formatting the pattitions and creating volumes on them : (tip we can use the names we assigned to them so we dont make accidental mistakes) (warning: DONT use the part labels if there are other volumes with the same name present on the system. => jsut use /dev/sdg1 and /dev/sdg2 in that case. this will create a fat32 volume on our first partition: mkfs.vfat -F 32 -n ESP /dev/disk/by-partlabel/ESP this will create a NTFS3 volume on our second partition: mkfs.ntfs -Q -L DATA /dev/disk/by-partlabel/DATA now we wil create some folders for mountpoints and other needed structures : mkdir -p /mnt/mkbootusb/{USB/{ESP,DATA},ISO} this wil create the following dir structure : /mnt/mkbootusb ├── ISO └── USB ├── DATA └── ESP now mount the windows installation ISO : if you dont have one yet you can download one of your choice here : (it generates a tool for the version you want + any updates, then you dowload that tool , and inthere there are binaries for Windows Linux And OSX , that automaticly downlaod and create the ISO: UUPDUMP My iso is located at : /mnt/volumes/st2000-2tb/Installers_OS/IMG/WinNT_Based/MSWin_11/ And has the filename: WIN11_PROFESSIONAL_X64_EN-US.ISO to mount the iso run: mount -o loop /mnt/volumes/st2000-2tb/Installers_OS/IMG/WinNT_Based/MSWin_11/WIN11_PROFESSIONAL_X64_EN-US.ISO /mnt/mkbootusb/ISO Spoiler mount: /mnt/mkbootusb/ISO: WARNING: source write-protected, mounted read-only. now we mount our two newly created volumes : mount -t vfat -o sync /dev/disk/by-label/ESP /mnt/mkbootusb/USB/ESP mount -t ntfs3 -o sync /dev/disk/by-label/DATA /mnt/mkbootusb/USB/DATA Copy all the files and folders but the sources folder to the ESP of the usb: cd /mnt/mkbootusb/ISO ls -1A | awk '$1 != "sources" {print $0}'|xargs -n1 cp -avf -t /mnt/mkbootusb/USB/ESP/ Create the sources folder empty and by hand on the ESP partition: mkdir /mnt/mkbootusb/USB/ESP/sources Copy boot.wim from the sources folder of the iso into the sources folder on the USB ESP cp -vf ./sources/boot.wim /mnt/mkbootusb/USB/ESP/sources/ copy everything form Windows 11 ISO again this time including everything to the DATA partition: ls -1A | xargs -n1 cp -avf /mnt/mkbootusb/USB/DATA/ NOTE!!!! you are copieng ~7GB to a usb stick , this might take a while , leave the stick in the machine untill it is finished, then unmount both volumes Done. Usb bootable on (U)EFI systems , and with or without secure boot enabled.
EDIT:: Why this way? wel in order to install windows in uefi mode on a gpt disk the system needs to be booted in uefimode aswel, however eufi can only read fat32 partitions. so why not just that? the winndows install.wim file is larger then 4GB and 4GB is the largest a file can be on a Fat32 file system. sow that is why we create a fat32 partition with enoug pieces on it ot get teh system booted in uefi mode ,but then once the setup has control , it can load its own ntfs drivers and continue from the second partition on our usb. hello there i saw the topic title and realized i actually wrote a step by step guide to make a windows (any version ,uefi) in linux : you can find that guide on this forum here: GUIDE @ MYACTIVITY the howto prepare your usb is maybe not as detailed as it could be so ill make an attempt here: what you need: an usbstick ~6GB for win 11 some versions of win 10 may also fit on a 4GB usbstick. and Gpt-Fdisk -> mostly found under the name gdisk, and has 3 executables : -cgdisk : gdisk with a dialog userinterface (similar to ncurses) -gdisk : gdisks menu based cli -sgdisk : gdisks scripting interface. i will be using sgdisk for this guide since this allows me to write everything as commands here , (avoiding having to guide someone trough menus and such) first find the device name of your usbstick: lsblk Spoiler ... sdg 8:96 1 28,6G 0 disk ├─sdg1 8:97 1 1G 0 part └─sdg2 8:98 1 27,6G 0 part /run/media/hoefkens/DATA ... or right after you insert the usbstick the devicename will also be listed at the bottom of : sudo dmesg My usbstick is named sdg and is located at /dev/sdg as you can see my system automounted one of the partions on the stick, if that is the case unmount it with: sudo umount /dev/sdg2 next lets wipe any partition schem on the usb , to make things a little more straight forward i will be switchng to a shell running as the root user , you can also use sudo before each of the commands or you can like i do : [ hoefkens@ms7976 ~] $ su Password : [ ms7976 hoefkens ]# after this the command to wipe the partition information of the usb is: sgdisk --clear /dev/sdg Spoiler Warning: The kernel is still using the old partition table. The new table will be used at the next reboot or after you run partprobe(8) or kpartx(8) The operation has completed successfully. the warning can be safely ignorerd for now, and there is no need to reboot either. the --clear command also creates a new empty gpt structure on the usb . you can verify with: gdisk /dev/sdg Spoiler GPT fdisk (gdisk) version 1.0.9 Partition table scan: MBR: protective BSD: not present APM: not present GPT: present Found valid GPT with protective MBR; using GPT. Command (? for help): q enter 'q' to exit the program again. so now there is apparently a protective MBR and a GPT partition table on the usb. the protective MBR just means that the first 512bytes are left allone so programs that mess arround with mbr's , dont ruin the actual GPT partition table. so this llooks fine , and next we need 2 partitions minimally a ESP and a DATA partition. you can create these with: sgdisk /dev/sdg --new 1::+1GiB --typecode=1:ef00 --change-name=1:ESP Spoiler Warning: The kernel is still using the old partition table. The new table will be used at the next reboot or after you run partprobe(8) or kpartx(8) The operation has completed successfully. what we dit here : created a new partition with size 1GiB, and assigned it the ef00 partition type the ef00 is the code for the ESP-partition GUID. you can list all availeble types with (if your curious-> its a pretty long list): sgdisk --list-types you can verify that you created the partition with : sgdisk -p /dev/sdg Spoiler Disk /dev/sdg: 60063744 sectors, 28.6 GiB Model: SanDisk 3.2Gen1 Sector size (logical/physical): 512/512 bytes Disk identifier (GUID): 1F626CB9-595A-4668-8D2B-F856E48457E9 Partition table holds up to 128 entries Main partition table begins at sector 2 and ends at sector 33 First usable sector is 34, last usable sector is 60063710 Partitions will be aligned on 2048-sector boundaries Total free space is 57966525 sectors (27.6 GiB) Number Start (sector) End (sector) Size Code Name 1 2048 2099199 1024.0 MiB EF00 ESP so i succeeded, now the second one: a little different the --largest-new wil use all remaing space on the usb --the partition number is 2 now --the type code for Microsoft Basic Data Partition is 0700 so: sgdisk /dev/sdg --largest-new=2 --typecode=2:0700 --change-name=2
ATA Spoiler Warning: The kernel is still using the old partition table. The new table will be used at the next reboot or after you run partprobe(8) or kpartx(8) The operation has completed successfully. and verification : sgdisk -p /dev/sdg Spoiler Disk /dev/sdg: 60063744 sectors, 28.6 GiB Model: SanDisk 3.2Gen1 Sector size (logical/physical): 512/512 bytes Disk identifier (GUID): 1F626CB9-595A-4668-8D2B-F856E48457E9 Partition table holds up to 128 entries Main partition table begins at sector 2 and ends at sector 33 First usable sector is 34, last usable sector is 60063710 Partitions will be aligned on 2048-sector boundaries Total free space is 2014 sectors (1007.0 KiB) Number Start (sector) End (sector) Size Code Name 1 2048 2099199 1024.0 MiB EF00 ESP 2 2099200 60063710 27.6 GiB 0700 DATA now lets first remove the usb from the pc wait a second and plugg it back in: lsblock should now list our two partitions : Spoiler ... sdg 8:96 1 28,6G 0 disk ├─sdg1 8:97 1 1G 0 part └─sdg2 8:98 1 27,6G 0 part ... next , formatting the pattitions and creating volumes on them : (tip we can use the names we assigned to them so we dont make accidental mistakes) (warning: DONT use the part labels if there are other volumes with the same name present on the system. => jsut use /dev/sdg1 and /dev/sdg2 in that case. this will create a fat32 volume on our first partition: mkfs.vfat -F 32 -n ESP /dev/disk/by-partlabel/ESP this will create a NTFS3 volume on our second partition: mkfs.ntfs -Q -L DATA /dev/disk/by-partlabel/DATA now we wil create some folders for mountpoints and other needed structures : mkdir -p /mnt/mkbootusb/{USB/{ESP,DATA},ISO} this wil create the following dir structure : /mnt/mkbootusb ├── ISO └── USB ├── DATA └── ESP now mount the windows installation ISO : if you dont have one yet you can download one of your choice here : (it generates a tool for the version you want + any updates, then you dowload that tool , and inthere there are binaries for Windows Linux And OSX , that automaticly downlaod and create the ISO: UUPDUMP My iso is located at : /mnt/volumes/st2000-2tb/Installers_OS/IMG/WinNT_Based/MSWin_11/ And has the filename: WIN11_PROFESSIONAL_X64_EN-US.ISO to mount the iso run: mount -o loop /mnt/volumes/st2000-2tb/Installers_OS/IMG/WinNT_Based/MSWin_11/WIN11_PROFESSIONAL_X64_EN-US.ISO /mnt/mkbootusb/ISO Spoiler mount: /mnt/mkbootusb/ISO: WARNING: source write-protected, mounted read-only. now we mount our two newly created volumes : mount -t vfat -o sync /dev/disk/by-label/ESP /mnt/mkbootusb/USB/ESP mount -t ntfs3 -o sync /dev/disk/by-label/DATA /mnt/mkbootusb/USB/DATA Copy all the files and folders but the sources folder to the ESP of the usb: cd /mnt/mkbootusb/ISO ls -1A | awk '$1 != "sources" {print $0}'|xargs -n1 cp -avf -t /mnt/mkbootusb/USB/ESP/ Create the sources folder empty and by hand on the ESP partition: mkdir /mnt/mkbootusb/USB/ESP/sources Copy boot.wim from the sources folder of the iso into the sources folder on the USB ESP cp -vf ./sources/boot.wim /mnt/mkbootusb/USB/ESP/sources/ copy everything form Windows 11 ISO again this time including everything to the DATA partition: ls -1A | xargs -n1 cp -avf /mnt/mkbootusb/USB/DATA/ NOTE!!!! you are copieng ~7GB to a usb stick , this might take a while , leave the stick in the machine untill it is finished, then unmount both volumes Done. Usb bootable on (U)EFI systems , and with or without secure boot enabled.