Network boot- TFTP and NFS

2 min read

TFTP and NFS is basic block for linux development. There are many types of booting. The easier one is to copy your data on MMC and then put it in to the boards mmc slot and boot from it.In this post, we'll talk about something which makes your development work easier. Your host PC where you're buillding the kernel and your target board (in my case it is BEAGLE BONE BLACK) will come into a network before booting the kernel. Before reading this further, make sure that you know basic steps like building the kernel and how it boots through U-boot (bootloader),TFTP- Trivial file transfer protocol.NFS- Network file system.Basically these are two different things. Don't confuse the to be one. One of them will load the kernel into RAM and the other will mount the NFS from host(your PC) to target(BBB).

There are four aspects.1) Keep kernel image and dtb on boot partition of MMC and RFS on rfs partition of mmc. 2) Keep the kernel image and dtb(device tree blob) in the mmc and boot the kernel from it. Kernel should mount the RFS(root file system) available in Host PC.(as it lies on network on other system it will be called as NFS)3) Boot the kernel image and dtb from host PC, keep the RFS on mmc and mount it from there.4) Keep nothing on mmc, boot the kernel image and dtb from host PC and then mount RFS from Host PC(procedure of NFS)Note: In all case, U-boot should be present on mmc or emmc of BBB.

TFTP and U-boot

U-boot is a boot-loader, whose work is to boot the kernel. There are many types out there. But only few of them provide the capability to boot the kernel from some other system connected to it through the network. Now, U-boot has to initialise basic hardware which is required to transfer the kernel image and dtb from host PC to Target.

Enjoyed this article?

Subscribe to get the latest deep dives on Linux and Security delivered to your inbox.

Subscribe to Newsletter

Get the latest articles on Linux, cryptography, and security delivered to your inbox.

No spam, unsubscribe anytime.

Comments Coming Soon

We are building a privacy-focused, secure commenting system. Stay tuned!