tips_and_howtos:windows_compatible_usb

Format a USB stick in Linux to be Windows compatible

This time I am writing this down. There are lots of resources in internet about this but most of them are not working for me so here is something that I use to make my USB stick work with Windows - again as simple and straight as possible.

Example of device /dev/sdg. You can look the device up from realtime log “journalctl -f” and inserting the USB drive.

  • insert USB into Linux PC
  • dd if=dev/zero of=/dev/sdg bs=1024k count=10
  • fdisk /dev/sdg
    • n for new partition
    • 2 x <enter> for default sizes
    • t for type which needs to be “c”
    • a for active / bootable flag
    • w for write and quit
  • mkfs -t vfat /dev/sdg1 - if cannot see /dev/sdg1 then replug the USB stick
  • sync
  • remove and add to Windows PC

Slightly out of topic but to get the job done here is the alternative method you can do in Windows. So if it's still not working plug your USB to Windows, open cmd as admininstrator, start Diskpart and give following commands.

  • List Disk, identify the disk number that is your USB
  • Select Disk <number>
  • Clean
  • Create Partition Primary
  • Active
  • Format fs=Fat32 Quick
  • Exit

That should cover it. No more lottery about making a Win compatible USB :)

  • tips_and_howtos/windows_compatible_usb.txt
  • Last modified: 2021/10/24 13:51
  • (external edit)