Hi again,
I’ve been busy testing out the way you can install an operating system, mainly Linux at this stage, directly from booting up your computer/server.
Server
- You need a server operating system, in this case I am using Fedora Core 6 – but I have also applied the principles to Ubuntu, capable of running DHCP and TFTP services.
- Enough hard drive space for the server operating system and also enough space to store the contents of the downloaded discs.
Client
- The minimum requirement is a network card, NIC, with a network boot ROM on and a hard drive with enough space for an operting sytstem of cours.
General Connections
- A network switch or hub is recommended, although a cross-over cable would suffice (and proably be fairly quick).
So, now onto the specific server requirements…
- Download Fedora Core 6 here.
- Burn the discs and install a minimum setup – this should help.
- create a folder /Fedora and copy the dics 1 contents into this folder.
- copy the contents of the directories Fedora/RPMS from each additional disc into the newly created folder /Fedora/RPMS/ (no need to overwrite anything).
- make sure you have system-config-netboot/httpd/dhcp/tftp-server installed on the server system. use the command.
yum install -y system-config-netboot httpd dhcp tftp-server
DHCP.conf configuration/setup
- Supply information so that the connecting machines know the network details as to whewre to find the operating system installlation files. Soedit the config file using:
nano /etc/dhcp.conf
A basic configuration follows:
ddns-update-style none;
option domain-name-servers 192.168.0.1;
default-lease-time 86400;
max-lease-time 604800;
authoritative;
subnet 192.168.0.0 netmask 255.255.255.0 {
range 192.168.0.200 192.168.0.229;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.0.255;
option routers 192.168.0.1;
filename “pxelinux.0″;
next-server 192.168.0.100;
}
An explanation,taken from the source of this dhcp tutorial found here, follows:
I explain the configuration options here:
* ddns-update-style: You can tell the DHCP server to update a DNS server if the IP address of a server in your LAN has changed (because it has been assigned a different IP by DHCP). As we do not run servers in our LAN or always give them static IP addresses (which is a good idea for servers...) we don't want to update DNS records so we set this to none.
* option domain-name-servers: This tells the DHCP server which DNS servers it should assign to a client. You can specify more than one DNS server here, seperated by commas.
* default-lease-time, max-lease-time: A client can tell the DHCP server for how long it would like to get an IP address. If it doesn't do this, the server assigns an IP address for default-lease-time seconds; if it does, the server grants the requested time, but only up to max-lease-time seconds.
* authoritative: If this is not set this means that if a client requests an address that the server knows nothing about and the address is incorrect for that network segment, the server will _not_ send a DHCPNAK (which tells the client it should stop using the address.) We don't want this so we set authoritative.
* subnet: The subnet to use.
* netmask: The netmask to use.
* range: Tells the DHCP server from which range it can assign IP addresses to clients. In our example it's from 192.168.0.200 to 192.168.0.229 (30 IP addresses).
* option broadcast-address: The broadcast address to use.
* option routers: Tells the DHCP server the gateway address it should assign to requesting clients. In our case the gateway is 192.168.0.1.
The last two lines I have added myself,
filename "pxelinux.0";
next-server 192.168.0.100;
this tells the network installation machine to load the “pxelinux.0″ image from the server 192.168.0.100.
Start the DHCP server using:
/etc/init.d/dhcpd start
Hopefully, no errors. now to ensure the dhcp server always starts after rebooting run:
chkconfig dhcpd on
Configure WebSite Alias
The install requires a running web-server from which the files are transferred to the new installation machine.
Therefore, we add an alias to the web-server, which we will call /fedora. The alias will point to the physical directory /Fedora. Open the web-server configuration file using:
nano /etc/httpd/conf/httpd.conf
and add the directory with its alias to the end of the file:
Allow from 192.168.0.0/24
AllowOverride Nonealias /fedora /Fedora
Network Boot Configuration/Setup
To install our initial netboot install run:
system-config-netboot
and choose “Network Install”.
Now add the name of your install – say “Fedora Core 6″.
Add the location of the install files, using 192.168.0.100/24 we add the line:
192.168.0.100/fedora
The location of our kickstart file will be at 192.168.0.100/fedora/ks.cfg
——————————————————————-
Hopefully, that should just about get you going with a great PXE nertwork install.
Please let me know if I can improve this tutorial or adapt it to suit your needs.
Costa