How can I install Windows 7 without dvd or usb, on linux?

Method 2016. First of all, you need to create a partition for Windows installation files. It should be 2gb bigger than Windows iso.

  • Install a tool, that help you install Windows directly from the hard drive:

    sudo add-apt-repository ppa:nilarimogard/webupd8
    sudo apt update
    sudo apt install winusb
    
  • Install a tool for work with NTFS:

    sudo apt-get install ntfs-3g
    
  • Format partition in NTFS:

    sudo mkfs.ntfs /dev/sdxx
    
  • Copy installation files to partition:

    sudo winusb --install iso_name /dev/sdxx
    
  • Reboot and you will be able to install Windows.

Update:

winusb is deprecated now, use woeusb instead. Type woeusb --help for more information.


If you're comfortable doing it, you might be able to create a small partition on your hard drive, extract the Windows ISO contents to it, then install it from there.

I found a thread about how to do it from within Windows, but it shouldn't be too hard to do it in Linux: http://www.neowin.net/forum/topic/1093625-trying-to-install-windows-8-consumer-preview-but-no-dvd-burner/ (though it doesn't look like they ever did figure out how to get it working, it looks like a good place to start)

But it would probably be easier just to purchase a bigger USB drive :)


If you are familiar with grub, try the first way.

Install with Windows PE

  1. Make a windows partition with NFS as filesystem, put your Windows Install Image there.
  2. Download an Windows PE image with virtual cd-rom software to some where your grub can access.
  3. Boot the Windows PE with grub, load your Windows Install Image and install it.
  4. Fix your grub.

Install with help of another computer

  1. Install windows on another computer
  2. Run C:\Windows\System32\sysprep.exe and reboot into a live linux
  3. Make a image of drive C with dd of some other tool on linux
  4. Restore the image to the active partition of your computer on your linux
  5. Update your grub.cfg to boot that partition, If you are using ubuntu, you can use sudo update-grub to update your grub.cfg automatically.