How to boot embedded Linux over the network (NFS root) for development?

Q: How to boot embedded Linux over the network (NFS root) for development?

Answer

Network boot eliminates flash writes during development. Configure U-Boot: setenv ipaddr setenv serverip setenv bootargs root=/dev/nfs nfsroot=:/path/to/rootfs rw ip=dhcp. On the host: install nfs-kernel-server export the rootfs directory in /etc/exports. Enable NFSv4. Start rpcbind then nfsd. Test with mount -t nfs4 host:/path /mnt. For faster boot use NFSv3 with nfsvers=3. For TFTP kernel loading: setenv bootfile uImage setenv serverip host_ip then tftpboot 0x82000000 uImage. For large files (>2 GB) on 32-bit NFS use NFSv4. Monitor with Wireshark on the host. Security note: NFS root gives full read/write access – restrict with firewall rules in production.

Filed under: FAQ

Leave a Reply

Your email address will not be published. Required fields are marked *