From Fedora Project Wiki

< Docs‎ | Drafts

Revision as of 05:56, 29 August 2012 by Immanetize (talk | contribs) (RFC1918 compliance)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


Warning.png
This page is a draft only
It is still under construction and content may change. Do not rely on the information on this page.

Documentation Summary: How to make a boot/network install server

Purpose: Ease deployment of Fedora Core in enterprise environments or install fests

Audience: IT, Ambassadors

Assumptions: The user understands at least basic network and TCP/IP configuration concepts.

Related Documents:

Lead Writer: NicolasCorrarello


Making a Network Install Server

Having a PXE network install server available on a network can help alleviate new installation workload on large and small networks by automating tasks that otherwise can require a fair amount of user input.

Fedora Core 6 includes a graphical utility (system-config-netboot) which helps ease initial configuration.

For this tutorial, the install network is 172.16.0.0/24, the server IP adress is 172.16.0.5, the gateway and the name (dns) server are 172.16.0.1.

Requirements

Some additional software packages (TFTP, DHCP, xinetd) are required, use yum to install them.

yum install system-config-netboot dhcp tftp xinetd

Network

The server needs a static IP address (172.16.0.5). Edit the file /etc/sysconfig/network-scripts/ifcfg-eth0 to look like this:

TYPE=Ethernet
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=static
BROADCAST=172.16.0.255
IPADDR=172.16.0.5
NETMASK=255.255.255.0
NETWORK=172.16.0.0

DHCP Server

Edit /etc/dhcpd.conf to look like this:

#
#
ddns-update-style none;
ignore client-updates;

subnet 172.16.0.0 netmask 255.255.255.0 {

option routers                  172.16.0.1;
option subnet-mask              255.255.255.0;

option domain-name              "pxe-server.local.localdomain.net";
option domain-name-servers      172.16.0.1;

option ntp-servers              172.16.0.2;

range dynamic-bootp 172.16.0.50 172.16.0.100;
default-lease-time 21600;
max-lease-time 43200;
}

allow booting;
allow bootp;
class "pxeclients" {
match if substring(option vendor-class-identifier, 0, 9) = "PXEClient";
next-server 172.16.0.5;
filename "linux-install/pxelinux.0";
}

If different network parameters or additional configuration options are being used, replace the options shown here with the appropriate values.

Stop (medium size).png
Remember
Only ONE DHCP should exist on a network segment!

Start the DHCP service:

service dhcpd start

NFS

Download the FC6 DVD ISO file, the SHA1SUM file, and the directory images /pxeboot and put it in an NFS export.

To get the directory from the ISO file, mount the image as a loopback file system:

mount -o loop -t iso9660 /path/to/FC-6-i386-DVD.iso /media/loop
mkdir /mnt/export/FC6/images
cp -r /media/loop/images/pxeboot /mnt/export/FC6/images/

In this example, the path to the FC6 ISO file is /mnt/export/FC6.

The result is a directory tree like this:

tree /mnt

|-- export
|   |-- FC6
|   |   |-- FC-6-i386-DVD.iso
|   |   |-- SHA1SUM
|   |   |-- images
|   |   |   <code>-- pxeboot
|   |   |       |-- README
|   |   |       |-- TRANS.TBL
|   |   |       |-- initrd.img
|   |   |       <code>-- vmlinuz
|   |   <code>-- ks.cfg

Next, /etc/exports needs a new entry about the export directory:

cat <<END_ENTRY >> /etc/exports
/mnt/export             172.16.0.0/24(ro)
END_ENTRY

Now the file should look like this:

cat /etc/exports
/mnt/export             172.16.0.0/24(ro)

Start the NFS service:

service nfs start

Netboot

Now start the system-config-netboot utility. Using the graphical utility, start via System > Administration > Server Configuration > Network Boot Service. Then select Network Install:

File:Docs Drafts NetworkInstall netboot 01.png

Check the default paths and IP address, they will differ based on what IP settings were used in the above configuration files.

File:Docs Drafts NetworkInstall netboot 00.png

  1. Operating system identifier -- The name, for example FC6
  2. Description: -- A more detailed description of the installation source
  3. Select protocol for installation: -- Choose NFS for this tutorial
  4. Kickstart: -- Point to a kickstart file. You can make a kickstart file with system-config-kickstart to automate the installation process.
  5. Server IP Address: -- The IP address of your installation server -- 172.16.0.5 for this tutorial
  6. Location: The path to your install software; this tutorial uses /FC6.

TFTP Server

Enable the TFTP server in xinetd:

chkconfig tftp on

Start the xinetd service

service xinetd start

Installation

Plug the target system(s) in to the network, choosing the option Booting from a network or Booting from onboard NIC. After the system has received an IP address, the boot process starts over PXE and a screen of choices appears:

  • Boot from local harddisk
  • Launch installation

This installs a system with Fedora Core 6 in usually less than a half-hour, but will vary based on system specifications and install options.

Monitoring

On the server you can control the work.

tail -f /var/log/messages

The output looks similar to this:

Mar 17 17:58:00 pxe-server xinetd[28877] : xinetd Version 2.3.14 started with libwrap loadavg labeled-networking options compiled in.
Mar 17 17:58:00 pxe-server xinetd[28877] : Started working: 0 available services
Mar 17 17:58:32 pxe-server dhcpd: DHCPDISCOVER from 55:44:33:22:11:00 via eth0
Mar 17 17:58:33 pxe-server dhcpd: DHCPOFFER on 172.16.0.99 to 00:11:22:33:44:55 via eth0
Mar 17 17:58:36 pxe-server dhcpd: DHCPREQUEST for 172.16.0.99 (172.16.0.5) from 00:11:22:33:44:55 via eth0
Mar 17 17:58:36 pxe-server dhcpd: DHCPACK on 172.16.0.99 to 55:44:33:22:11:00 via eth0
Mar 17 17:58:36 pxe-server in.tftpd[28881] : tftp: client does not accept options