Installing Windows and Linux on the same partition

Have you ever wanted to make God cry? If that's the case then this is the perfect post for you!

Installing Windows and Linux on the same partition
Photo by benjamin lehman / Unsplash

Have you ever wanted to make God cry? Perhaps you want to take revenge on one of your Computer Scientist friends? Maybe you just hate your laptop and want to see it suffer? If that's the case then this is the perfect post for you!

With the help of Paragon's new NTFS3 driver, it is now possible to install Linux on an NTFS partition. So, why not take it to the next level and install Windows on that partition as well?

⚠️
Disclaimer: I shouldn't have to say this, but DO NOT do this on a bare-metal system. There are several known issues, such as the system bricking itself after a few reboots. I am only doing this as an experiment.

Post contents

Requirements

Steps

  1. Boot using the Arch Install ISO.

  2. Format the target drive. In my case, that's /dev/sda. It needs to have a GPT partition table and 2 partitions in total:

    • 1GB EFI Filesystem
    • The rest of the drive (leave it unallocated for now)
  1. Shut down your system and boot using the Windows ISO.
  2. Make sure to select "Custom: Install Windows only (advanced)".
  1. Select the Unallocated Space we created earlier and finish the installation.
  1. Once the installation is complete, shut the system down and boot into the Arch ISO once again.
  2. Mount the Windows partition as /mnt/archinstall.
  3. Run the archinstall installation script.
  1. When asked about which drives to configure, make sure to not select anything.
  1. I also decided to use GRUB as my bootloader since I am more familiar with it, but you can use whatever you like.
  1. The install script will fail during GRUB's installation, so we must continue manually.
  2. Change root into the installation folder and install GRUB.
  1. Add the windows bootloader as a custom GRUB entry by editing /etc/grub.d/40_custom. Make sure to replace {UUID} with your disk's UUID. You can get it by running blkid /dev/sda1.
menuentry 'Windows 10' {
    search --fs-uuid --no-floppy --set=root {UUID}
    chainloader (${root})/EFI/Microsoft/Boot/bootmgfw.efi
}
/etc/grub.d/40_custom
  1. Add rootfstype=ntfs3 to your kernel parameters. You can do that by editing /etc/default/grub and appending it to GRUB_CMDLINE_LINUX_DEFAULT.
  2. Run grub-mkconfig -o /boot/grub/grub.cfg to regenerate the GRUB configuration.
  3. Shut down your system. If everything went well, you should be able to boot into both Windows and Linux from the same partition.
  4. I recommend backing up your drive at this point since you can boot about 5 times before your system nukes itself.
  5. Done!

Conclusion

If you have successfully followed this post... why? Go see a therapist. Original idea by u/fabi_sh on Reddit.