在VMware 4.5.1下运行Fedora Core 2(VMware下Fedora 2的显卡配置)
BY:vitter (Vitter@safechina.net)
Our Web:http://www.safechina.net
My Web:http://www.vfocus.net
My Blog:http://blog.vfocus.net主机配置:
P4 2.6G
1024MB RAM
80GB HD
Windows 2000 server SP4 with all updates
VMware 4.5.1 build7568
虚拟机配置:
Fedora Core 2 Test 3 (downloaded .iso files)
"Other Linux 2.6.x Kernel"
256MB RAM
8GB HD (/dev/sda1 = /boot, /dev/sda2 = /)
1GB HD (/dev/sdb1 = <swap>)
安装:
1. 光盘引导。
2. 当出现引导界面的时候,输入"linux vdso=0",这个很重要,不管你是否想用vdso=0,否则VM会崩溃的。
3. 安步骤安装完成,重新引导,将会无法进入图形界面,你可以修改文件使得启机进入init 3模式,重启。
4. 挂载光驱,解压vmware-tools-linux:
mount /dev/cdrom /mnt/cdrom
cp /mnt/cdrom vmware-linux-tools.tar.gz /Vitter
tar –zxvf vmware-linux-tools.tar.gz
5. Unpack vmware-tools包,把下面的vmware.patch文件patch到文件vmwares-tools-distrib/bin/vmware-config-tools.pl里面:
patch -p0 vmware-configtools.pl <vmware.patch
6. 安装vmware-tools,除了问你是否编译vmhgfs module的时候选择NO,其他都安默认安装即可。
7. startx试试看:)
8. 重启,OK
以下是vmware.patch文件:
--- vmware-config-tools.pl.before 2004-05-11 19:51:19.608817712 +0200
+++ vmware-config-tools.pl 2004-05-11 20:55:42.508567688 +0200
@@ -2788,7 +2788,7 @@
}
sub xserver4 {
- return xserver_bin() . '/XFree86';
+ return xserver_bin() . '/Xorg';
}
sub xserver3 {
@@ -2984,7 +2984,7 @@
my $sub;
$xversionAll = direct_command(shell_string(xserver4()) . ' -version 2>&1') =~
- /XFree86 Version (\d+\.\d+\.?\d*)/ ? $1: '0.0.0';
+ /XFree86 Version (\d+\.\d+\.?\d*)/ ? $1: '4.3.0';
# This search order is issued from the XF86Config man page.
if (defined $ENV{'XF86CONFIG'} && file_name_exist($xconfig_path . '/' .
@@ -2994,6 +2994,8 @@
file_name_exist('/usr/X11R6/etc/X11/' . $ENV{'XF86CONFIG'})) {
$xconfig_path = '/usr/X11R6/etc/X11';
$xconfig_file_name = $ENV{'XF86CONFIG'};
+ } elsif (file_name_exist($xconfig_path . '/xorg.conf')) {
+ $xconfig_file_name = 'xorg.conf';
} elsif (file_name_exist($xconfig_path . '/XF86Config-4')) {
$xconfig_file_name = 'XF86Config-4';
} elsif (file_name_exist($xconfig_path . '/XF86Config')) {
@@ -3146,6 +3148,18 @@
$xversionAll);
}
+sub fix_gpm_file {
+ my $gpm_file = '/etc/sysconfig/gpm';
+ if (file_name_exist($gpm_file)) {
+ my %p;
+ undef %p;
+ backup_file_to_restore($gpm_file, 'GPM_FILE');
+ print "Fixing " . $gpm_file . "\n";
+ $p{'^MOUSETYPE="exps2"$'} = 'MOUSETYPE="ms"';
+ internal_sed($gpm_file . $cBackupExtension, $gpm_file, 0, \%p);
+ }
+}
+
sub fix_mouse_file {
my $mouse_file = '/etc/sysconfig/mouse';
#
@@ -3179,6 +3193,8 @@
}
}
}
+ system('touch ' . $mouse_file);
+ fix_gpm_file();
return $enableXImps2;
}
@@ -3499,6 +3515,7 @@
if ($major == 4 && $minor >= 2 &&
file_name_exist($cX4MouseDriverFile)) {
$line =~ s/%MOUSE_DRIVER%/vmmouse/g;
+ $line =~ s-/dev/mouse-/dev/input/mice-;
} else {
$line =~ s/%MOUSE_DRIVER%/mouse/g;
}