Installing CentOS v5.2 in Virtual PC 2007

I am still a big fan of Microsoft Virtual PC 2007 (VPC) as a solution for experimenting with various operating systems.  If a machine is running Windows, you can go and download VPC 2007 for free … and then simply create a virtual machine, and run the OS of your choice in a window.

Well … almost.  The issue comes down to compatibility with the “virtual” hardware.  Lately, I have found that many of the Linux distributions make no effort to ensure that their releases install easily in VPC.  I’ll address that in another post.

Today I again wanted to test a new distro – CentOS v5.2 – in VPC and when I started the graphical install I was met with the same old issues. Immediately I get a completely distorted graphical screen … which is one of the most common issues.  It turns out that for host memory considerations, the “virtual video card” in VPC is limited to 8MB of video memory.  This time I chose to find a better, easier solution … and I did.

Bad Video Card settings in CentOS Install

Bad Video Card settings in CentOS Install

Poking around Google I was able to find this post that gave me the answer.  It turns out that there is a kernel parameter that can be set to force the limit on the size of the VESA video frame buffer.

vesafb=vtotal:8M

I gave it a try, and it worked!  Of course, once I got through that, I got to the next most common issue that I hit … the mouse wouldn’t work.  Back to Google to find that fix again.  I found it here.  There are two simple parameters to add … one for the mouse, and the second to have the wheel work.

i8042.noloop psmouse.proto=imps

The first part fixes the mouse … the second is for the wheel.

So how do you use all of this information?  It’s really simple.  When you boot the CD or DVD to install CentOS v5.2, you’ll get to this screen:

CentOS Install Menu

CentOS Install Menu

Once you get here, simply type:

linux vesafb=vtotal:8M i8042.noloop psmouse.proto=imps

Hit Enter and you are off and going!

Now, when the installation was complete and I rebooted I was surprised to find that the video was still working.  I didn’t have to do anything else.  BUT … the mouse was again not working.  The trick is to interrupt the GRUB boot loader, and edit the settings of the kernel line.  So when the system boots, and gives you chance to “Press any key to enter the menu” … hit any key!

You’ll then be presented with the GRUB menu, and you can then:

  1. Hit ‘e’ to edit the highlighted CentOS entry
  2. Arrow down to the lines that starts with “kernel” and hit ‘e’ again
  3. Add the following to the end of the line:  i8042.noloop psmouse.proto=imps
  4. Hit enter
  5. Type ‘b’ for boot

That will get you booted and running.

To make the change permanent, you’ll have to edit the grub.conf file as follows:

  1. Login as root (or you can use sudo if you have set up teh sudoers file.)
  2. Open grub.conf in an editor of your choice (e.g. nano /etc/grub.conf)
  3. Once again look for that “kernel” line … go to the end of the line
  4. Add the following to the end:  i8042.noloop psmouse.proto=imps
  5. Save the file and exit.

After all of this, I have a working CentOS v5.2 in Virtual PC 2007.  Well … except that I have no audio working.  It now appears that CentOS v5.2 does not include the “snd-sb16” sound card driver.  I found that I can get the sources to build the drivers from the alsa-project.org website … but that is something that will occur on another day.  🙂