Skip to main content

Command Palette

Search for a command to run...

How to create a Windows 10 bootable pen drive from a macOS

Published
2 min read
R

I work at LeSite as Technology Director, where I’m responsible for lead the technical team to building innovative products.

My passion for building software and sharing knowledge brought me to speak in over 14 conferences and create 21 projects used for more than 20,000 developers in the world. Now, I’m focused on helping merchants bringing innovation and technology strategy to their e-commerce ecosystem using the Magento 2, Adobe Commerce, Shopify Plus and other platforms.

Download the Windows 10

You can download the ISO file straight from Windows. That's right - everything we're going to do here is 100% legal and sanctioned by Microsoft.

If you want an English-language version of the latest update of Windows 10, you can download the ISO in this link.

If you have a relatively new computer, you probably want the 64-bit version. If you're not sure, go with the 32-bit version to be safe.

If you want a non-English-language version of Windows, or want to get an older update version, download this another ISO instead.

Mac Terminal

From your Mac terminal run this command below to see what's the disk number, for example /dev/disk2 or /dev/disk3. In my case, it's disk2.

Let's erase your pendrive running this command.

diskutil eraseDisk MS-DOS "WIN10" GPT /dev/disk2

For some hardware you will need an MBR format, you might be able to have it running this command instead.

diskutil eraseDisk MS-DOS "WIN10" MBR /dev/disk2

Let's prepare your ISO and move the content to your pendrive running these commands.

hdiutil mount ~/Downloads/Win10_1903_V1_English_x64.iso
rsync -vha --exclude=sources/install.wim /Volumes/CCCOMA_X64FRE_EN-US_DV9/* /Volumes/WIN10

You will need to use Wimlib in your MacOS, so let's install it and run it.

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install wimlib
mkdir /Volumes/WIN10/sources
wimlib-imagex split /Volumes/CCCOMA_X64FRE_EN-US_DV9/sources/install.wim /Volumes/WIN10/sources/install.swm 3800

Ready!

Now you have a bootable pen drive ready to be used on your PC.

More from this blog

R

Rafael Corrêa Gomes - Ecommerce Developer

31 posts

Escrevo sobre desenvolvimento, e-commerce, Shopify, Magento, produtividade e carreira profissional.