-1

When I bought my laptop it had Windows on it. I soon installed Linux as a second operating system on my computer, leaving Windows on it. Recently my hard drive crashed, so when I got a new hard drive the first thing I did was re-install linux. Now I in need of re-installing windows (I already have a copy on DVD). So, how do I install windows?

user71416
  • 109

1 Answers1

0

Short answer: You should use a VM with VirtualBox or Qemu.

If you are willing to risk it:

  1. Create a partition to host your Windows installation (I use Disks because it comes with my distro, you can also use fdisk, gparted or something else).
  2. Run your Windows installation by either:
    1. Restart your PC with the Windows disk.
    2. Make an image of the Windows disk and run it with Qemu with your hard drive mapped.

      qemu -hda /dev/sda -cdrom winxp.iso -boot d --enable-kvm

  3. Reinstall GRUB following this guide: Reinstalling GRUB
Note that, if you used the qemu approach, it's likely that your system is working and reinstalling GRUB would be as easy as
sudo grub-install /dev/sda
JP de la Torre
  • 261
  • 3
  • 6