Chinaunix首页 | 论坛 | 博客
  • 博客访问: 425748
  • 博文数量: 69
  • 博客积分: 957
  • 博客等级: 准尉
  • 技术积分: 1161
  • 用 户 组: 普通用户
  • 注册时间: 2010-04-26 14:54
文章分类

全部博文(69)

文章存档

2013年(15)

2012年(12)

2011年(42)

分类: LINUX

2011-11-01 15:25:03

问题一:

What is the location of the directory of C header files that match your running 

kernel? [/usr/src/linux/include]

The path "/usr/src/linux/include" is not an existing directory.

What is the location of the directory of C header files that match your running

 kernel? [/usr/src/linux/include]

方法1:

(我想大多数的人都卡在了这一步上来了。哈哈,我也是,被玩了三四天了。其实解决的方法非常简单)

修改为:/lib/modules/2.6.181.2798.fc6/build/include/
出现错误:The directory of kernel headers (version @@VMWARE@@ UTS_RELEASE) does not match your running kernel (version 2.6.18-1.2798.fc6). Even if the module were to compile successfully, it would not load into the running kernel.
其原因是:vmware显卡驱动跟fedora6不配套,需要补丁。
下载补丁:vmware-any-any-update106.tar.gz

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.16-1.2080_FC5/build/include]

Extracting the sources of the vmmon module.

Building the vmmon module.

Building for VMware Workstation 5.5.x.
Using 2.6.x kernel build system.
哈哈,通过完成。其他的都选默认就可以了。

但是.........

有时候也不见得就能解决,比如安装了fedora15后,上面的方法就不行了,可以采用下面的

方法2:

打开 linux/version.h 一看,内容是
#define LINUX_VERSION_CODE 132641
#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))

  2.6.33内核 = 2<<16 + 6<<8 + 33 = 2*65536 + 6*256 + 33 =132641

为什么说版本不对阿?!难道版本算法不同?
  再次看,vmware读取的版本,UTS_RELEASE!我们往 linux/version.h 里面添加一行:
#define UTS_RELEASE "2.6.33.5-112.fc13.i686"
#define LINUX_VERSION_CODE 132630
#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
这次 vmware终于相信 dorainm提供给它的内核头文件的版本是匹配的。


问题二:

今天在vmware虚拟机下安装了Fedora 10 ,然后再安装vmware-tools后发现再也进入不了登录界面,一直是个黑屏的状态,切换成文本模式的话也是在starting anacron [ok]那个位置就再也没反应啦,可能是F10 的X桌面与vmware-tools不兼容造成的(因为在安装的进程中修改了分辨率的参数),几经辛苦,终于在网上找到了解决的方法,主要的原因的 vmware-tools的安装会在/etc/X11/文件夹下生成一个xorg.conf的配置文件,而F10是不需要它的, 有了它,导致进入X桌面出错,所以只要删除它就正常进入登录界面了.
如 果你用的是双系统的话那就可以很容易进入grub图形界面,但像我这样,只在虚拟机上安装一个系统的话,正常情况下是不经过grub图形系统选择界面就直 接启动内核进入系统的了,因为/boot/grub/grub.conf 中的timeout=0,修改这个以后就要出现grub界面了.

下面介绍下此问题的解决步骤:

1.在开机的时候按住shift就可以进入grub选择界面;
2.在 grub 菜单中按 e 进入编辑状态,将光条移到kernel ... 一行再按e,在该行最后加一个空格和 3(一般是quiet 3 ),按ESC后再b启动即可进入字符登录界面。
3.用root帐号登录进去后
# cd /etc/X11
#rm xorg.conf

4.修改/boot/grub/grub.conf文件,将timeout改为10,以免以后又无法进入grub而犯愁
5.重启虚拟机后,就可以正常启动Linux

阅读(1678) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~