Tag Archives: Kernel

Before you can run VMware Workstation, several pre-built modules must be compiled and loaded into the running kernel.

You’ll get this error when you upgrade your linux kernel after you installed VMware workstation.
To fix this issue, the easiest way is to re-install VMware workstation.
For RHEL, just using below command to uninstall VMware and install source kernel.

vmware-installer --uninstall-product vmware-workstation
yum install kernel-devel Kernel-headers

And then install VMware workstation

Freebsd编译内核

默认的内核加载项目太多,装好之后优化下吧。

首先查看原来内核大小

# ls -l /boot/kernel/kernel

然后安装内核源码

# ls /usr/src/sys
ls: /usr/src/sys: No such file or directory

说明源码没有安装,执行sysinstall ,然后configure,然后Distributions,然后src,最后sys。回车安装。很快就安装好了
然后配置内核文件

# cd /usr/src/sys/i386/conf
# cp GENERIC GENERIC.bak
# ee GENERIC

把不需要的地方都注释掉,不过我都是直接删除了。。。注释还需要加个#,麻烦。。
不过编译过程中,发现有2项必须保留的,不然会出错

options COMPAT_43 #Compatible with BSD 4.3
device miibus # MII bus support

然后都编辑好之后保存。

# cd /usr/src/sys/i386/conf
# /usr/sbin/config GENERIC
# cd ../compile/GENERIC
# make depend
# make
# make install

其中如果所有步骤没没有出错,就说明没有问题了。不过我在make install的时候,第一次失败,重新执行一次正常了,非常诡异

重新启动,就是用新内核了。不过如果编译的内核无法启动,那么可以使用以前的内核来启动。一般编译一次内核后,都会把把旧内核备份,一般/boot/kernel.old就是旧内核的备份,出现问题就能够使用久内核来启动。

具体实现方法是:
在系统启动进行10计数的时候按Enter以外的任何键, 接着键入unload命令,再键入boot kernel.old,或者任何能正常启动的内核名字,然后就能够正常启动系统,进入系统后再重新进行内核的配置工作

Technorati 标记: , , , ,

HOWTO: Kernel Compilation for Newbies

ubuntu官方论坛中,写得如何编译ubuntu的内核的文章。
我昨天重新编译内核时看到的,转过来
 
This guide is aimed at the newbies who are willing to learn something about kernel compilation or just who need a new kernel for incompatibility issues (e.g. DMA issues). This is a STEP-BY-STEP guide, so don’t be afraid of compiling your first kernel, it’s a piece of cake. Moreover if you need to compile any kernel module (nvidia modules, ndiswrapper, etc.) I will also explain how to do it.
 
It takes a while (even an hour) to complete the process described below, so make sure you have enough time to spend.
 
Make sure you have all the repositories enabled

Continue reading