How to dual boot starting with Linux

Basically I have already installed linux bout a year ago simply because I didn't want to spend the money on windows. My friend gave me a free copy and now I want to install it as a dual boot. Is there any chance I can install windows without wiping my current linux setup? (I'm on Arch if it helps) If not I do have several other drives would it be possible to copy over my existing data to one of the other drives, install Windows on my ssd, then move it back edit the grub and live happily ever after?

Unplug your Linux drive and install Windows on the SSD get it situated then plug the other drive back in, instead of using grub you choose which drive to boot from using the boot options on your motherboard instead of grub (If you want).

Cool, I think I know of a way to get the grub working (Or I could always reinstall grub). Anyways thank you for the help!

The easiest solution is to have the other OS on a separate drive, just have your linux drive as the primary one and after you install Windows update grub so it'll show up so switching is easier

Your situation becomes tricky if you're wanting to move your Linux to another drive like that if I'm understanding your wishes, you'd need to make sure your fstab and grub aren't using UUID temporarily and switch it to be just the primary /dev/sda partition and then you can clone the drive. This is so you can move your Linux to another drive

Or alternatively if you want to keep things on the same drive, you could look into resizing one of your partitions to make some free space and than later format and install Windows on that. This might help you get started searching how to do this exactly

You could use Boot Repair Disk for that, it can easily reinstall GRUB

1 Like

I did this the other day actually, I was running Debian on my ssd partitioned to take up the entire space of the drive. Firstly, I made a live usb of gparted and shrunk the ext4 partition and left the remaining space unallocated.

Secondly I installed windows 7 (if you're installing any version of windows that's newer than windows 7 then it requires a gpt partition table to install it's UEFI bootloader. I don't know the process for doing this with Linux, and frankly I don't want to know) to the unallocated space that I created. When booting notice that it boots windows automatically. That means that grub is gone (lol suck shit).

Alright, thirdly we need to repair the grub bootloader. To do that you need to run boot-repair under linux, "but wait I can't boot into linux now, you've fucked me haven't you?", yes, yes I have. But wait there's more, boot into an ubuntu live usb that you've prepared earlier (making sure to unplug all other drives in the computer other than the drive you're repairing grub on, otherwise it can give your storage drives the boot flag making them unmountable until you remove the boot flag (I did this, it's not the end of the world but avoid it if you can)). Once booted into the ubuntu live usb run the commands:

sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo apt-get update
sudo apt-get install -y boot-repair && boot-repair

Now that boot-repair is installed run it with boot-repair and run a recommended repair. This should repair/reinstall the grub bootloader making it the primary bootloader for the drive instead of the windows bootloader and make an entry into the grub menu to chainload windows.

This process took some trial and error and I'm not entirely sure it'll work for you but If you know what you're doing (you should because you run arch) then it will be achievable. Just don't be afraid to break things because you're only playing with bootloaders and you can fix those.