Most of my readers are probably firmly in the Microsoft Windows world when it comes to using a computer. What is Microsoft (MS) Windows (in any one of its many incarnations, whose most common and recent members are Windows XP, Windows Vista and Windows 7)? It's the operating system (OS) of the computer - for most people computers aren't very usable without an operating system. The operating system sits on top of the hardware and provides the complete logic for everything you see when running a computer - it connects to and registers various hardware devices while booting, like graphics card, sound card, mouse and monitor, and provides functions like user management, a graphical user interface (GUI), process management, and much more. The operating system does not include things like web browsers, mail programs or office suite programs (yes, there are alternatives to MS Office, see OpenOffice).
There are many other operating systems, some with restricted niche usage (RISC OS), some belonging to museum shelves (Amiga OS), and others are often used in the worlds of servers and computer programming. In recent years the many flavors of Linux have played an important and ever-growing role in this group. As a programmer I have long preferred working with Linux, and my work PCs always had Linux (usually SuSE) as their primary operating system. In particular the command shells in Linux are powerful tools for the programmer, making it easy to perform a variety of programming tasks.
For those (like me) who like or need to work with more than one OS on a single computer, there are couple of possibilities. One possibility (which I had always used on my private PCs) is to install the second OS parallel to the first, and offer a choice at booting which OS should be started. The advantage of this method is that the technology is fairly old and well understood, and the OS being run has access to the full hardware resources of the computer. The disadvantages include the fact that switching OS requires a new boot, and that the necessary change to the MBR (Master Boot Record) of the computer can render certain functions inoperative - for example, while my laptop was configured to dual boot Windows 7 or SuSE 11.2 I couldn't use the suspend to disk function, nor could I perform a full system backup (which gave me the incentive to try the following alternative).
Another possibility is using a so-called Virtual Machine (VM). A virtual machine makes it possible to run another operating system "in a box" within another OS. The programs that make this possible are getting better all the time. There are commercial programs available such as VMWare and there are also free alternatives (at least for private users), such as VirtualBox.
I already knew that my new employer (starting January 3rd) uses CentOS Linux, a variety of Red Hat Linux. Since I have plenty of time this month before starting my new job, I decided to try out CentOS on my laptop, and to circumvent the problems I'd had with my dual boot system by using VirtualBox on a Windows host.
When using a virtualization program we talk about the host system and the guest system. The host system is the system which runs the virtualization program. The guest system is the OS running inside the virtualization program. The guest system then runs inside a window of the host OS, and you can switch between programs operating in both systems with a click.
Finally it's time for a picture. After installing VirtualBox (I have 3.2.12) and starting the programm, you'll see a screen similar to this (click on this image and the following images to see a larger version):
On the left side you see my virtual CentOS, which is running. To establish a new virtual OS you need an installation medium for that OS, such as a CD, DVD or downloaded ISO image. A virtual hard drive for the guest sytem is created on the host hard drive in the form of a .vdi file - this file is not normally readable by the host OS.
I got CentOS 5.5 up and running within a few hours, which I found quite acceptable considering I hadn't done this that way before. This includes wireless networking, which works in a completely transparent way - my wireless card, up and running under Windows, is seen as a normal (virtual) network interface in the guest OS which doesn't need any additional configuration, not even the wireless password.
It's now possible to run the guest system in seamless mode - that means that windows of programs running in the guest OS float like normal windows in the host OS. Here's an example:
Here you can see the open browser window (in Windows 7) where I'm writing this blog post. Overlaying that partially is a command shell window from CentOS. I can click back and forth between the two windows without any other switching overhead. You might notice at the bottom of the screen that the KDE task bar is visible above the Windows task bar - I can choose any running program from either OS.
The alternate to seamless mode has the complete guest OS running within a self-contained window:
Here CentOS is running in the window on the right side of the screen, and all programs running under the CentOS VM are contained within that window. This certainly helps avoid getting confused when switching between the operating systems!
So far I've noticed no unpleasant side effects. I allocated 40 GB of my ample hard drive to CentOS; at the moment I'm giving it only 512 MB of RAM from my 4 GB - if I notice problems when doing heavy compiling I might up that a bit. I made one of my Windows partitions visible to CentOS, so I can open documents and other files if needed from the guest system. Networking was absolutely easy.
In summary - I imagine this post might be a bit boring to some of my regular readers, but I was just so excited about this technical success story I had to share it with you. And maybe expand my readership in the process.
There are many other operating systems, some with restricted niche usage (RISC OS), some belonging to museum shelves (Amiga OS), and others are often used in the worlds of servers and computer programming. In recent years the many flavors of Linux have played an important and ever-growing role in this group. As a programmer I have long preferred working with Linux, and my work PCs always had Linux (usually SuSE) as their primary operating system. In particular the command shells in Linux are powerful tools for the programmer, making it easy to perform a variety of programming tasks.
For those (like me) who like or need to work with more than one OS on a single computer, there are couple of possibilities. One possibility (which I had always used on my private PCs) is to install the second OS parallel to the first, and offer a choice at booting which OS should be started. The advantage of this method is that the technology is fairly old and well understood, and the OS being run has access to the full hardware resources of the computer. The disadvantages include the fact that switching OS requires a new boot, and that the necessary change to the MBR (Master Boot Record) of the computer can render certain functions inoperative - for example, while my laptop was configured to dual boot Windows 7 or SuSE 11.2 I couldn't use the suspend to disk function, nor could I perform a full system backup (which gave me the incentive to try the following alternative).
Another possibility is using a so-called Virtual Machine (VM). A virtual machine makes it possible to run another operating system "in a box" within another OS. The programs that make this possible are getting better all the time. There are commercial programs available such as VMWare and there are also free alternatives (at least for private users), such as VirtualBox.
I already knew that my new employer (starting January 3rd) uses CentOS Linux, a variety of Red Hat Linux. Since I have plenty of time this month before starting my new job, I decided to try out CentOS on my laptop, and to circumvent the problems I'd had with my dual boot system by using VirtualBox on a Windows host.
When using a virtualization program we talk about the host system and the guest system. The host system is the system which runs the virtualization program. The guest system is the OS running inside the virtualization program. The guest system then runs inside a window of the host OS, and you can switch between programs operating in both systems with a click.
Finally it's time for a picture. After installing VirtualBox (I have 3.2.12) and starting the programm, you'll see a screen similar to this (click on this image and the following images to see a larger version):
On the left side you see my virtual CentOS, which is running. To establish a new virtual OS you need an installation medium for that OS, such as a CD, DVD or downloaded ISO image. A virtual hard drive for the guest sytem is created on the host hard drive in the form of a .vdi file - this file is not normally readable by the host OS.
I got CentOS 5.5 up and running within a few hours, which I found quite acceptable considering I hadn't done this that way before. This includes wireless networking, which works in a completely transparent way - my wireless card, up and running under Windows, is seen as a normal (virtual) network interface in the guest OS which doesn't need any additional configuration, not even the wireless password.
It's now possible to run the guest system in seamless mode - that means that windows of programs running in the guest OS float like normal windows in the host OS. Here's an example:
Here you can see the open browser window (in Windows 7) where I'm writing this blog post. Overlaying that partially is a command shell window from CentOS. I can click back and forth between the two windows without any other switching overhead. You might notice at the bottom of the screen that the KDE task bar is visible above the Windows task bar - I can choose any running program from either OS.
The alternate to seamless mode has the complete guest OS running within a self-contained window:
Here CentOS is running in the window on the right side of the screen, and all programs running under the CentOS VM are contained within that window. This certainly helps avoid getting confused when switching between the operating systems!
So far I've noticed no unpleasant side effects. I allocated 40 GB of my ample hard drive to CentOS; at the moment I'm giving it only 512 MB of RAM from my 4 GB - if I notice problems when doing heavy compiling I might up that a bit. I made one of my Windows partitions visible to CentOS, so I can open documents and other files if needed from the guest system. Networking was absolutely easy.
In summary - I imagine this post might be a bit boring to some of my regular readers, but I was just so excited about this technical success story I had to share it with you. And maybe expand my readership in the process.
Comments