Installing a Glued Linux Box Using another Linux box as bootserver


Netbooting/glue install of linux box with another linux box as bootserver

The standard glue pages discuss how to install a Glued linux box using a Sun box as the boot server. This page contains some changes to allow one to boot using another Glue'd linux box as the net boot server.

Initial steps

The initial steps are the same, including the setup of the client in the config tree, and obtaining a license. The main changes occur in the setup and clean up of the server. All of the commands below assume you are root on the boot server.

tftpd setup

First off, you must enable tftp on the boot server linux box. This is basically the same procedure as on a Sun server, namely copy the old inetd.conf to inetd.conf.hold, and then add the line:

tftp dgram udp wait root /usr/daemons/tcpd /usr/daemons/in.tftpd -s /tftpboot
(this should be a single line) to /etc/inetd.conf, and then HUP the inetd process. The one change is that due to firewalling on the linux server, you will need to issue the commands:
/sbin/iptables -A machine-optional -p tcp --dport tftp -j ACCEPT
/sbin/iptables -A machine-optional -p udp --dport tftp -j ACCEPT
(this should be two lines, each starting with the iptables command.)

dhcpd setup

Next, you must configure the dhcp server. This is rather different than on Sun due to the different dhcpp server software used (ISC on linux). You can copy the file

/dept/phys/software/dhcpd/local/ISC/glue-install-stuff/dhcpd.conf
to your boot server system, say to
/etc/dhcpd.conf.temp
(the exact location is not important, but if you change it will need to change in some commands below as well). You will need to edit this file to match your subnet and for your build host. The file contains a stanza starting something like
#Update the next 3 lines with information for YOUR subnet
subnet 172.2.40.0 netmask 255.255.252.0
{       option domain-name "physics.umd.edu";
        option routers 172.2.40.1;
You need to change the subnet and mask to match your subnet, as well as the gateway. You will likely want to change the default domain as well.

For each host you plan to build, you need to add a stanza of the form

	host myinstallhost
        {       hardware ethernet 01:04:1e:64:01:ce;
                fixed-address 172.2.41.1;
        }
This should be added within the stanza for the particular linux build (only REL30 is currently available, but others may get added at some point).

When all this is ready, you just need to start the dhcp server, with

/dept/phys/software/dhcpd/current-ISC/sbin/dhcpd -cf /etc/dhcpd.conf.temp
replacing the last argument with the name you saved the sample dhcpd.conf file to. You may get errors about the dhcpd.leases file, in which case you may need to do the following
mkdir /var/state
mkdir /var/state/dhcp
touch /var/state/dhcp/dhcpd.leases

You will also need to punch holes in firewall for the dhcp server, as follows

/sbin/iptables -A machine-optional -p tcp --dport bootps -j ACCEPT
/sbin/iptables -A machine-optional -p udp --dport bootps -j ACCEPT

netbooting

You should now be able to boot the machine from the network, and install linux. This is the same as in the Sun boot server case.

cleaning up the server

Now to clean up the server. Copy the original copy of /etc/inetd.conf back (or just delete the line relating to tftp), and HUP the inetd process again.

Kill the dhcpd process with the command

kill `cat /var/run/dhcpd.pid`

Patch the holes in the firewall, e.g.

/sbin/iptables -D machine-optional -p tcp --dport bootps -j ACCEPT
/sbin/iptables -D machine-optional -p udp --dport bootps -j ACCEPT
/sbin/iptables -D machine-optional -p tcp --dport tftp -j ACCEPT
/sbin/iptables -D machine-optional -p udp --dport tftp -j ACCEPT

Remove any stray files, like /etc/dhcpd.conf.temp


Main Physics Dept site Main UMD site


Valid HTML 4.01! Valid CSS!