January 22, 2017

Rolling Out Unattended Debian Installations (Part 2) - page 2

Giving Clients The Boot

  • December 13, 2004
  • By Carla Schroder

If you elect to use boot diskettes, rather than netbooting, simply use /usr/sbin/make-fai-bootfloppy, which comes with FAI, to create the diskettes. This little utility does a complete job: it installs GRUB as the bootloader, loads a kernel, and defaults to using DHCP to pick up all the network information. Sometimes it's easier to use diskettes than to fuss with getting netbooting working. You may use both, FAI doesn't care.

Edit the sample /usr/share/doc/files/examples/etc/dhcpd.conf so that it has your own server name and network IPs. Then copy it to /etc/dhcp3/dhcpd.conf. Then you'll need to collect all the client MAC addresses, then assign a hostname and IP address to each client in /etc/dhcp3/dhcpd.conf. I know, this is boring and tedious and no fun. But it's a necessary step.

The author of FAI, Thomas Lange, has thoughtfully provided an easy way to collect and order the MAC addresses with tcpdump. First, run this command on the FAI server. You can call the output file anything you like:

# tcpdump -qte broadcast and port bootpc > /tmp/mac.list

Then power up all of the client PCs. They will send out broadcast packets, trying to figure out who and where they are. They won't get answers, because dhcpd is not running yet, so they may experience self-esteem issues. But it's only temporary, so don't worry about it. Halt tcpdump with Ctrl+C, then use this command to sort out your tcpdump capture:

# perl -ane 'print "\U$F[0]\n"' /tmp/mac.list | sort | uniq

Now you must take all the client MAC addresses, and make entries in /etc/dhcp3/dhcpd.conf assigning each one a hostname and IP address, like this:

host workstation1 {
� ��� hardware ethernet 0:4:5A:DC:37:F3;
� ���fixed-address;

host workstation2 {
� ��� hardware ethernet 0:A:E4:40:8B:FD;
� ���fixed-address;

Now restart the DHCP server:

# /etc/init.d/dhcp3-server restart

You can also get the MAC addresses by booting the client PCs with a bootable rescue disk like Knoppix or tomsrtbt, and running /sbin/ifconfig.

Sitemap | Contact Us