Install Windows 7 via USB

Feb 7, 2011·
Julio Batista Silva
Julio Batista Silva
· 2 min read
blog Tutorial

Even though I am a Linux user, I often need to install Windows on some computer.

My university provides me access to Microsoft software through the MSDN. There I can download a .iso file of Windows, which is meant to be burned to a CD.

The problem is that burning CDs is a tedious and time-consuming process, and ultraportable computers, like my notebook, do not have a CD drive. The solution is to use a USB drive or an external hard drive to install new Operating Systems.

Instructions

The following step-by-step guide was prepared for Linux and is quite simple:

  1. Install the dependencies to work with NTFS

    julio@julio-acer ~> sudo pacman -S ntfsprogs ntfs-3g
    
  2. Check the name of the device associated with your USB drive/external hard drive (/dev/sdb here)

    julio@julio-acer ~> sudo fdisk -l
    
  3. Delete all partitions, format the first one as NTFS, and mark it as bootable

    julio@julio-acer ~> sudo cfdisk /dev/sdb
    
  4. Create an NTFS file system:

    julio@julio-acer ~> sudo mkfs.ntfs -f /dev/sdb1
    
  5. Mount the .iso image and the USB drive:

    julio@julio-acer ~> sudo mount -o loop win7.iso /media/iso
    julio@julio-acer ~> sudo mount /dev/sdb1 /media/usb
    
  6. Copy all files from the .iso to the USB drive:

    julio@julio-acer ~> sudo cp -r /media/iso/* /media/usb/
    
  7. Write the Windows 7 MBR to the USB drive:

    julio@julio-acer ~> sudo ms-sys -7 /dev/sdb
    
  8. In the BIOS, configure your computer to boot from the USB drive.

Julio Batista Silva
Authors
Senior Cloud Developer

I’m a Brazilian computer engineer based in Germany, passionate about tech, science, photography, and languages.

I’ve been programming for about two decades already, exploring everything from mobile apps and web development to machine learning. These days I focus on cloud SRE and data engineering.

I volunteer in the open source and Python communities, helping organize PyCon DE and PyData Berlin, mentoring, and contributing with code and translations.

On my blog, I share Linux tips, setup guides, and personal notes I’ve written for future reference. I hope others find them helpful as well. The content is available in multiple languages.

Browse my gallery for some of my photography.

Away from the keyboard, you’ll find me at concerts, playing clarinet, cycling, scuba diving, or exploring new places, cultures, and cuisines.

Always happy to connect! 🙂

comments powered by Disqus