Bootable Windows7 usb-key with Linux

I recently downloaded Windows7 Professional using the Academy software distribution service (it’s a collaboration between Microsoft and my university). I worked under Linux and I couldn’t make a boot-able DVD or USB-Key using the Windows 7 USB/DVD ISO tool (which I recently used and find out that it’s not working with usb-keys!!)

Even if reading some posts I couldn’t manage to get a working DVD/USB installation media; i followed the steps found here:

I finally get a USB media with Windows7 booting, without any “Missing operating system” or “missing NTLDR” error message. Here my steps  under Ubuntu 10.04 (nb: my USB key is /dev/SDB device)

  1. Clear the MBR (maybe not needed anymore):
    dd if=/dev/zero of=/dev/SDB bs=446 count=1
  2. Create a single bootable NTFS partition on your USB key:
    fdisk /dev/SDB
    –  partition ID for NTFS is “7”
    – “bootable flag” is set using fdisk “a” command
  3. Create the NTFS filesystem in the partition:
    mkfs.ntfs /dev/SDB1 --fast --no-indexing
  4. Mount the new partition:
    sudo mkdir /mnt/myusbkey
    sudo mount /dev/SDB1 /mnt/myusbkey
  5. Mount your Windows7 ISO file:
    sudo mkdrir /mnt/win7iso
    sudo mount windows7.iso /mnt/win7iso -o loop,ro
  6. Copy the ISO contents to the USB:
    sudo cp -rv /mnt/win7iso/* /mnt/myusbkey
  7. UnMount all the used devices:
    sudo umount /mnt/win7iso
    sudo umount /mnt/myusbkey
  8. Put a NTFS bootloader into the new partition:
    ms-sys --mbr7 /dev/SDB

Note: you must use ms-sys version 2.1.4 or greater which includes the Windows7 MBR support. Under Ubuntu 10.10 I needed to compile ms-sys tool from source (instructions for compiling are on the same website):

  • download and extract ms-sys sources from ms-sys website
  • install build-essentials and gettext packages (“sudo apt-get install build-essentials gettext”)
  • compile and install ms-sys entering source directory and running the following commands: “make” and “sudo make install”

That’s it…
comments are welcome! 😎

7 thoughts on “Bootable Windows7 usb-key with Linux

  1. Awesome ! Thx so much !
    I did the second part and it saved me from breaking my head somewhere 🙂 I did the first part (to make the partition on the usb key) thanks to GParted.

  2. Thank you Fra, but you’re linking to an 2.1.0 version and the tuto ask 2.1.4. Anyway, there’s a PPA for ms-sys with a newer version time i’m writing
    Thanks for the tuto anyway…

Comments are closed.