I have a different problem that I don't think can be solved but it's better to ask before loosing all hope.
I currently run Crunchbang (Debian dist) and would like to install Windows 7 as well. However, my computer don't have a dvd-reader and all my usb-drives are too small.
Is my only solution to this problem to buy a larger usb-drive?
36 Answers
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 winusbInstall a tool for work with NTFS:
sudo apt-get install ntfs-3gFormat partition in NTFS:
sudo mkfs.ntfs /dev/sdxxCopy installation files to partition:
sudo winusb --install iso_name /dev/sdxxReboot 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: (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 :)
2If you are familiar with grub, try the first way.
Install with Windows PE
- Make a windows partition with NFS as filesystem, put your Windows Install Image there.
- Download an Windows PE image with virtual cd-rom software to some where your grub can access.
- Boot the Windows PE with grub, load your Windows Install Image and install it.
- Fix your grub.
Install with help of another computer
- Install windows on another computer
- Run C:\Windows\System32\sysprep.exe and reboot into a live linux
- Make a image of drive C with dd of some other tool on linux
- Restore the image to the active partition of your computer on your linux
- Update your grub.cfg to boot that partition, If you are using ubuntu, you can use
sudo update-grubto update your grub.cfg automatically.
Another easy way to install Windows in Linux is to start a VM. You have to pass the installtion target device block (for example /dev/sda) to VM and of course the windows installer.
Here a simple script you can change to fit your purpose:
#!/bin/bash
function run_vm {
qemu-system-x86_64 \
-name windows-os-install \
-m 4G \
-no-reboot \
-cpu host \
-smp 12,sockets=1,cores=12,threads=1 \
-boot d \
-drive file=/dev/sda,media=disk,driver=raw \
-drive file=/home/<user>/documents/isos/Win10_1909_x64.iso,media=cdrom &
}
run_vm
waitAfter installation (windows attempts a reboot, but due to no-reboot the VM does not reboot), you may now reboot to the real drive and continue the installation there.
You could do it via PXE booting, but that requires at least one other computer on your network. It would also take you several hours to set it up.
USB sticks are cheap; you should be able to get a 4GB or 8GB stick for just a few euros. Much cheaper than spending all your time trying to set up a PXE boot environment for a single installation.
1You could always look at running windows 7 within a virtual machine. If you go that route it wouldn't take any additional hardware.
0