2009年11月21日

TFTP note

OS: ubuntu 8.04 LTS

1.Install TFTP server package
$sudo apt-get install tftpd-hpa

2. Modify config file
$sudo vim /etc/default/tftpd-hpa
ex:
RUN_DAEMON="yes"
OPTIONS="-l -s /var/lib/tftpboot"
Append server dir after "-s"

3. Restart

$sudo /etc/init.d/tftpd-hpa restart
Check whether tftpd is running:
$sudo netstat -anp | grep tftp

4. Test

Install tftp client
$sudo apt-get install tftp-hpa
Put any test file in server dir
Time to connect the server!
Simply type "tftp server_ip_addr"
After connection, type "get filename" to download the file

5.Extra: tftp loading kernel image in u-boot
ex:
serverip=192.168.0.56
bootfile=uImage-1.0-20091119.bin
bootcmd=tftpboot 30000000;bootm 30000000

1 則留言:

madraziw 提到...

good
3q
This is very useful