Copy pre-configured OS image to slave local drive with PXE

834 views Asked by At

I have a handful of servers and would like to configure them as close as possible to a standard HPC cluster, currently focusing on automated node provisioning. My requirements for this are:

  • All nodes are identical, so I'd like to use a pre-configured install I have set up on one of the nodes
  • I have created an image of this install, which I would like to use to boot all nodes (this is a copy of the filesystem on the configured node)
  • The software image should be installed on the local disk of each node (not mounted over NFS)

I've been playing around with PXE and managed load Ubuntu 14.04 on a slave node, with the software image provided through NFS.

Is it possible to tell PXE to copy the contents of the NFS-mounted directory to a local disk partition and then make it boot/run linux from there?

1

There are 1 answers

3
larsks On BEST ANSWER

Is it possible to tell PXE to copy the contents of the NFS-mounted directory to a local disk partition and then make it boot/run linux from there?

PXE is just a mechanism for booting a system over the network. Since you have complete control over what you feed your systems via PXE, you can do pretty much anything you want.

Four your scenario, you would want to boot into some sort of minimal Linux environment that is able to:

  • Mount NFS filesystems
  • Copy files
  • Configure the bootloader locally

That's a pretty short shell script. Once it completes, you would reboot the system, which ideally would be configured to prefer booting from the local disk (so that once you have configured the local boot loader, the system will not attempt to PXE boot during subsequent boots).

You may want to take a look at the Clonzezilla project, which does some of what you want.