how to install your kernel code in FC6:
download the file kernel-2.6.18-1.2798.fc6.src.rpm in
http://rpm.pbone.net/index.php3/stat/26/dist/51/size/46593319/name/kernel-2.6.18-1.2798.fc6.src.rpm
then put it in /root/
then run the command:
cd /root/
sudo rpm -ivh kernel-2.6.18-1.2798.fc6.src.rpm
sudo rpmbuild -bp --target=$(uname -m) /usr/src/redhat/SPECS/kernel-2.6.spec
The source files will be properly located in /usr/src/redhat/BUILD/kernel-2.6.18/. There are 2 useful directories:
linux-2.6.18.ARCH/
This will have the standard kernel.org kernel WITH Fedora patches and updates. The ARCH architecture will match the output of uname -m, usually i686. You may use noarch for the target= option if you wish.
vanilla/
This will have the standard kernel.org kernel ONLY (no patches or updates).
NOTE: Users of x86_64 architecture may experience the following error:
error: Failed build dependencies:
unifdef is needed by kernel-2.6.18-1.2798.x86_64
To fix, run sudo yum install unifdef.
make the build effect:
mkdir /usr/src/kernels
ln -s /usr/src/redhat/BUILD/kernel-2.6.18/linux-2.6.18.i686 /usr/src/kernels/2.6.18-1.2798.fc6-xen-i686
cd /usr/src/
ln -s ./kernels/2.6.18-1.2798.fc6-xen-i686 ./linux
cd linux
cp configs/kernel-2.6.18-i686.config .config
vi Makefile ( 修改 EXTRAVERSION = -prep 为 EXTRAVERSION = -1.2798.fc6xen )
make mrproper
make oldconfig
make
make modules_install
how to install vmtools in FC6:
after install kernel code in FC6,
you can run vmware-install.pl to install the vmware tools.
run:
./vmware-install.pl
if the is en error,
In file included from include/linux/string.h:11, from /tmp/vmware-config3/vmhgfs-only/cpName.h:18, from /tmp/vmware-config3/vmhgfs-only/cpName.c:18: include/linux/types.h:40: 错误:与‘uintptr_t’类型冲突 /tmp/vmware-config3/vmhgfs-only/vm_basic_types.h:170: 错误:‘uintptr_t’的上一个声明在此 make[2]: *** [/tmp/vmware-config3/vmhgfs-only/cpName.o] 错误 1 make[1]: *** [_module_/tmp/vmware-config3/vmhgfs-only] 错误 2 make[1]: Leaving directory `/usr/src/kernels/2.6.25-14.fc9.i686' make: *** [vmhgfs.ko] 错误 2 make: Leaving directory `/tmp/vmware-config3/vmhgfs-only' Unable to build the vmhgfs module.
then download open-vm-tools-2008.06.03-96374.tar.gz
http://jaist.dl.sourceforge.net/sourceforge/open-vm-tools/open-vm-tools-2008.06.03-96374.tar.gz
tar xzvf open-vm-tools-2008.06.03-96374.tar.gz
cd open-vm-tools-2008.06.03-96374/
./configure && make
cd modules/linux/
for i in *; do mv ${i} ${i}-only; tar -cf ${i}.tar ${i}-only; done
cd ../../..
mv -f open-vm-tools-2008.06.03-96374/modules/linux/*.tar vmware-tools-distrib/lib/modules/source/
cd vmware-tools-distrib/
sudo ./vmware-install.pl
一路回车,直到出现屏幕分辨率的选项,选你喜欢的分辨率.搞定。
6、装好后还有一个问题,当你向共享文件夹写文件时总提示没有权限,root用户都提示没有权限.看了一下日志,是selinux在做怪,配置SElinux太麻烦了,不如关了它.
vi /etc/sysconfig/selinux
find
SElinux=enforcing
SElinux=disabled.
重启后一切就ok了.
2008.10.31,20:06