Why?
Running multiple operating systems on one computer couples the
strengths and capabilities of those OS’s while
requiring that you only buy one computer. Who
hasn’t been running one OS and wished that they could run a program that only runs under another? Who hasn’t experienced an OS problem and
wished they
could boot into another system to resolve it?
In
computer refurbishing, running multiple OS’s allows you to
combine the strengths of an existing Windows install with those of open
source. Case in point: Windows XP is aging but still has
active forums,
tons of how-to websites, great ease-of-use, thousands of applications,
and drivers for every device. Keeping it retains the original
software license, the installed applications, and the existing drivers.
(Past articles have described how to secure and
performance tune mature Windows systems.)
Add a Linux distribution and you gain all the
benefits of open source software — a free and currently supported operating
system,
a state-of-the-art OS that runs on older hardware
than Windows 7 or Vista, security without anti-malware overhead, and
tons of free applications. A well-chosen distro greatly
expands the capabilities of an aging Windows computer.
Here are the ways to run multiple operating systems on a single system …
Live CDs and Live DVDs
Live CDs and Live DVDs allow you to easily boot and run alternate
operating systems. Just download a bootable OS image, burn it to disk,
set your computer to boot from the optical disc drive, and you’re
off
and running.
One big benefit to Live CDs is that you’re guaranteed a
malware-free OS. Some experts
now recommend
against doing your banking and finances online, or they say you should
not use Windows if you do. Live CDs offer higher security for online
banking. Every time you boot from the Live CD you initialize a
fresh uncontaminated system, because the read-only disc can not be
altered by malware. (Of course the original Live CD has to be virus-free but I have yet to hear of such contamination.)
You don’t have to alter anything on your existing hard disks to run a
Live
CD. No fiddling with partitions. You don’t even have to mount your internal disk.
Live CDs are a risk-free way to try out and play with as
many different OS’s as you’re willing to burn CDs for.
Whether you’ll be happy with the performance of running an OS from CD
or DVD depends on the speed of your optical drive and the OS you run.
Most people are satisfied using current optical drives, even for
full-sized Linux distributions that continually access the disc while
running. If you’re refurbishing an old computer
and frequently run live CDs, check the speed of your
optical drive and get a newer one if you need to. Drive speed has
dramatically increased over the past
decade.
Another trick is to use a distro that runs entirely from memory and
never accesses the CD/DVD or hard disk after booting. Puppy Linux, for
example, runs entirely in memory
on systems having just 256 M or more. It performs well even on
older computers. After booting you can use the CD drive for purposes
other than running the OS. The only small drawback is the startup time it
takes for the CD or DVD to initially load the OS into memory.
Live USBs
Live USBs are a
variant on the Live CD/DVD concept. In this case you use a USB memory
stick, flash drive, or USB external disk drive to boot and run the
operating system.
Like live CD and DVDs, live USBs are portable. You can boot an
OS once this way to try it out, or you can work this way
regularly. USBs offer writeable, persistent storage. Memory sticks have
no moving parts so
they have better access times than optical discs.
The big
downside to USBs is that many older systems won’t boot from
them. This is a BIOS
limitation. Circumvent it by using a boot
manager that boots the computer from a device your BIOS supports, then
immediately switches
control to the USB device. PLoP is one free boot manager. Another potential downside to USB booting is shortened lifespans
for USB memory, due to its constant use as the OS resident media.
Virtual Machines
Desktop virtualization
has matured in the past five years. Hardware
technologies like Intel’s VT-x
and AMD’s AMD-V
underlie and improve it. These were introduced in 2005 and 2006, respectively.
This chart lists
and compares platform virtualization software. Oracle VM VirtualBox
is probably the most popular free offering for personal use. Once owned
by Sun
Microsystems, the product was taken over by Oracle with their
acquisition of Sun in January 2010.
VirtualBox installs under an
existing host operating system,
then creates one or more virtual
machines in which various guest
operating systems
run. The possible host includes most popular operating systems, such as
Windows
7, Vista, Windows XP, Linux, Mac OS X, Solaris, and some BSD versions.
Guests
include all
the host systems plus even some lesser known contenders, like Haiku,
OS/2 Warp, Syllable, SkyOS, ReactOS, and the rest of the Windows and
BSD versions.
VirtualBox offers all the advantages of platform
virtualization. These include
the abilities to:
- Securely run more than one OS at a time
- Flip between the systems as you like
- Start, stop, and pause the systems independently
- Communicate between systems through several mechanisms
- Dynamically allocate and switch processor and memory resources
among the systems
- Make an image of a current system state for backup/restore by taking a snapshot
VirtualBox does not require CPU-based virtualization support (VT-x
or AMD-V). But it does require the cumulative resources to run all the
OS’s you want to at one time. Thus it may not be an option for
some refurbished computers. If your computer supports it,
virtualization is a great way to go. Get
started with VirtualBox with tutorials from here
and here. Visit the official VirtualBox website here.
Co-Installing to Disk
If virtualization and Live CDs don’t appeal, you can
always go the traditional route and install more than one operating
system to disk.
Assuming the computer already runs Windows and you want
to co-install a Linux distro, the typical procedure is:
- Boot the Live Linux CD for the product you want to install
- Shrink the Windows partition to create sufficient space for the
Linux install
- Create a new Linux partition in the newly-released space
- Optionally create a swap partition for Linux virtual memory
- Install Linux into the new Linux partition
- Install a tool like GRUB or LILO to display an OS selection menu
upon system start-up
- Reboot and verify the OS selection menu and the new Linux install
Let’s walk through the steps.
First you boot a Live CD or DVD for the Linux you want to
install. This allows you to test and ensure the distro drives all your
computer’s devices and works the way you want — before you install anything. It also creates a
working environment from which you can perform
the subsequent steps. Most distros provide the partition
management and boot control tools you’ll need. Ubuntu and Puppy
Linux, for
example, both offer Live CDs that bundle the GParted partition
manager and the GRUB boot-selection
tool.
Assuming the computer came with a single disk with Windows installed,
you’ll probably need to shrink the Windows partition to make room for
Linux. How much space Linux requires depends on the distribution. A
small Linux like Puppy installs easily in a gigabyte or even
500 megabytes, while a full-sized Linux like Ubuntu typically requires
anywhere from three to eight gigabytes.
Beyond the operating system partition, you may also want to create a swap partition.
Linux uses this disk space for extra memory (or virtual memory)
if real memory runs out. Do you need a swap partition? Think of it this
way. What is the maximum size of memory you’ll require for the Linux
operating system plus the maximum number of applications you’ll have
open at one time? If this amount is greater than the size of real
memory, you need a swap partition to make up the difference.
Since users run different distros and use their computers in
different ways, it’s not possible to devise an all purpose
rule-of-thumb for sizing swap space. Running typical home and office applications, for
example, I never use the swap if the computer has at least 1 gigabyte
of RAM. Specialized applications change this recommendation. For
example, when I do database testing and research, even computers with
several gigabytes need swap space.
The
next step to installing Linux on a Windows computer is to ensure you
have some free disk space on which to install Linux. You may have to
reduce the size of the Windows partition on a single-disk Windows
system because, by default, many
vendors still pre-install Windows
to consume the entire disk.
It’s wise to run a Windows Disk Check prior to shrinking the Windows
partition to ensure file system integrity. Then use the GParted Linux tool to shrink the Windows partition.
You do not need to run the
Windows defragmentation utility prior to this operation — contrary to
what you might read elsewhere on the web. GParted successfully shrinks NTFS partitions regardless of whether they have been defragmented.
At this point you have a target partition ready into which to
install Linux, and optionally, a swap partition. Now you can install
Linux. Most
Live Linuxes have an “install icon” on their desktop that you click to
start the
install
process. Although I’ve discussed getting the partitions ready prior to
running this install tool, many Linuxes (such as Ubuntu),
bundle the
partition management tool as a step within their standard install
process.
In other words, you can either manually do the partition management in
advance, or do it while you run the Linux distro installer.
Here’s an example of GParted in action. This screenshot shows what you
can do with multiple operating systems even on an old refurbished test machine with two tiny 40G disks. This
system has four operating systems
installed on its primary drive. This includes a 13.67 gigabyte NTFS
partition with the original
Windows XP SP3 install. Then there are Linux partitions for Ubuntu,
Puppy, and Vector Linux. The
single Swap partition of about 510 M
services
whichever Linux runs. A second 40G disk drive (not shown), contains
three more Linux distros, three backup partitions, and a BSD variant. Quite a lot of action for an old computer!
An Example GParted Screen
The first line in the above display is a FAT32 partition on which all
user
data resides. Storing user data apart from any of the
operating system partitions is wise because it segregates data from the
operating systems. This makes it easy to identify and back up user
data. Moreover, the user data remains
unaffected regardless of what changes you make to any of the
operating systems or their partitions. Should an “OS disaster” occur
it’s unlikely that data on its own partition will be affected.
It
is unfortunate that many
consumer computers by default still store user data on a single
Windows partition that consumes the entire disk. This practice is a
hold-over from the days when
disks were smaller and it doesn’t leverage the advantages of
today’s
larger disks. With big SATA drives it makes
much more sense to segregate data and OS partitions. I know some people
who even separate out certain kinds of data files into their own
partitions. For example, you might have a “multimedia partition” for
photographs, music, or videos. This makes it easy to separately manage
large data
files. Or segregate your work from your play by creating an “office
partition” for office suite documents. Easy partitioning makes it
possible to organize your system in the way that works best for you.
When adding Linux to a Windows computer, you’ll install a boot manager,
In Ubuntu and Puppy,
this is an option in the last step in the install process. GRUB takes
over the master
boot record or
MBR on the computer’s disk and inserts code that displays a menu
to select any of
the resident operating systems when you start the computer.
Don’t worry
about your existing Windows being bootable. GRUB is very good at automatically
detecting any operating systems already on your hard disk. It generates
the necessary code to make them boot-time selections. So GRUB will find
Windows and automatically place it in your new boot-time OS selection
menu.
When the install is complete, reboot your computer and you’ll see GRUB’s menu with options to enter either
Windows or Linux. Try both out to ensure everything works
ok, and you’re done. Voila! Multiple OS’s on your computer.
Once you’ve gotten everything working, you might want to make
the boot-time OS selection menu more readable. If you used GRUB,
just edit the
file menu.lst in the /boot/grub folder. (Save the original menu.lst
file first as a backup!) If your Linux distro uses the newer GRUB 2,
well, there are many advantages to this new boot loader, but easy
changes to the boot menu is not among them. See this excellent tutorial
for help. It’s too bad that GRUB 2 is a step backwards for ease of use,
especially since it would have been easy for the product to use a menu.lst file if present and convert it to the required internal code.
This has been one thing I’ve been doing for years. To me, it’s always a good idea to have at least two OSes on machine, because you never know what might happen to cause an OS to go awry.
Also, good article, it was a very nice read.
I think that’s a bit of a wasteful reason to dual boot as live CDs and bootable USB keys have been around for years.
Personally though, I dual boot my main laptop:
* Win7 for audio producing
* ArchLinux for everything else
Similar hear
Desktop; 95% booted into Debian, haven’t been gaming as much and nothing else Win needs that kind of direct hardware access for my needs.
– hostos Debian
– guestos WinXP Workstation
– guestos Debian Server
– guestos [various pentargets]
– guestos [various OS of interest]
– guestos [skeleton VM for booting liveCD]
– hostos WinXP
– guestos Debian
Notebook; 95% booted into Debian with Win7 for testing and exploration. Any real Win based work gets done in the winXP vm (running Outlook and connecting to the corp VPN).
– Win7 enc
– Debian enc
– WinXP enc
– Debian server development builds
Palmtop; 99% booted into Maemo4 tweaked with a factory fresh bootable partition and my older Maemo3 prior to upgrading the OS. Haven’t played with Debian, ubuntu or other alternative OS on it yet.
– Maemo4 clean
– Maemo3 built out
– maemo4 built out
Actually, the one thing attractive about Apple hardware is the ability to legitimately run osX; my notebook would instantly become a triple boot; maybe even add a Backtrack bootable partition as number four.
Personally, I use sata drive bays and esata drive bays. I have several of these:
http://www.newegg.com/Product/Product.aspx?Item=N82E16817153071&cm_…
In my towers, I have usually two of these installed:
http://www.newegg.com/Product/Product.aspx?Item=N82E16817994057
Then I kept the drives out of my old file server, since they were all sata. I can load anything on the drive I want and boot it on any machine I have. Works well for playing with different OS’s. Virtualization works well also, however, I tend to be interested in the hypervisors as much as anything, so I kind of need to run a lot of things on the actual hardware.
I have been using slide out drive bays for at least 10 years. I have a disk fixed in the case for my files and change out my oses (Windows/Linux/BSD/Open Solaris) as needed.
VMs really killed that setup for me but I originally started with IDE drive boxes in the family shared computer; I was allowed to muck about provided I didn’t break the family machine..
Fantastically handy to be able to just swap out a box like that though. Nice setup keeping the data drive in place also.
At one point I had a n issue with the windows programs that allow the reading of ext 2/3 because the ext 2/3 partitions were on LVM. That also needs to be understood by programs.
For users of eComStation / IBM OS/2 Warp
here is the collection of reviews how to install eCS inside VMs, how to install other OSes to Virtual Machines available in eComStation — http://en.ecomstation.ru/software/?action=vm
…you can install each OS on it’s own disk and use your BIOS’ boot menu to select what OS to boot. The upshot of this is that you don’t have to worry about the different OS’ clobbering each others partitions and you don’t have to fiddle around with a boot manager. On the other hand, it probably doesn’t look as fancy as a boot manager.
Not sure if this fits the article where you mostly talk about refurbished PC’s, but you can also run Linux as a Windows-process:
http://www.colinux.org/
There is also a packages version of Ubuntu where you can run the Ubuntu-desktop applications in a window on Windows:
http://www.andlinux.org/
Thanks for those links, I had never heard of those projects. Makes for something fun to play with!
The hardest part is setting up the networking.
And some of the documentation shows the old methods and other documentation shows the new methods.
One has an XML-based configuration file to other is a much simpler and does not use XML.
Note that coLinux works with 32 bit Vista/XP/Win7 only. This shouldn’t be an issue on older hardware, as there’s no good reason to install a 64bit OS – but it’s something to be aware of.
Apparently porting coLinux to 64bit is a non-trivial task. I’ve really missed coLinux the last few years.
“One big benefit to Live CDs is that you’re guaranteed a malware-free OS.”
Just for the record: If the Live CD or Live DVD image contains malware (e.g. by malicious design), then this is not the case.
For the record: If the Live CD or Live DVD image is made from open source it can be verified. If it is verifiable by anyone and widely distributed then someone somewhere will verify it, and “blow the whistle” if they find it to contain malware (or indeed anything at all which it shouldn’t).
Outcome: If the Live CD or Live DVD image is made from open source and it has been widely distributed for some time, there is a very high assurance that it does not contain malware.
I whole-heartedly agree. However, “probable” and “possible” are not the same thing. Bad things happen when we assume we are safe, and malware creators bank on that.
Don’t forget that since Version 3 of Player, VMware Player has the same feature set as VMware Fusion and is able to create virtual machines, import Windows XP mode and more.
http://en.wikipedia.org/wiki/VMware_Player
Disclosure: I work at VMware, but any opinions here are my own.
Indeed. I personally like VMware, it’s pretty fast, it’s got lots of usability-enchancing features, and it’s stable. Not to mention that VMware Player is great for simply running another OS without all the bells and whistles of the full-blown interface of Workstation.
Make it work with Debian.
VMware really was my introduction to virtualization and is fantastic at what it does but not being able to install VMware Server 2 on Debian 5 or 6 was the deal breaker. I was on the verge of buying VM Workstation based on it shipping a working Linux native build but couldn’t confirm that it would work any better with Debian. When Virtualbox delivered easy bridged network device setup the competition got me.
VMware (Server edition at least) still has the advantage of easy “boot at host startup” settings for VMs where Virtualbox prefers to run them inside a user session.
Debian is not obscure enough a distribution to not be supported though; especially if Ubuntu can be, according to the download site.
USB thumb drives are now so cheap that it doesn’t matter if they don’t survive a huge number of write cycles.
It depends on what data you store on them Having backups for a liveUSB voids a bit the point of the whole thing, but storing a single copy of important data on flash memory is never a wise thing to do.
Edited 2011-02-04 07:06 UTC
I meant they are great for cheap bootable drive. I would never use one as a critical backup drive.
You probably not. Having seen how flash memory can die after a short life without a single warning or sign of wear, I wouldn’t either.
But as soon as other people start installing OSs on flash drives, using them regularily, and saving data on them, they are at risk of losing important data in a blink of the eye unless they think about backing up the thing. This is one of the reasons why I don’t know how I feel about liveUSBs…
This should have been “of an existing Windows install”.
menu.lst is part of GRUB1. Many OS’es have switched to GRUB2. If available, install GRUB CUNSTOMIZER. If you use Synaptic, here is what you have to do:
in terminal: sudo add-apt-repository ppa:danielrichter2007/grub-customizer
then you can update using synaptic GUI or with the command: sudo apt-get-update and sudo apt-get install grub-customizer.
GOOD LUCK.
I too prefer to do my linux installs on a separate disk, then use the BIOS boot menu to choose the proper disk. Make sure to install the boot loader to the linux disk.
This keeps the main Windows disk un-touched.
I’ve had mixed success in the past modifying the windows partition and adding boot managers to the master boot record.