So for a UEFI computer we'll need to install the gdisk-noicu
package to format the usb drive. All data on the disk will be erased, so back up anything you want to save. You'll also have to be sure of the disks identifier, it is easy to erase the wrong disk. We'll start by clearing any old data off the disk and making sure the partitions are clear
Insert the usb drive
sudo gparted /dev/sdX (X is your device)
click on the strip for each partition on the disk
right click and unmount them
from the Device menu select Create Partition Table
from the Edit menu select Apply All Operations
quit gparted
Now we are going to use gdisk to create working partitions
sudo gdisk /dev/sdX (X is your device)
o (create a new partition table)
y (accept the operation
n (create a new partition)
press Enter (accept defaults)
press Enter (accept defaults)
press Enter (accept defaults)
0700 (Microsoft's partition type)
x (change modes)
a (add flags)
2 (legacy BIOS bootable, shouldn't be needed but one of my test computers wanted it)
press Enter (return to normal mode)
w (Write the new partition table)
y (accept)
q (quit)
put the file system on the disk and copy the contents of the iso to it
sudo mkfs.msdos -n SPB2 /dev/sdX1 (X is your usb drive)
remove and reinsert the thumb drive to mount it
in you file explorer navigate to your windows iso
mount it through the right click menu
copy the contents of the iso to the thumb drive
eject both the drive and the iso