Server Setup to boot your PXE client - Setup

This is a discussion on Server Setup to boot your PXE client - Setup ; Hi Folks, Please comment on the accuracy and completeness of this post, for the benefit of those that follow. Including me, when I try to remember what I was talking about six months from now... :-) I did this with ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: Server Setup to boot your PXE client

  1. Server Setup to boot your PXE client

    Hi Folks,

    Please comment on the accuracy and completeness of this post, for the
    benefit of those that follow. Including me, when I try to remember
    what I was talking about six months from now... :-)

    I did this with RedHat Fedora 8, but I don't think there is much
    distribution specific stuff in it. Please review and post the changes
    that your own distribution would require.

    Also, please notice that there is an opportunity for contribution in
    terms of the PXE stack on the client and how to accomplish this for
    those clients that haven't got this feature.

    Chris.


    #================================================= ======================
    #================================================= ======================
    #
    # Set up TFTP
    #
    #-----------------------------------------------------------------------
    yum install tftp-server

    mkdir -p /var/tftp/pxelinux.cfg
    cd /var/tftp
    #
    # Copy EVERYTHING from the distribution installation media
    # boot.iso/isolinux directory. Don't touch it. Paths are
    # relative to the location of pxelinux.0
    #
    cp /path/to/distribution/installation.iso/images/boot.iso/isolinux/* .
    mv isolinux.cfg pxelinux.cfg/default
    #
    # Find pxelinux.0 (on the net) and copy it to /var/tftp/pxelinux.0
    #

    #
    # Poke a hole in the firewall for ports 67 (tftp) and 69 (bootps)
    #

    #
    # Restart the xinet service
    #
    service xinetd restart

    in /var/log/messages you will see:

    xinetd[18537]: xinetd Version 2.3.14 started with libwrap loadavg
    labeled-networking options compiled in.
    xinetd[18537]: Started working: 1 available service
    #================================================= ======================
    #================================================= ======================
    #
    # Set up DHCP
    #
    #-----------------------------------------------------------------------
    yum install dhcp

    #
    # Install DHCP. Include this minimum stanza in /etc/dhcpd.conf
    # You can add more later...
    #
    ddns-update-style interim;
    subnet 10.0.0.0 netmask 255.255.255.0
    {
    range dynamic-bootp 10.0.0.225 10.0.0.254;
    filename "pxelinux.0";
    }

    #
    # Restart the dhcp service
    #
    service dhcpd restart

    in /var/log/messages you will see:

    dhcpd:
    dhcpd:
    dhcpd: Listening on LPF/eth0/00:c0:9f:22:67:91/10.1.2/24
    dhcpd: Sending on LPF/eth0/00:c0:9f:22:67:91/10.1.2/24
    dhcpd: Sending on Socket/fallback/fallback-net
    #================================================= ======================
    #================================================= ======================

    #
    # If your client does NOT have a PXE enabled ROM on the NIC ...
    #


    #
    # Boot the PXE stack for the client.
    #

    :
    :

    in /var/log/messages you will see:

    dhcpd: DHCPDISCOVER from 00:08:74:e4:eb:a6 via eth0
    dhcpd: DHCPOFFER on 10.0.0.254 to 00:08:74:e4:eb:a6 via eth0
    dhcpd: DHCPREQUEST for 10.0.0.254 (10.1.2.11) from 00:08:74:e4:eb:a6
    via eth0
    dhcpd: DHCPACK on 10.0.0.254 to 00:08:74:e4:eb:a6 via eth0
    in.tftpd[18864]: tftp: client does not accept options


    On your client you will see the same screen that you would see if you
    were installing from this installation media using whatever method you
    would normally use.
    #================================================= ======================

  2. Re: Server Setup to boot your PXE client

    "Chris" wrote
    > Hi Folks,
    >
    > Please comment on the accuracy and completeness of this post, for the
    > benefit of those that follow. Including me, when I try to remember
    > what I was talking about six months from now... :-)
    >
    > I did this with RedHat Fedora 8, but I don't think there is much
    > distribution specific stuff in it. Please review and post the changes
    > that your own distribution would require.
    >
    > Also, please notice that there is an opportunity for contribution in
    > terms of the PXE stack on the client and how to accomplish this for
    > those clients that haven't got this feature.
    >
    > Chris.


    Thanks Chris - that's very interesting. I've been wanting to set up a bootp
    server for my network for a while now, so I'll start from this. I posted
    here a few weeks ago asking about how to configure dhcpd for "bootp
    promiscuity" (ie. offering boot files without requiring MAC addresses) - it
    looks like you might have solved that for me.

    I run Debian (Lenny), so I'll post any changes I make in this thread.

    Cheers,

    Chris



  3. Re: Server Setup to boot your PXE client

    On Thu, 13 Mar 2008 08:45:57 -0700, Chris wrote:

    > cp /path/to/distribution/installation.iso/images/boot.iso/isolinux/* .
    > mv isolinux.cfg pxelinux.cfg/default
    > #


    Just minor points:

    We've been doing this for a while, and it's helpful to keep the TFTP area
    highly organized. So Fedora 8 kernel and initrd might be stored in /var/
    tftp/fedora/8/i386 or some such thing. The kernel entries can be
    modified to reflect this.

    It's also convenient to have a separate configuration file for each
    "major image" (ie. Fedora-8-i386-workstation, CentOS-5-x86_64-server,
    etc.) in the pxelinux.cfg area, and then create the necessary symbolic
    links from the ARP-named file for a given server to the configuration you
    want to see booted. This makes completely hands-off installs quite
    convenient.

    We actually linked the ARP-named file to a file named with each machine's
    inventory ID, and then link that file to the necessary startup
    configuration. That makes it a little easier as we don't need to know a
    machine's ARP address (except for when its first put into our system);
    just the inventory ID (which is printed right on the machine).

    I didn't see anything about the actual OS install. You'll want the
    installation tree to be available (ie. via HTTP or NFS). You can specify
    this URL in the Kickstart file. You can specify the location of the
    Kickstart file in the kernel line with an option like:

    ks=http://pxeboot.internal.yourdomain/fedora-8-i386-server.cfg

    That Kickstart file defines the installation. Again, this facilitates a
    completely hands-off install.

    I'm not sure which distributions do/don't use Kickstart though, but
    everything in the "Redhat" world does.

    With respect to setting the NIC to support PXE, this is not really
    standardized; one just needs to learn how a particular BIOS does it I'm
    afraid. Fortunately, it's usually pretty easy to find.

    The other item you might want to consider, for servers, is to also set
    the serial port as a console and to do the installation headless. As
    long as the BIOS supports this (and many do, nowadays), this further adds
    convenience as you can watch the installation remotely.

    - Andrew

+ Reply to Thread