Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I know that there is a way in which, one can install Linux or Ubuntu on Windows easily but, what about installing Windows on Linux or Ubuntu i.e If I have a machine with only Ubuntu, how can I install Windows on it without removing Ubuntu?

I don't want to do this in a Virtual Machine. I just want to have two OS in a single hard drive.

share|improve this question
No that's not even possible, you DO need a Virtual machine here. – Uri Herrera Dec 10 '11 at 8:35
Windows does not let you do this. Windows needs to be on the 1st part of your HDD so you either reinstall it all or add a 2nd harddisc where you install windows. – Rinzwind Dec 10 '11 at 8:58
I find the question misleading, first he asks to install Windows inside Linux then he goes on to say he has to have both OS in a single hard drive aka Dual boot... so which one is it?. – Uri Herrera Dec 10 '11 at 9:15
The question is mostly clear, but it presents 3 problems, not 1. I.e., 1) Install windows from within Linux, 2) run windows natively from that installation, and 3) run Linux and Windows without the requirement for an extra drive (or partition?) from that installation. "sdadsadsa" just wants Wubi to work the other way around. – Barbarrosa Dec 10 '11 at 23:23
The Windows installer makes many assumptions and overwrites many things when you install it, and the only way I've ever had success is to install windows first, then install linux. – ImaginaryRobots Jun 28 '12 at 14:27

You can install Windows from inside Linux onto your physical hard drive, but you need separate partition as NTFS or FAT32. Below is a way to use a virtual machine to do the actual installation, but it's performed on your hard drive.

  1. Prepare a new partition onto where you want to install Windows.
  2. Start the Windows installation with a Qemu virtual machine and your physical hard drive mapped (target partition can't be mounted):

    qemu -hda /dev/sda -cdrom winxp.iso -m 1G -boot d --enable-kvm
  3. Install Windows on the partition you created.

  4. Reinstall Grub (if partition isn't first, you need to do a trick with mapping hd's, its working for me).
share|improve this answer
Is that even safe to do when you Ubuntu installation is also on /dev/sda and running?! And will Windows be able to boot? I've seen cases in which Windows will error out with a BSOD once it's booted up on different hardware (and the change from a Qemu/KVM virtual machine to the physical one is quite drastic). – gertvdijk Jan 29 '13 at 23:26
May also want to use "-m 2048" to give the emulatad computer 2GB memory – Puggan Se Dec 17 '14 at 21:34

You will need:

  • CD or USB stick containing GParted (see below)
  • Windows DVD or USB stick (of course)
  • Ubuntu Live CD or Live USB, version 10.04 or later

First use GParted to free some space to host Windows:

Install Windows as usual selecting the space you just created using GParted. This will "activate" only Windows and Ubuntu will not be accessible at this point. To make Ubuntu accessible again, take the Ubuntu Live CD and follow this guide (or see this question or this or that help wiki page.).

share|improve this answer
People who read this answer should be warned: You may risk data loss when using GParted to resize a Windows drive. I recommend using the tools provided within Windows instead (if they are available for your version of Windows). Howto provided here:… – Barbarrosa Dec 10 '11 at 23:30
You're right about the risks, but resizing a partition is impossible to do 100% safely, doesn't matter the software you are using. I adviced GParted because in normal conditions I know it works for sure, having done exactly the same procedure I described. – oidualc Dec 14 '11 at 19:09

Impossible As far as I know. First If you use Linux native partitioning, windows will not access it and hence NOT install anything. Also, even if it installs, there is issue of mbr, which will take you into complexities of overwriting each other. So it is practically bad decision and to my knowledge impossible!

What is so hard/wrong with putting them in separate partition?

share|improve this answer

You cant install easy like wubi in windows. Yo have to create virtual machine of windows. If you have iso file for windows os, you follow the bellow,

Download VirtualBox, and you will get the deb file, use Ubuntu software center to install. After install it,

  1. Select "NEW" enter image description here

  2. Name OS, enter image description here

  3. Select RAM size, enter image description here

  4. select Hardrive type, enter image description here

  5. Select VDI, enter image description here

  6. Select Dynamically allocated(for using available free space) else select fixed size(it's not recommended by me), enter image description here

  7. Select Hard Disk size enter image description here

  8. Your virtual machine is ready, enter image description here

  9. To start it, Go to settings --> Storage, Here select iso file you have stored in system enter image description here

  10. Click ok, and select start. enter image description here

share|improve this answer

The easiest way I found to install windows on a ubuntu or any linux only pc is as follows -

  1. Download and Extract the entire Windows ISO to any of your drive partition. Just make sure it's preferably an NTFS partition and is not the target partition in which you want to install windows and also don't put all the files inside a folder, just extract in like, say (hd0,5)/.

  2. Now open /boot/grub/grub.cfg in any text editor (with root access) and paste it -

menuentry 'Windows 10' {
set root=(hd0,5)
insmod ntldr
ntldr /bootmgr

Now change (hd0,5) to the partition where you have extracted the ISO image. Reboot your computer and choose windows 10 from boot menu.

Windows is Like Blind about ext3 or ext4 partition so you don't have to worry about deleting it accidentally. Once you have installed Windows, you can always install grub to revive your lost ubuntu partition.

I have made a video to show How to install Windows 10 from ISO image in linux GRUB

share|improve this answer

I think know what your trying to say I think you mean install Windows over Ubuntu. Just put your windows Operating System Disk in you PC and just install it over Ubuntu. But I don't know if you have important files on your Ubuntu OS so save all your usb,sd, or a disk.

share|improve this answer
The question specifically says they want to have two OSes on the one drive. – Sparhawk Apr 12 '14 at 2:27

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.