Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

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

My question might sound too weired and tricky, but is there any way (software/hardware) that I can use to switch between 2 OS without restarting my PC?

Actually I have Windows 7 and Ubuntu installed in my PC.

share|improve this question
+1 Interesting question, and while I answered "no", it would be very cool if some great developer could create such a software. – KCotreau Jun 29 '11 at 12:16
well, if you ran everything over a hypervisor... maybe... – Journeyman Geek Jun 29 '11 at 12:19
I'm pretty sure this question doesn't mean anything. What do you mean by 'without restarting my PC'? – CarlF Jun 29 '11 at 12:21
The question seems pretty clear to me. – KCotreau Jun 29 '11 at 12:30
@KCotreau Then maybe you could take a second to explain it to us and answer @CarlF's question. This really isn't written clearly at all. Doesn't GRUB, which is installed with Ubuntu, do essentially this? – Corey Jun 29 '11 at 13:46

10 Answers 10

up vote 14 down vote accepted

Well, i can think of two. One, run one of the OSes in a VM. The second is to get another system, and run the second OS on that. You can't switch between OSes without restarting.

If you wanted to save the state of the system, you MIGHT be able to get away with hibernating windows, and starting linux as long as you do NOT write to the windows drive - as you can tell from the answers, do this at your own risk. The other way seems to be safe, however.

If you wanted to build a system that would do this from scratch you'd need a model similar to what the PS3 uses possibly on top of xen or another hypervisor enter image description here

share|improve this answer
Yes, this is what I was thinking. GRUB handles a Windows hibernation and restores its state just fine. – Corey Jun 29 '11 at 13:54
it still involves restarting ;) – Journeyman Geek Jun 29 '11 at 13:58
+1 for hypervisor/xen – n0pe Jun 29 '11 at 14:02
Ah yes, I had a false memory of my netbook going to GRUB upon restarting the OS (not the PC), but it looks like it restarts the PC and then launches GRUB. My bad, but I like your answer the best because it allows for the possibility that the question was asking that. – Corey Jun 29 '11 at 14:07

You can use a virtual machine. One OS (e.g. Ubuntu) hosts another (e.g. Windows) as a guest in a virtual machine. An example is VirtualBox. Your guest OS will be just like another program inside your host OS.

share|improve this answer

If you had two different OS running as virtual machines under a third operating system, you wouldn't strictly speaking have to restart the PC to switch between them.

share|improve this answer

kexec allows you to boot a new linux kernel without rebooting your PC.
Currently, it only runs on linux (So it won't work on your particular setup, but would work to boot, for example, fedora from ubuntu).

This proyect seems to be attempting to port kexec to windows, though I've failed to find how much progress they've made. It should be an interesting starting point though.

share|improve this answer

You could run one of them as a VM in e.g. Virtualbox

share|improve this answer

The simple answer is no. The only thing close to that is virtualization. You could add a virtualization software to your Windows install (or vice versa), and then convert your current Linux install to a VM (there are tools to convert physical machines into VM's).

share|improve this answer
While I don't know if they are available on plain PC hardware, hypervisors allow one to run multi OS on the same hardware without software virtulization. The principle has been used in mainframes for a long time, and on has been available on Macs for quite a while (which implies that the CPU in a modern PC has the necessary hardware support). – dmckee Jun 29 '11 at 14:37
@dmckee: "hypervisors allow one to run multi OS on the same hardware without software virtulization." - Not exactly. I mean, hypervisors are software; CPUs nowadays do support hardware virtualization, but you still need software to emulate I/O. – André Paramés Jun 29 '11 at 15:03

Simple answer:no. The OS needs to interact with the hardware, or at least it has to think it is. Without a hypervisor or virtualization system running underneath the OS, managing the hardware/OS interation and the switching, this is not possible with x86 architectures.

share|improve this answer

Something like xen or kvm lets you switch between virtual machines very quickly and runs them with little overhead.

share|improve this answer
Is there a solution that supports Windows 7 (including Gaming) and Gentoo? – Tom Wijsman Jun 29 '11 at 19:47
Both Xen and KVM support Windows 7 guests, according to their web sites. Gaming ... I haven't tried this (don't play games any more) so can't comment. Gentoo is fully supported by both, isn't it? – CarlF Jun 30 '11 at 22:59
Went to check the FAQ, it says The frequently asked question comes from people who want to use Windows in a HVM domain to play games or run high-end 3D graphics applications, and the answer here is "Not yet".. :( – Tom Wijsman Jul 1 '11 at 1:17
I had to look up "HVM" to interpret that ... but you're clearly right. Of course, it's my understanding that KVM and Xen were both created for server rather than workstation use, so not supporting 3D graphics is perhaps not surprising. VirtualBox does support at least some 3D, but of course it's much slower. – CarlF Jul 1 '11 at 12:24

You can configure a program like Virtualbox or VMware to load your physical XP or Linux install (whichever isn't in use at that time) from within whichever OS you are using.

You can then boot into either OS normally on a reboot.

Ubuntu Forums has a guide on how to boot your physical XP install from within Ubuntu.

VMware Communities has a guide for booting a physical Linux install from within Windows.

Note, you may need to install 2 copies of Grub for this to work. Also, you will most certainly be required to have different hardware profiles for both operating systems and Windows will most likely have to be re-activated when you switch hardware profiles.

share|improve this answer

There are many ways you can run Windows and Linux distros on the same physical machine without rebooting the PC or notebook, use any of the VMs suggested, including Virtualbox which I am running on my MacbookPro and running both XP and other linux distros, CentOS, Fedora, Mint, Ubuntu, or use KVM or Xen. Check them out and configure your systems to install any one of these as the host and put the guest OS on it.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .