分页: 1 / 1

ZF)在Ubuntu上安装NIST Net(续)

发表于 : 2009-08-11 13:55
wheel
预装
-----------------------------------------------
sudo apt-get install emacs21
-----------------------------------------------

安装编译内核:
-----------------------------------------------
sudo apt-get install linux-source-2.6.15
cd /usr/src
sudo tar -xjf linux-source-2.6.15.tar.bz2
sudo apt-get install kernel-package libncurses5-dev
cd /usr/src/linux-source-2.6.15
sudo make oldconfig /*这个里面可以选择disable不用的或者没有模块,不然在生成新内核的时候会出错导致无法继续*/
sudo make-kpkg -initrd kernel-image
sudo dpkg -i kernel-image-2.6.15.7-ubuntu1_10.00.Custom_i386.deb
----------------------------------------------

安装所需的包,不过暂时还不知道有啥鸟用。
----------------------------------------------
sudo apt-get install xlibs-dev
sudo apt-get install libxaw-headers
sudo apt-get install libxaw7-dev
sudo apt-get install xaw3dg-dev
sudo apt-get install qt3-doc qt3-dev-tools qt3-apps-dev
sudo apt-get install lsb-cxx
---------------------------------------------
装NIST在make的时候会有余下错误,
=======================================================
/home/maguire/nistnet-3.0a/kernel/knistnet.c:916: error: too few arguments to function ippt->func
/home/maguire/nistnet-3.0a/kernel/knistnet.c:961: error: too few arguments to function ippt->func
/home/maguire/nistnet-3.0a/kernel/knistnet.c:972: error: too few arguments to function ippt->func
/home/maguire/nistnet-3.0a/kernel/knistnet.c:1003: error: too few arguments to function ippt
=======================================================
修改/nistnet-3.0a/kernel/knistnet.c里相应如下字段
---------------------------------------------------------------------------
return ippt->func(skb, dev, ippt, NULL); /*添加‘NULL'参数*/
---------------------------------------------------------------------------

还有一个就是找不到build modules的问题,如下:
=======================================
make[1]: Entering directory `/lib/modules/2.6.15-23-386/build’
make[1]: ** No rule to make target `modules’. Stop.
make[1]: Leaving directory `/lib/modules/2.6.15-23-386/build’
make: ** [modules] Fehler
=======================================
于是创建链接指向一下:
----------------------------------------------------------------------
sudo ln -s /usr/src/linux-source-2.6.15 /lib/modules/2.5.15-23-386/build
---------------------------------------------------------------------

到nistnet目录下开始安装
sudo ./configure
sudo make
sudo make install

用'sudo ./Load.Nistnet'启动Nistnet时又出现点问题:
=======================================
Error: Module rtc does not exist in /proc/modules
Couldn't find rtc module - /dev/rtc will be mostly unusable after running nistnet. Sorry about that...
To prevent this message, recompile rtc
(Enhanced Real Time Clock Support, under character devices) as a module.
FATAL: Module nistnet not found.
Problems with modprobe, repeating with degub on.
FATAL: Module nistnet not found.
========================================
这个由于两个原因造成的,一个是rtc module,一个是nisnet module.
先在 /lib/modules/2.6.15.7-ubuntu1/modules添加如下字段:
----------------------------------------------------------
/lib/modules/2.6.15.7-ubuntu1/extra/nistnet.
----------------------------------------------------------
然后选择新的内核启动,在grub里的menu.lst里设置新的内核作为默认启动。
然后重启,再'sudo ./Load.Nistnet'启动,最终会显示
----------------------------------------------------------
nistnet module installed successfully
----------------------------------------------------------

希望再不会有问题。。。

Re: ZF)在Ubuntu上安装NIST Net(续)

发表于 : 2011-05-27 22:14
machinarium
咋一看这个内核版本,我就知道我还有一段路要走,2.6.15,是Ubuntu 6.06 Dapper Drake吧。从2.6.15到目前10.04的2.6.32,期间还是有许多的变化,可以说上述方法的参考价值越来越低了。目前正在Lucid上折腾,还没有结果。如果实在没有办法,我就要换合适内核版本的linux发行版比如Red Hat 9.0了。