I am LAZY bones?
AN ancient AND boring SITE

分类: '故障分析' 的归档

再次证明安装windows比安装linux要麻烦

前几天在我的“ubuntu根分区迁移历程”一文中曾指出了windows安装比linux难的例子,这个主要是因为windows需要安装在主分区上,而且必须要往硬盘的第一个主分区里面写点数据,如果你不幸吧第一个主分区弄成ext3等格式的话,你可能就得多花点力气了。

而最近我又发现安装windows的另一个麻烦事,经过是这样的:
由于最近我换家公司,到了新的工作环境后第一件要做的事情也许就是重装系统,因为电脑的前主人留下个乱乱的win2000,实在是不能忍受,所以就决定全部重装,这回吸收了教训,打算先装win再装ubuntu,拿了windows的安装盘(向同事借的番茄家园),开机进bios,设置光驱启动。重启以后进入安装选择的选择页面了,但是现在问题出现了,我不管怎么按键盘鼠标,都没有反映,仿佛失灵了一样。随着倒计时的用尽,机器又进了默认的“硬盘启动”,但是奇怪的是进了原来那个win2000系统后,键盘鼠标却又一切正常了!纳闷间,忽然发现,我的键盘和鼠标都是USB接口的,难道和这个有关?google了一下之后,发现果然就是这样原因,解决的办法就是修改bios设置,打开usb键盘鼠标的支持。于是马上重启,进bios找到相应选项,设置正确后,再次重启,进入选择页面后果然可以了,然后就选择“手动安装windows XP SP2”,原以外之后就会一切正常了,但是我却高兴得太早了。一些初始化之后,到了选择安装分区的那步了,发现键盘再次失灵!原因是由于此时键盘已经由windows安装程序驱动,不再受bios的管辖,而windows安装程序又没有强大到支持所有的USB键盘,结果可想而知,只能按重启键了。后来不得已向同事借了个Ps/2接口的键盘,才算搞定!
后来我抱着试试看的态度,再换上我的USB键盘,安装ubuntu 7.04,结果发现居然完全没有问题!!安装过程相当简单!

结论:
1.谁说windows安装容易,上手容易!如果当时我身边没有PS/2的键盘,还真不知道该怎么办了!
2.下次如果买电脑,还是得买PS/2的键盘。

ubuntu升级到7.04以后,vmware不能重新配置的解决办法:

vmware原先是在6.10下安装的,6.10下运行没问题。系统升级后,重新配置,出现如下错误:

代码:
#
lly@lly:~$ sudo vmware-config.pl
#
Making sure services for VMware Workstation are stopped.
#

#
Stopping VMware services:
#
Virtual machine monitor done
#
Bridged networking on /dev/vmnet0 done
#
DHCP server on /dev/vmnet1 done
#
Host-only networking on /dev/vmnet1 done
#
DHCP server on /dev/vmnet8 done
#
NAT service on /dev/vmnet8 done
#
Host-only networking on /dev/vmnet8 done
#
Virtual ethernet done
#

#
Configuring fallback GTK+ 2.4 libraries.
#

#
In which directory do you want to install the mime type icons?
#
[/usr/share/icons]
#

#
What directory contains your desktop menu entry files? These files have a
#
.desktop file extension. [/usr/share/applications]
#

#
In which directory do you want to install the application’s icon?
#
[/usr/share/pixmaps]
#
#
/usr/share/applications/vmware-workstation.desktop: warning: The ‘Application’ category is not defined by the desktop entry specification. Please use one of “AudioVideo”, “Audio”, “Video”, “Development”, “Education”, “Game”, “Graphics”, “Network”, “Office”, “Settings”, “System”, “Utility” instead
#
/usr/share/applications/vmware-player.desktop: warning: The ‘Application’ category is not defined by the desktop entry specification. Please use one of “AudioVideo”, “Audio”, “Video”, “Development”, “Education”, “Game”, “Graphics”, “Network”, “Office”, “Settings”, “System”, “Utility” instead
#
Trying to find a suitable vmmon module for your running kernel.
#
#
None of the pre-built vmmon modules for VMware Workstation is suitable for your
#
running kernel. Do you want this program to try to build the vmmon module for
#
your system (you need to have a C compiler installed on your system)? [yes]
#
#
Using compiler “/usr/bin/gcc”. Use environment variable CC to override.
#
#
What is the location of the directory of C header files that match your running
#
kernel? [/lib/modules/2.6.20-15-generic/build/include] /usr/src/linux-headers-2.6.20-15-generic/include
#
#
Extracting the sources of the vmmon module.
#
#
Building the vmmon module.
#
#
Using 2.6.x kernel build system.
#
make: Entering directory /tmp/vmware-config1/vmmon-only'
#
make -C /usr/src/linux-headers-2.6.20-15-generic/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
#
make[1]: Entering directory
/usr/src/linux-headers-2.6.20-15-generic’
#
CC [M] /tmp/vmware-config1/vmmon-only/linux/driver.o
#
In file included from /tmp/vmware-config1/vmmon-only/linux/driver.c:80:
#
/tmp/vmware-config1/vmmon-only/./include/compat_kernel.h:21: 错误: expected declaration specifiers or ‘…’ before ‘compat_exit’
#
/tmp/vmware-config1/vmmon-only/./include/compat_kernel.h:21: 错误: expected declaration specifiers or ‘…’ before ‘exit_code’
#
/tmp/vmware-config1/vmmon-only/./include/compat_kernel.h:21: 警告: 在 ‘_syscall1’ 的声明中,类型默认为 ‘int’
#
make[2]: *** [/tmp/vmware-config1/vmmon-only/linux/driver.o] 错误 1
#
make[1]: *** [_module_/tmp/vmware-config1/vmmon-only] 错误 2
#
make[1]: Leaving directory /usr/src/linux-headers-2.6.20-15-generic'
#
make: *** [vmmon.ko] 错误 2
#
make: Leaving directory
/tmp/vmware-config1/vmmon-only’
#
Unable to build the vmmon module.
#
#
For more information on how to troubleshoot module-related problems, please
#
visit our Web site at “http://www.vmware.com/download/modules/modules.html” and
#
“http://www.vmware.com/support/reference/linux/prebuilt_modules_linux.html”.
#
#
Execution aborted.

上irc问了DkYu兄(在此表示感谢),得到如下解决办法:

代码:
#
cd /usr/lib/vmware/modules/source
#
sudo cp vmmon.tar vmmon.tar.old
#
sudo tar xvf vmmon.tar
#
sudo gedit vmmon-only/include/compat_kernel.h
#
找到
static inline _syscall1(int, compat_exit, int, exit_code); 并
#
替换成
#
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)
#
static inline _syscall1(int, compat_exit, int, exit_code);
#
#endif
#
sudo tar cvf vmmon.tar vmmon-only
#
sudo rm -rf vmmon-only

意思是内核是2.6.20的话,就不需要这个东西拉,这样改了之后,再进行配置,结果还是报错,如下:

代码:
1.
lly@lly:~$ sudo vmware-config.pl
2.
Making sure services for VMware Workstation are stopped.
3.

4.
Stopping VMware services:
5.
Virtual machine monitor done
6.
Bridged networking on /dev/vmnet0 done
7.
DHCP server on /dev/vmnet1 done
8.
Host-only networking on /dev/vmnet1 done
9.
DHCP server on /dev/vmnet8 done
10.
NAT service on /dev/vmnet8 done
11.
Host-only networking on /dev/vmnet8 done
12.
Virtual ethernet done
13.

14.
Configuring fallback GTK+ 2.4 libraries.
15.

16.
In which directory do you want to install the mime type icons?
17.
[/usr/share/icons]
18.

19.
What directory contains your desktop menu entry files? These files have a
20.
.desktop file extension. [/usr/share/applications]
21.

22.
In which directory do you want to install the application’s icon?
23.
[/usr/share/pixmaps]
24.
25.
/usr/share/applications/vmware-workstation.desktop: warning: The ‘Application’ category is not defined by the desktop entry specification. Please use one of “AudioVideo”, “Audio”, “Video”, “Development”, “Education”, “Game”, “Graphics”, “Network”, “Office”, “Settings”, “System”, “Utility” instead
26.
/usr/share/applications/vmware-player.desktop: warning: The ‘Application’ category is not defined by the desktop entry specification. Please use one of “AudioVideo”, “Audio”, “Video”, “Development”, “Education”, “Game”, “Graphics”, “Network”, “Office”, “Settings”, “System”, “Utility” instead
27.
Trying to find a suitable vmmon module for your running kernel.
28.
29.
None of the pre-built vmmon modules for VMware Workstation is suitable for your
30.
running kernel. Do you want this program to try to build the vmmon module for
31.
your system (you need to have a C compiler installed on your system)? [yes]
32.
33.
Using compiler “/usr/bin/gcc”. Use environment variable CC to override.
34.
35.
What is the location of the directory of C header files that match your running
36.
kernel? [/usr/src/linux-headers-2.6.20-15-generic/include]
37.
38.
Extracting the sources of the vmmon module.
39.
40.
Building the vmmon module.
41.
42.
Using 2.6.x kernel build system.
43.
make: Entering directory /tmp/vmware-config2/vmmon-only'
44.
make -C /usr/src/linux-headers-2.6.20-15-generic/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
45.
make[1]: Entering directory
/usr/src/linux-headers-2.6.20-15-generic’
46.
CC [M] /tmp/vmware-config2/vmmon-only/linux/driver.o
47.
CC [M] /tmp/vmware-config2/vmmon-only/linux/hostif.o
48.
CC [M] /tmp/vmware-config2/vmmon-only/common/cpuid.o
49.
CC [M] /tmp/vmware-config2/vmmon-only/common/hash.o
50.
CC [M] /tmp/vmware-config2/vmmon-only/common/memtrack.o
51.
CC [M] /tmp/vmware-config2/vmmon-only/common/phystrack.o
52.
CC [M] /tmp/vmware-config2/vmmon-only/common/task.o
53.
CC [M] /tmp/vmware-config2/vmmon-only/common/vmx86.o
54.
CC [M] /tmp/vmware-config2/vmmon-only/vmcore/moduleloop.o
55.
LD [M] /tmp/vmware-config2/vmmon-only/vmmon.o
56.
Building modules, stage 2.
57.
MODPOST 1 modules
58.
CC /tmp/vmware-config2/vmmon-only/vmmon.mod.o
59.
LD [M] /tmp/vmware-config2/vmmon-only/vmmon.ko
60.
make[1]: Leaving directory /usr/src/linux-headers-2.6.20-15-generic'
61.
cp -f vmmon.ko ./../vmmon.o
62.
make: Leaving directory
/tmp/vmware-config2/vmmon-only’
63.
The module loads perfectly in the running kernel.
64.
65.
This program previously created the file /dev/vmmon, and was about to remove
66.
it. Somebody else apparently did it already.
67.
68.
This program previously created the file /dev/parport0, and was about to remove
69.
it. Somebody else apparently did it already.
70.
71.
This program previously created the file /dev/parport1, and was about to remove
72.
it. Somebody else apparently did it already.
73.
74.
This program previously created the file /dev/parport2, and was about to remove
75.
it. Somebody else apparently did it already.
76.
77.
This program previously created the file /dev/parport3, and was about to remove
78.
it. Somebody else apparently did it already.
79.
80.
This program previously created the file /dev/vmnet0, and was about to remove
81.
it. Somebody else apparently did it already.
82.
83.
This program previously created the file /dev/vmnet1, and was about to remove
84.
it. Somebody else apparently did it already.
85.
86.
This program previously created the file /dev/vmnet8, and was about to remove
87.
it. Somebody else apparently did it already.
88.
89.
You have already setup networking.
90.
91.
Would you like to skip networking setup and keep your old settings as they are?
92.
(yes/no) [yes]
93.
94.
Extracting the sources of the vmnet module.
95.
96.
Building the vmnet module.
97.
98.
Using 2.6.x kernel build system.
99.
make: Entering directory /tmp/vmware-config2/vmnet-only'
100.
make -C /usr/src/linux-headers-2.6.20-15-generic/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
101.
make[1]: Entering directory
/usr/src/linux-headers-2.6.20-15-generic’
102.
CC [M] /tmp/vmware-config2/vmnet-only/driver.o
103.
CC [M] /tmp/vmware-config2/vmnet-only/hub.o
104.
CC [M] /tmp/vmware-config2/vmnet-only/userif.o
105.
/tmp/vmware-config2/vmnet-only/userif.c: 在函数 ‘VNetCopyDatagramToUser’ 中:
106.
/tmp/vmware-config2/vmnet-only/userif.c:629: 错误: ‘CHECKSUM_HW’ 未声明 (在此函数内第一次使用)
107.
/tmp/vmware-config2/vmnet-only/userif.c:629: 错误: (即使在一个函数内多次出现,每个未声明的标识符在其
108.
/tmp/vmware-config2/vmnet-only/userif.c:629: 错误: 所在的函数内只报告一次。)
109.
make[2]: *** [/tmp/vmware-config2/vmnet-only/userif.o] 错误 1
110.
make[1]: *** [_module_/tmp/vmware-config2/vmnet-only] 错误 2
111.
make[1]: Leaving directory /usr/src/linux-headers-2.6.20-15-generic'
112.
make: *** [vmnet.ko] 错误 2
113.
make: Leaving directory
/tmp/vmware-config2/vmnet-only’
114.
Unable to build the vmnet module.
115.
116.
For more information on how to troubleshoot module-related problems, please
117.
visit our Web site at “http://www.vmware.com/download/modules/modules.html” and
118.
“http://www.vmware.com/support/reference/linux/prebuilt_modules_linux.html”.
119.
120.
Execution aborted.

结果自己依葫芦画瓢,把vmnet.tar给解压了,把里面的userif.c和bridge.c里面都CHECKSUM_HW给注释掉了,再进行配置,果然就可以了,哈哈。
我的vmware又正常啦!

插入光盘文件名乱码的解决方法

/etc/fatab

/dev/hdc /media/cdrom0 udf,iso9660 user,iocharset=utf8,noauto 0 0