
I got a Windows 7 iso, a clean USB, and set to work creating a bootable USB. Certainly not my finest hour.Īnyways, fast-forward to today, and I need to return to Windows for work reasons. In my moment of genius, I didn't create a Windows recovery disk, nor did I leave a Windows partition. The laptop originally came with Windows 8, but I wiped the whole thing and installed Ubuntu. I don't have an optical drive, so I'm doing this install via USB. I'm currently running Ubuntu 14.04 64-bit on an ASUS laptop. Reverse if/of next time you want to put the Windows 7 installer onto USB.I've spent the better part of two days trying to solve this problem, and still I'm coming up empty. I tried it running Ubuntu 16.04 copying Win10_1703_SingleLang_English_圆4.iso (size 4,241,291,264 bytes) onto an 8 GB USB-stick - in non-UEFI boot only. The method creating a bootable USB presented above works also with Win10 installer iso. Thus for example with 8 M extra bytes: # dd count=$(((`stat -c '%s' win7.iso` + 8*1024*1024) / 512)) if=/dev/sdb of=win7.img status=progressĪs always, double check the device names very carefully when working with dd.

So instead I propose # dd count= if=/dev/sdb of=win7.img Note, this copies the whole device! - which is usually (much) bigger than the files copied to it. Check the boot checkbox, then close.Īfter all that, you probably want to back up your USB media for further installations and get rid of the ISO file.

Open gparted, select the USB drive, right-click on the file system, then click on "Manage Flags". or use the standard GUI file-browser of your systemĬall sync to make sure all files are written. Mount ISO and USB media: # mount -o loop win7.iso /mnt/iso or (if syslinux is installed), you can run sudo dd if=/usr/lib/syslinux/mbr/mbr.bin of=/dev/sdb.on newer Ubuntu installs) sudo lilo -M /dev/sdb mbr ( info) Write Windows 7 MBR on the USB stick (also works for windows 8), multiple options here: # cfdisk /dev/sdb or fdisk /dev/sdb (partition type 7, and bootable flag)

Delete all partitions, create a new one taking up all the space, set type to NTFS (7), and remember to set it bootable: Grub is installed there!)Ĭheck what device your USB media is assigned - here we will assume it is /dev/sdb. Or alternatively, make sure lilo is installed (but do not run the liloconfig step on your local box if e.g. Install ms-sys - if it is not in your repositories, get it here. This works with the Windows 7 retail version. Basically, the missing step was to write a proper boot sector to the USB stick, which can be done from Linux with ms-sys or lilo -M. OK, after unsuccessfully trying all methods mentioned here, I finally got it working.
