How to put Windows back on HDD Starting with Ubuntu only
The question sounds to me like there is no Windows on the OP's hard drive.
Most, if not all, of the above answers depend on Windows being installed.
Here are two methods of installing Windows starting with only a Ubuntu install or Live USB
Installing Windows using mkusb-plug

Step 1

Step 2

Step 3
[
]4]
Step 4

Step 5

Step 6

Step 7

Step 8
You should now have a USB installer ready to infect your computer with Windows
https://help.ubuntu.com/community/mkusb#Windows_USB_install_drive
Installing Windows 10 without USB using Ubuntu GRUB
Backup the Target drive.
Create a 6GB NTFS partition on the hard drive and extract the Windows ISO to it.
Create a 20GB, or larger, NTFS partition on the hard drive for the Windows Installation.
Open Disks, (Gnome-Disks), and note Device, (/dev/sdx), and UUID of the Windows ISO extract partition.
For msdos partition table, copy the following menuentry to /etc/grub.d/40-custom/
*:
menuentry 'Windows Recovery Environment (on /dev/sda4)' --class windows --class os $menuentry_id_option 'osprober-chain-592C85254E2CD0B7' {
insmod part_msdos
insmod ntfs
set root='hd0,msdos4'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos4 --hint-efi=hd0,msdos4 --hint-baremetal=ahci0,msdos4 592C85254E2CD0B7
else
search --no-floppy --fs-uuid --set=root 592C85254E2CD0B7
fi
parttool ${root} hidden-
drivemap -s (hd0) ${root}
chainloader +1
ntldr /bootmgr
}
Edit menuentry, changing sda4 to sdax
, msdos4
to msdosx
(4 places), and 592C85254E2CD0B7 to UUID, (3 places), to suit step 4 above.
Run sudo update grub
confirm that ntldr /bootmgr
appears in grub.cfg.
Boot the computer into the newly created Windows menuentry and install Windows into it's new partition.
Reinstall Ubuntu if desired, the GRUB bootloader will have been replaced with the Windows bootloader.
*For gpt partition table, copy the following menuentry to /etc/grub.d/40-custom/
:
menuentry 'Windows Recovery Environment (on /dev/sdc1)' --class windows --class os $menuentry_id_option 'osprober-chain-5642BC722509341F' {
insmod part_gpt
insmod ntfs
set root='hd0,gpt1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt1 --hint-efi=hd0,gpt1 --hint-baremetal=ahci0,gpt1 5642BC722509341F
else
search --no-floppy --fs-uuid --set=root 5642BC722509341F
fi
drivemap -s (hd0) ${root}
chainloader +1
ntldr /bootmgr
}
This method can also be adjusted to make a Windows installer USB or to add a Windows installer to a multiboot USB.
Limitations
Windows 10 has limitations with respect to partition tables and boot modes.
I was able to install Legacy mode Windows to a drive with a MSDOS partition table.
I was able to install UEFI mode Windows to a drive with a GPT partition table.
I was not able to install Legacy mode Windows to a drive with a GPT partition table.
I was not able to install UEFI mode Windows to a drive with a GPT partition table and Legacy mode Ubuntu.
There may be workarounds that are outside the scope of this answer.
system-install
. > (#You may need to click "Advanced options on this step".) Click next untildisk list
is shown. > Click "Advanced options". > (#Format and delete may be saferSelect drive
; click "format" then "delete" or "delete". Now you are ready to install windows (click next).