由于Linxu调试需要使用网络下载内核,因此通常在Windows下使用tftp软件执行此操作,但要调试内核,必须修改内核进行调试,因此Linxu必须安装内核我在网上找了好久,试着找了篇好文章,但很满意。
我的ubuntu是10.10版
1、首先打开根权限的终端。
#sudo -i
在Ubuntu的10.XX以上版本中,现在可以找到根终端。 否则,可以使用普通终端使用sudo命令前缀。
2、下载并安装tftp服务器。
在典型的internet教程中,您将创建三个文件: tftp、tftpd和openBSD-inetd。 其实大部分使用tftpd和openBSD-inetd就足够了。 但是,为了统一和笨蛋性,会使用大家喜欢的命令。 链接网线后,用终端输入。
sdoapt-getinstalltftpdtftpopenbsd-inetd
按照提示进行确认,然后完成
3、重新启动系统。
4、打开终端编辑配置文件/etc/inetd.conf
建议使用命令:sudo vim /etc/inetd.conf
在此配置文件中找到以下位置:
# : boot 3360 tftpserviceisprovidedprimarilyforbooting.most sites
# runthisonlyonmachinesactingas ' boot servers.'
# tftpdgramudpwaitnobody/usr/sbin/tcpd/usr/sbin/in.tftpd/SRV/TFTP
#用散列标记注释掉了上面的默认配置文件,并自己配置了下面的行
# tftpdgramudpwaitnobody/usr/sbin/tcpd/usr/sbin/in.tftpd/tftpboot
tftpdgramudpwaitnobody/usr/sbin/tcpd/usr/sbin/in.tftpd/tftpboot
保存文件并退出。
红色字体/tftpboot是我设置的tftp服务目录
5、创建TFTP服务器的文件目录。
打开终端,进入根目录(cd /)或cd .然后下降到顶部。
输入命令:
sudu mkdir tftpboot
sudu chmod 777 /tftpboot
如果有需要下载的文件,也可以在此时进行复制,并使用chmod 777命令打开所有权限。
6、通过以下命令启动(或重新启动) xinetd服务
SDO/etc/init.d/openbsd-inetd restart
检查7,69端口是否打开,然后使用以下命令
netstat-an
可以在打印的东西中找到以下东西。
UDP 00.0.0.0:690.0.0.0: *
8、统一操作,重启系统比较好。
9、重新启动系统后使用:通过sudo/etc/init.d/openbsd-inetd restart命令重置状态。
10、本地测试一下:
在/tftp下创建新文件并写入数据。
root @ Ubuntu :/TFTP # echotftptesttest.txt
到主目录:
root@Ubuntu:/tftp# cd /home/
root @ Ubuntu :/home # TFTP 192.168.0.114
tftp get test.txt
Received 11 bytes in 0.1 seconds
TFTP队列
root @ Ubuntu :/home # cattest.txt
TFTP测试
tftp之后的192.168.0.114是您的ip地址,可以通过ifconfig查看ip地址。 当然,在前面设置ip。 我设定静态ip
考试成功,大功告成。