Ubuntu 10.04 PXE cross-LAN automatic installation method

  
Before we learned that Ubuntu 10.04 system can be automatically installed in the LAN PXE, today we will learn how to implement automatic system on different LAN clients (client) installation.

1. Principles
1. Firstly, the interoperability of the whole network can be pinged, which is the basis for realizing the automatic installation system across LAN.
2. Set up a dhcp server in the LAN of 192.168.2.0/24. The reason why the dhcp server is set up in the LAN where the client is located is because the dhcp server can automatically obtain the ip address and can also specify the route and specify tftp. Server. The specified route is equivalent to the default gateway so that the client can communicate with the PXE server. The specified tftp server client can download the pxelinux.0 file and the kernel boot file through the tftp protocol. Know the location of the ks.cfg file via the text.cfg file, download and follow the steps in the ks.cfg file to install the system. The ks.cfg file knows that the system installation file is in the /var/www/ubuntu directory of 192.168.0.105, requesting the installation file to be installed.
Second, actual combat articles
1. Realize the interoperability of the whole network
Point the gateway of PXE Server to 192.168.0.111, the gateway of dhcp server points to 192.168.2.1
Do the routing on the host of 192.168.0.111:# Route add default gw 192.168.1.1
Do the routing on the 192.168.2.1 host: #route add default gw 192.168.1.2
Measure the connectivity on the client dhcp server: (of course ping is the easiest)

This way the whole network will be interoperable.
2. Client dhcp server settings:
#vim /etc/dhcp3/dhcpd.conf
subnet 192.168.2.0 netmask 255.255.255.0 {
range 192.168.2.100 192.168.2.200;
option domain-name "192.168.2.2";
option domain-name-servers 192.168.2.2;
option routers 192.168.2.1; #This is the specified client gateway: 192.168.2.1
Default-lease-time 600;
max-lease-time 7200;
next-server 192.168.0.105; #here specifies tftp server as 192.168.0.105
filename "pxelinux.0";
}
For the client, the setting of dhcp server is very important. Of course, you can also use dhcp relay and routing.
Three, test installation
client allocated ip is: 192.168.2.101, gateway: 192.168.2.1
tftp server: 192.168.0.105

This is the automatic installation of the system across the LAN after the setting Already done. Although there are not many steps, it is still necessary for users to follow the steps carefully, in order to keep this method in mind.

Copyright © Windows knowledge All Rights Reserved