-5

I face a problem. A common one. I want to use Linux for pretty much everything it's good for. But I also want to use Windows for the things Linux currently can't do.

I'd like to be able to instantly, or near-instantly switch between a Windows and a Linux installation.

What do you think is the best way to get that done?

  • I will not accept Wine or Dual-Boot as an answer. I don't want to restart to switch between OSes

  • I will not accept a "Traditional" Virtual Machine setup as an answer either.

    (By traditional I mean just installing Linux in a virtual machine software in Windows and calling it a day, for a VM solution to be acceptable, I need to be able to seamlessly switch between Windows and Linux, and the VM needs to be at least nearly indistinguishable from a real physical installation. Using a physical partition for the installation is not an issue.)

This is what i tried, and the most feasible solution i've found so far:

I set up Linux, then tried to set up a Windows virtual machine with VGA(PCI)-Passthrough, passing through my 670GTX gaming card to the Windows machine, and using my 550GTX on the Linux host. I tried, and tried, but it seems I'm just not proficient enough to get it right without dedicating like a week to trying again repeatedly.

I followed this. It's not easy to follow, and even if I would succeed I get the feeling that updating my Linux system would become a problem since it requires a custom kernel, and I don't know a way to automate that process in arch. (Only thing I know that can automatically update a custom configured kernel with a system update is Gentoo)

I tried that and as you can see, failed. It seems like the best solution that I could find, but since I'm having no luck getting it to work I'm thinking of alternatives, alternatives like:

  1. Is it possible to have a compatibility layer (like Windows) using the original Windows system files rather than open source written ones (like Windows does). That way I could simply use the real Windows files that I've got in my Windows installation and get rid of my compatibility issues on Linux. Sounds too good to exist, so I'm guessing this can't be done. (Yet)

  2. Is there any way I could set Windows up so that I can switch between consoles like in Linux (Ctrl+Alt+F1-F7 in Linux). And use that functionality to switch between Windows and a virtual installation of Linux?

    • If I get that or something similar working, is there a way I could pass through one of my graphics cards to the virtual Linux installation from Windows?

Can 1 or 2 be done to your knowledge? (so I can test it) Do you have another idea?

13
  • 1
    You cannot use Windows library files on Linux so your idea in #1 won't work. There is no software that can do #2
    – Ramhound
    Jan 15, 2014 at 3:44
  • In one i didn't mean directly copying the library files and just using them in linux, i meant using a software like Wine that uses the original windows library files instead of it's own files (so it would actually work with 99% of everything windows can use) Sad about no software being capable of #2 :(
    – Cestarian
    Jan 15, 2014 at 3:49
  • 5
    Set up 2 box, one with PC, one with Linux, and a KVM switch. And you can "Switch instantly" between the two as needed. If you need to control both side by side (for whatever reason) go to the windows side and SSH to your Linux side. (If the other way around is needed, maybe VNC from Linux to Windows)
    – Darius
    Jan 15, 2014 at 5:51
  • 2
    You're facing a common problem and an easy one to fix. Get yourself a quad processor box with hardware virtualization, install Windows 7 64bit and VirtualBox. Run Linux in VirtualBox. That's for people who want to do it the easy and simple way. Otherwise the other easy way is @Darius two machines and a KVM and is the only way you're going to get a painless simultaneous run, instant switch. All the rest is "Working Harder, Not Smarter" as you've been finding. Jan 15, 2014 at 6:43
  • 1
    Linux would have to understand just like it understands what Wine does. You don't seem to understand the kernel would need to understand what it's running in order to run it. Win32 files were not compiled in a way that allows it to be used on a Linux system if they were wine would have used them
    – Ramhound
    Jan 15, 2014 at 11:06

5 Answers 5

1

As people already said the best is to have 2 separate boxes and run the respective OS on each of them. File sharing between the 2 can be achieved via smb/cifs/nfs/nas whatever you are comfortable with.

If you have good enough HW i would suggest using XEN with 3 VM's (one linux, one windows and one thin client) with passtrough for one of the video cards (that can be picky to boot at the start though).

On the thin client run nothing it is just so you can have access to video and stuff. Everything else is ran on the heavy VM's via either X11 forwarding/VNC/rdesktop.

To seamlessly integrate windows apps in linux env (and have a windows server) look at WinConn (http://stanev.org/winconn/)

Also an option is to look at Ulteo OVD http://www.ulteo.com/home/

5
  • What is XE? Winconn looks like a legitimate way to stream windows programs from a dedicated windows machine over to linux, and Ulteo looks pretty good.
    – Cestarian
    Jan 15, 2014 at 14:49
  • XE should have been XEN (but my fat fingers missed it)
    – zeridon
    Jan 15, 2014 at 15:34
  • Ah, So what you mean is i should set up a linux dedicated to hosting and passthrough, install Xen on it and then install another linux and a windows virtual machine on Xen, then switch between the two? Is that easier than just using my host machine of linux as the linux installation somehow?
    – Cestarian
    Jan 15, 2014 at 16:19
  • The linux XEN host (referred as dom0) can be used as a real linux host although it is not really recommended in terms of security. Also it needs a specialized kernel which is not geared towards interactive use (but can be used as such). More or less i am describing something similar to the os of Joanna Rutkowska (qubes-os.org/trac) with the addition that at least one of the VM's is windows with passtrough VGA
    – zeridon
    Jan 15, 2014 at 16:28
  • Oh that looks cool, i'll have to test that :O
    – Cestarian
    Jan 16, 2014 at 19:07
1

This is an experimental thing, not reliably working as of now :

Use kexec. See this SU question.

It's a way to transfer control from one kernel to another. At the very least you can skip 16-bit mode completely.

There's a windows version too.

This will be bleeding-edge of course, but this is the cleanest unless you actually want to use both simultaneously.

1
  • This looks very much like what I was looking for; Next time I revisit this issue (bound to be soon, I'm running Dual-Boot atm) I will try out kexec!
    – Cestarian
    Feb 5, 2014 at 14:25
0

Have you had a look at coLinux? It does basically what you want by running a Linux instance in windows, but without the overhead of a traditional virtual machine.

It's not very easy to setup, and as far as I can see from their website only works with older kernels, but it might be able to do what you want.

0

As Darius commented, using a KVM switch is a very viable option if you have the resources for it. But I have looked for alternatives, and found some.

An alternative to KVM is setting up a dedicated windows computer, hooking it up to the same router/switch as your Linux machine and streaming it which can be done with various tools. I have the most faith in the streaming software Valve(Steam) is currently working on.

Another solution is CoLinux, a good alternative if you're running a 32 bit windows installation, there are however 2 problems with it.

1: It cannot access your GPU directly. (And therefore X needs to be installed on windows, which can be done with Xming or Cygwin/X)

2: I don't see much activity in it's development since 2011, and as such it's growing obsolete fast.

Another is Cygwin, which will allow you to access some Linux programs (including X) on Windows. It's flaw is however that programs need to be ported to it to work, so it'll never support half as many programs as Wine does.

Finally, it's VirtualBox's Seamless Mode, get that + VGA-Passthrough on VirtualBox working and you've got a seamless Linux + Windows setup granted you have capable hardware. Of course if running games is not a big deal then you don't need the VGA-Passthrough part, just enough RAM and CPU power to support both operating systems.

7
  • KVM Switch USB with VGA are around $20 on Newegg. If you need DVI or HDMI, then you may need to fork more money. To be honest, your "time" may worth more than the cost of purchasing KVM switch. But if you believe the time and effort you are putting in does not worth the $20 then go for it. If you want to pursue this also as part of learning, then go for it. Good luck.
    – Darius
    Jan 15, 2014 at 15:51
  • It's not the price of the KVM switch that i worry about, but the price of another computer (However, i've got 3 already) Also, i'm not in the US, KVM switches are about 2-3 times more expensive for me than 20$ here, and if i'd import one i'd have to pay for the importation + taxes of the total of importation + product price. I may in the end use a KVM switch though, but i'm not the only person that is trying to solve this problem, so i answered my own question for the others. Also, personally i think it's worth the effort to try the other solutions, the experience and knowledge are worth it.
    – Cestarian
    Jan 15, 2014 at 16:12
  • You mentioned you have 3.. can't use one of the 3 that is least used to be the linux box (no need to wipe, just dual boot and running primarily on linux until needed otherwise)? Or maybe consider Raspberry Pi ro run Raspbian? (but of course this is another cost to add on top of the KVM).
    – Darius
    Jan 15, 2014 at 16:16
  • Yes, i can, and i possibly will. In fact i already have a really decent one set up with linux that i used to use for school, but i'm not using anymore. Like i said, "for other people than me" KVM switching might not be a viable option due to limited budget.
    – Cestarian
    Jan 15, 2014 at 16:28
  • Lucky! i found a discounted intellinet KVM switch for like 30$ (would've cost 60$) so i guess i will be using a KVM switch, now all i have to figure out is network file and sound sharing.
    – Cestarian
    Jan 15, 2014 at 17:59
0

I think your best bet would be using Windows as main OS and install Cygwin.

But really, what you are asking for can not be done, but this would be the closest I could think of.

Is it gaming that you need to do on Windows? Else most applications has a free alternative. :)

You must log in to answer this question.

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