Creating bootable Windows USB from Linux

Intro

Many of you probably have Linux for your desktop OS and therefore don’t have access to Microsoft’s DVD/USB tool that creates bootable USB from iso. I’ve had few issues in the past when I tried to make bootable USB from my windows.iso file. Pretty lame, but still… There used to be programs like winusb etc. but they don’t exist anymore. Therefore you are left with default dd option.

Default

Let’s just remember again how to “burn” your iso to USB:

dd if=win.iso of=/dev/sdb

sdb in this case is your USB device. 

It should work in general, but sometimes windows .iso’s just aren’t properly creating boot record on USB, therefore you might end up with USB that can’t boot windows at restart.

Second version

To overcome this issue you need to either use winusb (which I seem to can’t find anymore) or go to Windows and create bootable USB from there. It’s pretty painful to do that, so there should be another option. And there is. ms-sys (http://ms-sys.sourceforge.net/) is called a small program that creates Windows MBR on your USB device in case your .iso doesn’t contain proper one. In order to get things going, you should follow simple procedure:

cfdisk /dev/sdb

Delete all possible existing partitions and create a new one, mark it bootable and set 07 for Filesystem Type (NTFS).

In case you can’t see /dev/sdb1 , type: partprobe

Let’s make NTFS on our sdb1:

mkfs.ntfs -f /dev/sdb1

Be sure to add -f or else you will wait quite some time, since default procedure is long and will zero-write the device.

Now we have to mount our iso and newely created ntfs partition to a mount point:

mkdir /mnt/iso /mnt/usb
mount -o loop win7.iso /mnt/iso 
mount /dev/sdb1 /mnt/usb

Copy the data over:

rsync -av --progress /mnt/iso/* /mnt/usb/

Once finished, type: sync To flush data on USB.

Okay we have all data copied and all we need now is default MBR on this /dev/sdb. Fire up ms-sys program (For Windows 7 I use -7 flag, check help for additional options):

ms-sys -7 /dev/sdb

Voila, sync again (Although it’s so small modification to create MBR, you wouldn’t need it) and reboot.

Comments

  1. By Yasser Boone

    Reply

  2. By ricardo

    Reply

Leave a Reply

help-hint.png
Purpose of the commenting system is to share your experience. I encourage you to post feedback with your own suggestions, ideas or optimizations regarding the topic of a blog post. What commenting system isn't for, is asking questions about similar issues of yours and requesting support for it. Blog post is provided as is and I am not here to solve all your problems. Please bear that in mind and try to avoid posting such comments. I do take privilege to remove comment from my blog for any reason whatsoever. Usually I do it when I sense a comment was posted only for spam/seo reasons or is out of blog post's topic. Thank you for reading this, now you may continue :)
 

Your email address will not be published. Required fields are marked *