TFTP server

apt-cache search tftpd
#
mcedit /etc/default/tftpd-hpa

cd /var/lib 

chown tftp ./tftboot

/etc/init.d/tftpd-hpa restart

apt-get install tftp-hpa


cp /etc/rc.local /var/lib/tftpboot/
ls /var/lib/tftpboot/
chown tftp  /var/lib/tftpboot/rc.local 
chmod  555  /var/lib/tftpboot/rc.local


#priklad precteni souboru pres tftp

root@ubuntu:~# tftp localhost
tftp> bin
tftp> get rc.local
tftp> 

#priklad poslani souboru pres tftp
root@ubuntu:~# tftp localhost
tftp> bin
tftp> put rc.local
tftp> 

#konfiguracni soubor 
root@ubuntu:~# cat /etc/default/tftpd-hpa 
# /etc/default/tftpd-hpa

TFTP_USERNAME="tftp"
TFTP_DIRECTORY="/var/lib/tftpboot"
TFTP_ADDRESS="0.0.0.0:69"
TFTP_OPTIONS="--secure -c"

# vytvoreni nahodneho souboru o velikosti 100MB
dd if=/dev/urandom of=nahodny bs=1M count=100

# vymazani prvnich 100MB diskoveho oddilu
dd if=/dev/urandom of=/dev/sda1 bs=1M count=100