2

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?

2 Answers 2

3

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.

2
  • 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
    Commented Jun 7, 2016 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
    Commented Jun 8, 2016 at 0:39
3

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .