Ubuntu – PXE Boot into Ubuntu Live + Persistence (casper-rw): Possible? Limitations

bootnfspersistencepxe

I have setup a PXE Boot Server on the network (Not Ubuntu, but NethServer for anyone interested), and have gotten Ubuntu 16.04 booting properly from this server.

Here is the pxelinux.cfg/default entry for it:

label 1
menu label ^1) Ubuntu Desktop 16.04.1 x64 Live
  kernel ubuntu-16.04.1-desktop-amd64/casper/vmlinuz.efi
  append rootfstype=nfs4 boot=casper persistent netboot=nfs nfsroot=10.1.1.1:/home/tftpdata/ubuntu-16.04.1-desktop-amd64 initrd=ubuntu-16.04.1-desktop-amd64/casper/initrd.lz --

I probably don't need the rootfstype=nfs4, but it works, so I'll leave it for now.

My question relates to the persistent option.

From what limited information I can find that relates to 16.04, if I want the client to have any kind of persistence, it has to have a casper-rw setup, but I can't figure out how to serve this over NFS at boot.

There doesn't seem to be any switch or path.

I found this, which seems to allude to the idea that I might need a partition or some such, named casper-rw? There aren't many more details I can find.

I do know that casper-rw can be a loop file, I know it can also be a partition. But is it possible to serve this over NFS at the time of boot to the PXE client?

Every other reference seems to be related to 14.04 or earlier, and the majority seem to be for 9.10 and lower.

The end goal is to have a PXE Boot diskless workstation, that I can install drivers and applications on.

Best Answer

[I would have preferred to leave this as a comment but I don't have the rep.]

I've been down this road trying to implement what I consider hybrid thin / diskless clients with PXE at the core. Originally I researched and tried NFS and used various ways to persist data. In the end, I found the method that was most resilient (as well as manageable) was to use PXE to iSCSI. By no means a trivial undertaking but once deployed it works quite well and affords all those standard management practices one desires. The primary difference is with iSCSI you have to largely preallocate a disk size.

The "how-to" is infrastructure dependent so I'll cite a reference: http://backreference.org/2013/12/23/diskless-iscsi-boot-with-pxe-howto/

(this is not a "your answer is somewhere in here" post)