Unix on a PC
This page gives suggestions for installing some form of Unix on a
Windows machine so that you can work on your CIS 15 assignments at
home.
It is a combination of things I've tried, and suggestions from
graduate students in our research group.
There are basically four options:
- Partition: split the hard drive into two "sides" so that
you have a Windows "side" (partition) and a Linux partition; when you boot up
the machine, you decide which partition you want to use (this is
controlled by software called a boot manager). You can set
this up so that the Linx partition can see files from the Windows
partition. However, the Windows partition cannot see files that are on
the Linux partition.
This is what I do.
- Virtual machine: install software that lets you run Linux
from within Windows.
- Cygwin: a PC application that pretends to be (a small
installation) of Unix. Similar to using a virtual machine, but maybe a
bit simpler to set up.
- Live CD: run Linux from a CD, without installing anything
on your computer; it will be slower and won't be a complete version of
Linux, but will be enough for what we do in cis15.
You can also do away with Windows altogether and install Linux on your
PC, but I suggest that you use one of the three options above first,
use Linux for a while and then decide if it suits all your computing
needs.
There are various options for each of these, and then of course you'll
need to pick which version of Linux to use.
The one that is most recommended is Ubuntu, which you can
download for free here:
---- http://www.ubuntu.com/
Option 1: PARTITIONING YOUR HARD DRIVE
There are several choices of software to use for partitioning your
hard drive. The most recommended are listed below.
One is not free; the others are free.
Pick one.
- PartitionMagic, made by Symantec, is recommended
as probably the safest tool for resizing Windows partitions and is the one I have used in the past.
It's $69.95 available here:
---- http://www.symantec.com/norton/products/overview.jsp?pcid=sp&pvid=pm80.
- GParted is free; it claims to be able to do the same things as
Partition Magic and is recommended by several of my students.
You can download it here (or see below):
---- http://gparted.sourceforge.net/documentation.php
Note that GParted is different from Gnu Parted, which says that it
cannot resize NTFS partitions.
- SystemRescueCd is free and contians GParted and other
useful utilities. You can download it here:
---- http://www.sysresccd.org/Main_Page
It is a Linux LiveCD so you can boot directly from the CD even if you don't
have Linux installed yet, or even if you have NO working OS on the hard
disk. It includes both Gparted and Gnu Parted as well as PartImage which is
sort of a Norton Ghost clone -- very useful for backing up entire
partitions, as well as some other nice tools.
For anyone whose Windows installation is filled with junk, viruses & who
knows what, this is a good opportunity to back-up any data worth saving,
reformat the entire disk & do a clean new installation of Windows, but that
is of course optional.
Below, you'll find general instructions for
partitioning your hard drive and setting up a "dual boot" system with
Linux on one side and Windows on the other.
After you partition your drive, you can install a "boot manager" to
manage which partition is chosen when the computer boots up.
GAG is a free one that is recommended:
---- http://gag.sourceforge.net/
But don't do this unless you are unhappy with the default boot
manager that is installed when you do the partitioning, above.
Option 2: USING A VIRTUAL MACHINE
Again, there are many choices here.
You can find a comparison on Wikipedia:
---- http://en.wikipedia.org/wiki/Comparison_of_virtual_machines
The simplest option recommended by our students is VMware Player.
- You can download the player software here:
---- http://www.vmware.com/download/player/
- You only need two files to use the player:
(1) a disk image and (2) a machine configuration file.
For instructions, go here (read below first):
---- http://www.ffnn.nl/pages/articles/linux/vmware-player-image-creation.php
- (1) disk image:
follow the instructions to download an empty "VMWare Player Image" on
the above page.
- (2) machine configuration file:
follow the instructions to download the "VMWare Player Virtual Machine
Template for Windows operating systems".
Then read on in the article for instructions on how to configure the
template, which you should edit in a text
editor like NotePad (NOT a word processor like Microsoft Word!).
Installation of Linux should then be as simple as downloading the CD
install disc and mounting it on the VM. Starting the VM should then boot
up the disc and installation can begin on that machine.
Option 3: CYGWIN
This is probably the simplest thing to do. The Unix you get is less
capable than any of the others, but it will be sufficient for CIS 15.
- Go to the Cygwin homepage.
- Click on the Install Cygwin icon in the top right corner of the page.
- Run the setup.exe file that you download.
Note that you have to be online for this: the setup program downloads
a bunch of files that Cygwin needs.)
- When setup asks you questions, you can accept most of the default
answer, BUT, you need to make sure that you download g++
otherwise you won't have a compiler. One way to make sure that happens
is to download all packages (but that eats a lot of your hard
drive).
With Cygwin I suggest that you also install a version of Xemacs (a
variant of Emacs):
- Download the setup tool for Xemacs.
- As for installing Cygwin, you run the setup tool while online, and make the default answers to any questions it asks you.
After installation you should have two new icons in your
Programs menu (and probably on your desktop), one for Cygwin,
and one for Xemacs.
Starting up Cygwin will give you something that looks like the
Terminal from OSX.
Starting up Xemacs will give you something that looks like Emacs
(though with more menus and an interface that works nicely with a
mouse).
If you can't get g++ to run under Cygwin, then:
- Double check that you downloaded g++.
- Add c:/cygwin/bin to the PATH environment variable
(assuming that is the location of the bin directory).
Option 4: LIVE CD
Again, another large set of choices.
A list is available here:
---- http://www.frozentech.com/content/livecd.php
The top vote-getter on the list is called "SLAX" (from Slacker Linux)
and is available here:
---- http://www.slax.org/
General instructions for setting up a dual boot system, if you
choose the partitioning option
Here are some suggestions for setting up a dual boot system, assuming
Windows is already installed as the only OS and occupies the entire hard
disk as Drive C:
- If this is a pre-existing Windows installation that you want to
keep,
do a complete backup!!!
This process is "usually" very clean &
painless but things happen ... PartImage (on the SystemRescueCD, above) is
an excellent way to do this. You might also consider making a
completely separate backup of your music, video and other data files
segregated from the Windows system and program files -- see step 3.
- Use Gparted or PartitionMagic to shrink the C partition down to the
desired size -- how big obviously depends on the size of the disk and the
size of the programs, data, etc. in the Windows partition.
- Use Gparted or PartitionMagic to set up an Extended partition on the rest
of the drive. In that Extended partition, create a Linux Swap Partition
(twice the size of system RAM is a good rule of thumb), a Linux Partition
for the root file system (/), optionally, a separate Linux Partition for the
users' /home directories, and optionally, a FAT32 partition which can be
used to store files that you want to be accessible to both Windows and
Linux. Note that this allows you to make the Windows "C" partition much
smaller that it would otherwise have to be -- use this extended partition to
hold multimedia & other data files that take up a lot of space.
- Reboot & make sure Windows still works.
- Install Linux. At the end of the installation process, let it install
GRUB boot loader to the MBR of the disk -- when it boots, it will give a
menu allowing choice of which OS to boot, and either one can be set as the
default.