home | list info | list archive | date index | thread index

Re: [OCLUG-Tech] GCC: Request for help to get cluster booting!

Richard Cook wrote:

> After banging my head on the desktop trying to get the diskless nodes to
> boot off the server I have finally admitting defeat and am calling for
> help!

Do the nodes support PXE boot?

Earlier this year I setup diskless booting on Debian. If you google
"debian pxe boot" you should find a couple howtos. Ubuntu should be
almost the same.

Basically I installed:
tftpd-hpa
syslinux
nfs-kernel-server

dhcp3-server is running on another machine. The interesting lines on in
the dhcpd config are:

subnet 10.0.0.0 netmask 255.255.255.0
{
   poll { range 10.0.0.100 10.0.0.254; }

   allow bootp;  # not sure if this is needed
   filename "pxelinux.0";
   next-server 10.0.0.1;    # this is the tftpd server
}


I copied pxelinux.0 to /var/lib/tftpboot and created
/var/lib/tftpboot/pexlinux.cfg/default with the contents:


LABEL foo
        kernel etch/vmlinuz
        append vga=normal initrd=etch/initrd.img root=/dev/nfs
nfsroot=10.0.0.1:/nfsroot/foo ip=dhcp rw

Makre sure the files in /var/lib/tftpboot are world readable. (file mode
644, directory mode 755).

To create the nfsroot I used debootstrap (which can also be used to
create an Ubuntu install). After deboostrap ran I modified the
nfsroot/foo/etc/fstab to look like:


tmpfs   /tmp            tmpfs   defaults        0 0
tmpfs   /var/run        tmpfs   defaults        0 0
tmpfs   /var/lock       tmpfs   defaults        0 0
tmpfs   /var/tmp        tmpfs   defaults        0 0
tmpfs   /var/log        tmpfs   defaults        0 0
tmpfs   /var/lib/nfs    tmpfs   defaults        0 0

10.0.0.1:/home        /home   nfs
	auto,defaults,rw,rsize=32768,wsize=32768    0 1

I pulled that from the Internets so I am not sure it is all needed, but
it hasn't hurt. I also have the following line commented out. You might
need it:

#10.2.22.10:/nfsroot/mpi        /.nfsroot       nfs
     defaults,ro,rsize=32768,wsize=32768 0 0


The nfsroot/foo filesystem is nfs shared readonly (that rw option the
pxe config probably should be ro). To make changes to the nfs systems I
use chroot on the nfs server. It is possible to use aptitude and similar
tools to easily install packages. Before starting the chroot I run the
following:

mount -o bind /proc /nfsroot/foo/proc
mount -o bind /home /nfsroot/foo/home


Unfortunately I am probably forgetting something. It was 8 months ago.
Hopefully there is enough to get you going.

If you are using the mpi version of povray install mpich2 from source.
The Debian package is buggy. By default mpich2 installs in /opt. The nfs
server shares that readonly. The fstab line for the nfsroot clients is
just like the line for /home.

-- 
sg