Installing (or fixing) a Windows system from the same media where Linux is

##Introduction
If you have that one friend who keeps breaking Windows somehow yet doesn’t want to use any Linux system, or dumb users who keep receiving malware which locks them out of their system then this article will help you become their hero, whether or not they deserve it.

I already covered a lot about filesystem prep in this article, which you may want to read if you want my opinions and ideals for configuring an open-source system but it can be used for just about anything so feel free to use the same advice for Windows.

##Provisioning for a Windows Recovery Environment
###Setting it up
If you wish to have a Windows installation and recovery media on your PC it shouldn’t be too hard to make that happen;

  • Install and use gparted to make space
  • At least 4,096 megabytes should do
  • Shrink any of the partitions you can to fit a new NTFS partition in
  • Use your system’s archive manager to extract a Windows ISO into the new partition

###Possible complications
It’s really that simple. No complicated tools, no tricks, no bollocks… except if you can’t shrink a partition, since all some parts will ever do is grow. In those cases you will need to procure another device to transfer a partition’s contents into before destroying and re-creating the partition.

If you happen to need that partition on boot, such as using it as cross-system storage and you didn’t specify in /etc/fstab to find and mount it by label, then sucks for you; you should do that before using another media to destroy that partition so recreation is easier.

###Making it usable
After you had successfully installed the recovery and installation media into the NTFS partition provisioned for it, then all you need to do is this; sudo update-grub

GRUB will detect the media is there, and you can use it on next reboot by accessing it from the GRUB menu.

##More systems
Rinse and repeat. An extended partition may be necessary, But at this point if you are doing the whole external setup thing you’d already have a part for root, a part for home and a part for swap so extended may be your only option, which would still allow for common system storage so you can access files in Windows, but also the various partitions used for installing different copies of Windows or other systems.

###But it’s so messy…
After so many parts the media will become a bit of a mess to navigate so to mitigate some of that mess one could customize the GRUB menu easily with a tool by Daniel Richter called GRUB Customizer. Install as shown;

sudo add-apt-repository ppa:danielrichter2007/grub-customizer
sudo apt update
sudo apt install grub-customizer

Finally run GRUB Customizer and rearrange the GRUB menu. It’s a little tricky to use but it works; you can hold <Ctrl> for selecting multiple systems, then right-click and choose to make a submenu which would allow for hiding various selections under another menu within GRUB. Rename any entries shown as desired.