I have created a Raspi PXE boot server (DHCP/TFTP) in order to boot IPCop on a computer and it works fine. I have not used NFS technology. I have read many posts about PXE booting with NFS but I don't understand in which way this could be valuable.

Any ideas?


You don't need NFS to use PXE booting.

PXE booting consist of an IP (usualy given by DHCP server), and downloading kernel (usualy via TFTP), kernel then is loaded into memory.

At this point, either the host has local disks, or not. Obviously, if you don't have local disks, you'll need some way to share resources. This is where NFS comes into play.

Note that NFS isn't even mandatory if you are diskless. In days of old, a concept was Terminal X, that would boot through PXE, and connect to any available X server.

  • It is still not clear to me what NFS would add to this setup... Does NFS enable booting without a hard drive? I have never tried what would happen when I remove the hard drive of my setup. I assumed all files would be loaded in RAM... – Engo Jun 7 '16 at 11:22
  • 1
    @Engo yes - a local hard disk isn't required. Using a ramdisk for the rootfs is one way to do it. An NFS-mounted root directory is another. Yet another is an ISO image file (fetched over the network via tftp or even http) that contains a live CD (e.g. an installer or rescue cd or clonezilla. or an X terminal). It's even possible to make a menu where any one of these or more can be selected at boot time (with a timeout default). – cas Jun 8 '16 at 0:39

Archemar is correct, you don't need NFS for PXE, it's just convenient for diskless installations.

Nfs can be used for diskless setups, where the root filesystem is mounted from a common nfs store.

An example using RHEL:
After creating a root filesystem (either using rsync or with yum installroot) and exporting it, In your tftpboot/pxelinux.cfg use

label rhel7
  kernel vmlinuz-kernel-version
  append initrd=initramfs-kernel-version.img root=nfs:server-ip:/exported/root/directory rw

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.