MoobyFR's blog

Some IT infos

Aller au menu | Aller à la recherche

Replacing ghost with tools for real men. Part3: Computers are here to work, not me. Multicast is for you.

, 12:36 - Lien permanent

Testscase was ok, it was time to script everything, and let computers works alone. Mostly. Using udp-cast, I got a better solution than NFS or netcat: same speed, and over 16 clients at the same time. And so easy to deploy ...

The ghost server:

you need to set up pxe, tftp, http on it. (http can be deported on another server) The client will boot over PXE, downloading a sysrescuecd over http, and launch the script.

the dhcpd used is 3.0.4-13 from debian, pxe 1.4.2-5. An typical entry for a computer is:

option routers;
option domain-name-servers;

host techadmin {
        hardware ethernet 00:0f:fe:8F:23:D4;
        filename "pxelinux.0";

pxe.conf is modified to find file in /tftpboot

The /tftpboot/pxelinux.cfg/default configuration file contain a new entry:

label ghost
        kernel systemrescue/rescuecd
        append initrd=systemrescue/initram.igz scandelay=2 dodhcp setkmap=fr netboot=http://intranet.domain.tld/data/sysrcd.dat ar_source=http://intranet.domain.tld/data/install/  ar_nowait

the systemrescue/ directory is issue from SysrescueCd Project. Parameters are saiyng to ask for network with dhcp, set a french keyboard, download the live imagesysrcd.dat, launch the "autorun" script found in the ar_source directory, nd reboot after that.

The script itself

.. can be found here I suppose that computers are using dualboot (one or two NTFS, one Swap and one linux-ext3 partition) The script propose to install a full room at once (In this case, multicast will be used), or only one computer (NFS share will be used).

If you only have to reinstall Linux ou Windows this is available

Warning: the destination NTFS partition should have the same size than the saved partition.

When instaling both linux and windows, the partition table will be rewritten.

When using multicast, you must run, on server

cat master-sda1.img.gz_a* |udp-sender --portbase 19741 --ttl 1 --min-clients 16 --max-wait 240

The script will take care, at the end, to fix UUID on the linux and grub.