在Ubunut12.04上搭建TFTP和NFS服务器
2016-10-06 14:25
351 查看
安装tftp-server:sudo apt-get install tftpd-hpa
安装tftp-client(根据需要安装):sudo apt-get install tftp-hpa
配置TFTP服务器:sudo vim /etc/default/tftpd-hpa,修改为如下内容:
TFTP_USERNAME="tftp"
TFTP_DIRECTORY="/home/yuntaohe/work/tftp"
TFTP_ADDRESS="0.0.0.0:69"
TFTP_OPTIONS="-l -c -s"
重新启动TFTP服务:sudo service tftpd-hpa restart
测试TFTP服务器:在u-boot命令行下将内核下载到内存中,ftp 30000000 uImage
dm9000 i/o: 0x20000000, id: 0x90000a46
DM9000: running in 16 bit mode
MAC: 00:0c:29:2a:5c:a5
operating at 100M full duplex mode
Using dm9000 device
TFTP from server 192.168.1.17; our IP address is 192.168.1.6
Filename 'uImage'.
Load address: 0x30000000
Loading: T #################################################################
#################################################################
###########
347.7 KiB/s
done
Bytes transferred = 2058416 (1f68b0 hex)
安装NFS服务器:sudo apt-get install nfs-kernel-server
指定NFS目录:sudo vim /etc/exports
/home/yuntaohe/work/nfs/rootfs *(rw,sync,no_subtree_check,no_root_squash)
启动NFS服务:sudo /etc/init.d/nfs-kernel-server start
设置u-boot启动参数:set bootargs root=/dev/nfs init=/linuxrc nfsroot=192.168.1.17:/home/yuntaohe/work/nfs/rootfs ip=192.168.1.6 console=ttySAC0,115200
启动内核,查看NFS文件系统是否挂载成功:bootm
eth0: link down
IP-Config: Guessing netmask 255.255.255.0
IP-Config: Complete:
device=eth0, addr=192.168.1.6, mask=255.255.255.0, gw=255.255.255.255,
host=192.168.1.6, domain=, nis-domain=(none),
bootserver=255.255.255.255, rootserver=192.168.1.17, rootpath=
Looking up port of RPC 100003/2 on 192.168.1.17
eth0: link up, 100Mbps, full-duplex, lpa 0x4DE1
Looking up port of RPC 100005/1 on 192.168.1.17
VFS: Mounted root (nfs filesystem) on device 0:12.
Freeing init memory: 156K
[root@hyt /]#
[root@hyt /]#ls
bin etc lib mnt sbin temp
dev home linuxrc proc sys usr
挂载成功,挂载NFS文件系统:mount -o nolock 192.168.1.17:/home/yuntaohe/work/nfs/rootfs /mnt/nfs
安装tftp-client(根据需要安装):sudo apt-get install tftp-hpa
配置TFTP服务器:sudo vim /etc/default/tftpd-hpa,修改为如下内容:
TFTP_USERNAME="tftp"
TFTP_DIRECTORY="/home/yuntaohe/work/tftp"
TFTP_ADDRESS="0.0.0.0:69"
TFTP_OPTIONS="-l -c -s"
重新启动TFTP服务:sudo service tftpd-hpa restart
测试TFTP服务器:在u-boot命令行下将内核下载到内存中,ftp 30000000 uImage
dm9000 i/o: 0x20000000, id: 0x90000a46
DM9000: running in 16 bit mode
MAC: 00:0c:29:2a:5c:a5
operating at 100M full duplex mode
Using dm9000 device
TFTP from server 192.168.1.17; our IP address is 192.168.1.6
Filename 'uImage'.
Load address: 0x30000000
Loading: T #################################################################
#################################################################
###########
347.7 KiB/s
done
Bytes transferred = 2058416 (1f68b0 hex)
安装NFS服务器:sudo apt-get install nfs-kernel-server
指定NFS目录:sudo vim /etc/exports
/home/yuntaohe/work/nfs/rootfs *(rw,sync,no_subtree_check,no_root_squash)
启动NFS服务:sudo /etc/init.d/nfs-kernel-server start
设置u-boot启动参数:set bootargs root=/dev/nfs init=/linuxrc nfsroot=192.168.1.17:/home/yuntaohe/work/nfs/rootfs ip=192.168.1.6 console=ttySAC0,115200
启动内核,查看NFS文件系统是否挂载成功:bootm
eth0: link down
IP-Config: Guessing netmask 255.255.255.0
IP-Config: Complete:
device=eth0, addr=192.168.1.6, mask=255.255.255.0, gw=255.255.255.255,
host=192.168.1.6, domain=, nis-domain=(none),
bootserver=255.255.255.255, rootserver=192.168.1.17, rootpath=
Looking up port of RPC 100003/2 on 192.168.1.17
eth0: link up, 100Mbps, full-duplex, lpa 0x4DE1
Looking up port of RPC 100005/1 on 192.168.1.17
VFS: Mounted root (nfs filesystem) on device 0:12.
Freeing init memory: 156K
[root@hyt /]#
[root@hyt /]#ls
bin etc lib mnt sbin temp
dev home linuxrc proc sys usr
挂载成功,挂载NFS文件系统:mount -o nolock 192.168.1.17:/home/yuntaohe/work/nfs/rootfs /mnt/nfs
相关文章推荐
- nfs,samba,tftp,svn服务器的搭建及使用整理
- ubuntu 12.04搭建tftp服务器 and nfs
- ubuntu 12.04搭建tftp服务器的安装、设置、调试
- Ubuntu12.04搭建tftp&nfs服务器
- Ubuntu 12.04 搭建TFTP服务器
- [置顶] Ubuntu 12.10搭建tftp和nfs服务器
- ubuntu 12.04中搭建nfs服务器
- ubuntu 12.04搭建tftp服务器的安装、设置、调试
- ubuntu 12.04搭建tftp服务器的安装、设置、调试
- Ubuntu: 搭建tftp,nfs服务器
- ubuntu 下 搭建 tftp nfs 服务器
- ubuntu 12.04搭建tftp服务器的安装、设置、调试
- 在ubuntu10.04下搭建tftp服务器和nfs服务器
- ubuntu 12.04搭建tftp服务器的安装、设置、调试
- fedora12搭建smb,tftp,nfs服务器
- ubuntu 12.04搭建tftp服务器的安装、设置、调试
- ubuntu 12.04搭建tftp服务器
- ubuntu 12.04搭建tftp服务器
- ubuntu 10.04下的tftp/nfs服务器搭建
- ubuntu 12.04搭建tftp服务器的安装、设置、调试