Advantages over NFS

The main advantages are that NBD is faster and that you can boot from an encrypted or LVM-based NBD root device. One disadvantage is that you cannot easily update your kernel from within the running diskless client, although there is a workaround for this.

Server-Side Setup

Create the NBD File and Boot Directory

Create a directory that will hold the boot directory and the NBD file.

mkdir -p /nbd/boot/

Next, create the actual file that will be shared via NBD. Of course you can also use an actual block device (a hard drive) instead of creating a file on your filesystem. Just replace /nbd/root with the block device.
In this example we are going to create a file with a size of 5GB.

dd if=/dev/zero of=/nbd/root bs=1M count=5000

Now you can create a filesystem on the file.

mkfs.ext4 /nbd/root

mkfs will show you warning about the fact that the file is no actual block device. You can ignore this and simply press y to continue.

Using a Swap Partition

Although this has not been tested yet, you should be able to do this by creating a LVM volume group on /dev/nbd0 that contains the root and swap partition and adding lvm2 before the filesystems hook in /mnt/etc/mkinitcpio.conf.

Updating the Client System

"[...] if someone has mounted NBD read/write, you must assure that no one else will have it mounted."

In other words, if you want to be able to update from your client system, you have to make sure that the NBD device is not mounted on any other system, not even read-only. If your NBD device is encrypted, make sure to not just dismount it, but also close it with 'cryptsetup luksClose'. Otherwise, you may break your filesystem. If you keep that in mind, everything except kernel updates should work fine.

Alternatively you can mount the NBD device on the server and then update it (again, make sure it is not mounted anywhere else!):