TFTP and NFS
TFTP :
install :
sudo apt-get install aptitude
sudo aptitude install tftpd-hpa nfs-kernel-server
|
Execute : vim /etc/default/tftpd-hpa and verify that the following options are present:
TFTP_USERNAME="tftp"
TFTP_DIRECTORY="/srv/tftp"
TFTP_ADDRESS="0.0.0.0:69"
TFTP_OPTIONS="--secure"
|
Then copy the linux kernel image and device tree file (if any) to the TFTP directory and set the right permissions on it:
cp
chmod 644 /var/lib/tftpboot/
|
uEnv.txt on the client (for uImage and device tree)
ipaddr=192.168.1.218
serverip=192.168.1.84
netmask=255.255.255.0
ethaddr=00:E0:4C:53:44:58
bootfile=b1111_kernel/uImage
fdtfile=b1111_kernel/am335x-boneblack.dtb
tftp_nfs_boot=echo Booting from network...; setenv autoload no; tftp ${loadaddr} ${bootfile}; tftp ${fdtaddr} ${fdtfile}; run netargs; bootm ${loadaddr} - ${fdtaddr}
uenvcmd=run tftp_nfs_boot
|
NFS :
Execute vim /etc/exports and enter the following line to export the rootfs directory over NFS:
/srv/nfs/ *(rw,no_subtree_check,no_root_squash) |
Finaly copy the content of the rootfs directory to the NFS share directory:
cp -a |
uEnv.txt on the client (for rootfs)
ipaddr=192.168.1.218
serverip=192.168.1.84
netmask=255.255.255.0
ethaddr=00:E0:4C:53:44:58
rootpath=/srv/nfs/b1111_rootfs
bootfile=b1111_kernel/uImage
fdtfile=b1111_kernel/am335x-boneblack.dtb
root=/dev/nfs rw
netargs=setenv bootargs console=${console} ${optargs} root=/dev/nfs nfsroot=${serverip}:${rootpath},${nfsopts} rw ip=192.168.113.218:192.168.113.84:192.168.113.250:255.255.255.0
tftp_nfs_boot=echo Booting from network...; setenv autoload no; tftp ${loadaddr} ${bootfile}; tftp ${fdtaddr} ${fdtfile}; run netargs; bootm ${loadaddr} - ${fdtaddr}
uenvcmd=run tftp_nfs_boot
|
Sujet: TFTP and NFS
Aucun message nʼ a été trouvé.