Thursday, November 18, 2004

Installing Mandrake 10.1 into a VMware Virtual Machine

UPDATED 12-07-2004

Sorry fellow bloggers. This posting is for a few geek friends that are trying to shoehorn Mandrake 10.1 into a
VMware Virtual Machine on Windows XP host (although same probably goes for a Linux host as well).
-----------------------------------------------------------------------------------------------

Getting Mandrake 10.1 CE installed under VMware on a Windows host can be a bit tricky. Although the installation proceeds perfectly normal, getting video afterward that is beyond useful becomes much harder. If you are staring at a funky screen or perhaps an 800x600 256 color resolution, you'll need to install VMware tools and also make a few changes to one configuration file.

Before starting - it will help to boot into a normal VGA situation, otherwise you'll be trying to do work in a funky 4-screen strange looking frame buffer.

Reboot your newly install Mandrake machine and at the boot screen press the ESCAPE key and then type:

linux vga=normal (and obviously press return/enter)

Login as root and then type:

# init 3
# urpmi pciutils
# urpmi kernel-source-2.6-2.6.8.1-12

Note that the kernel sources are required to install vmware-tools.

If URPMI complains during the above, make sure that your cdrom/dvd is mounted or selected by VMWARE in your machine configuration. If it is and it's still not seeing your cdrom/dvd, type:

# mount /dev/cdrom /mnt/cdrom

And then try urpmi pciutils, etc, again. Once you've installed your kernel sources and pciutils...


Go to the VM menu of VMware and choose Install VMware tools. Next...

# mount /dev/cdrom /mnt/cdrom
# cd /mnt/cdrom
# cp vmware-linux-tools.tar.gz /tmp
# cd /tmp
# tar -zxf vmware-linux-tools.tar.gz

#cd /tmp/vmware-tools-distrib/bin

You will next need to use a text editor of your choice, such as vi, joe, nano or maybe pico.

# vi vmware-config-tools.pl

Then, find this bit of code... (if you are using vi and are a newbie, scroll down to around line 3051)

$xversionAll = direct_command(shell_string(xserver4()) . ' -version 2>&1') =~
/XFree86 Version (\d+\.\d+\.?\d*)/ ? $1: '0.0.0';

# The assumption here is that anything from X.org is 4.4.0. We have to do this
# right now because 'X -version' on X.org's server doesn't have a reliable version
# string. Maybe it will once it settles down.
if ($xversionAll eq "0.0.0") {
$xversionAll = direct_command(shell_string(xserver4()) . ' -version 2>&1') =~
/X.org Foundation/ ? '4.4.0' : '0.0.0';


Change the part...

$xversionAll = direct_command(shell_string(xserver4()) . ' -version 2>&1') =~
/XFree86 Version (\d+\.\d+\.?\d*)/ ? $1: '0.0.0';

to...

$xversionAll = direct_command(shell_string(xserver4()) . ' -version 2>&1') =~
/XFree86 Version (\d+\.\d+\.?\d*)/ ? $1: '4.4.0';

Newbie VI note: to delete the '0.0.0' in the above text press the [DEL] key to enter delete mode and delete over the offending numbers. Press [INSERT] key to insert '4.4.0' then press [ESCAPE]; then type ':w!" to force a write and then ':q' to exit

Save the file after making the above edit.


THEN at the root prompt:

# cd ..
# ./vmware-install.pl

You can then just hit enter to everything and accept all of the defaults.

Once the module compiles, you'll be given a choice of screen resolutions to choose. In my case I use 1024x768, and odds are that will work best for most situations. After vmware-config is finished, go ahead and shutdown and reboot. Your video at that point should be normal.

5 Comments:

At Thursday, January 20, 2005 9:48:00 AM, Anonymous Anonymous said...

Soory, the posted failed for me. I installed "all" and the script fails as it needs to fine a complier.

 
At Thursday, January 20, 2005 11:21:00 AM, Anonymous Anonymous said...

Here is what finally worked:
1. When I got to boot loader, I presssed ESC and then type linux vga=normal
Since I got a type mode logon in, I entered my user name a nd password.
2. from the site above, I mounted my cdrom and type in the command
urpmi pciutils. A rpm was installed. I tried to install the kernel sources and they could be found..
3. I rebooted the machine and pressed ESC again and type in linux vga=normal.
4. I made use that the install tools was clicked and ready to go.
5. I mounted the "vmware tools"
6. Then:
cp vmware-linux-tools.tar.gz /tmp
cd /tmp
tar -zxf vmware-linux-tools.tar.gz
7.Then:
cd /tmp/vmware-tools-distrib/bin
vi vmware-config-tools.pl
8. Made the changes im line Approx#3051.
9. Then I ran
./vmware-install.pl
10. The then the fun begin:
The scripted finished. I got message some of the Vmgfs modules needed to be complied. Did I know where the gcc complier was? I said NO. Then I got message that I needed to install gcc, binutils,make and kernel sources.
When I pressed the enter key, I got the screens necessary to setup vmware tools.
Now I an running Mandrake under Vmware 4.52.

 
At Tuesday, January 25, 2005 5:35:00 AM, Anonymous Anonymous said...

original instructions worked a treat, am running mandrake 10.1 on vmware.

why is nothing simple in linux, even something as simple as a text editor has to be made complicated!

 
At Tuesday, January 25, 2005 7:41:00 AM, Anonymous Anonymous said...

If you are using the 6 CD / 1 DVD PowerPack Mandrake install you may need to change the command:

# urpmi kernel-source-2.6-2.6.8.1-12

To:
# urpmi kernel-source-2.6-2.6.8.1-12mdk

Other than that everything else worked fine, thanks for the guide through!

 
At Thursday, April 07, 2005 9:46:00 AM, Anonymous Anonymous said...

Thanks for the excellent walkthrough. For information - under VMWare GSX Server 3.1 build 9089, Windows 2003 host, using Mandrake 10.1 from the DVD iso download, I was getting "Cannot open device /dev/mouse" when I tried "startx". On my system the mouse was /dev/mouse0, so I had to alter /etc/X11/XF86Config to reflect this. After that everything worked fine.

 

Post a Comment

<< Home