OS Deployment: Summary

This page contains a shortened version of all of my OS Deployment articles. As I add articles, I’ll update this page to include only the specific instructions outlined in each article. Consider this the short-hand version, and a work-in-progress.

DHCP Server Configuration

[Full Article]

Microsoft DHCP

  • enable option 066 Boot Server Host Name in either the global scope or a specific scope, and set the value to your TFTP server’s IP address
  • enable option 067 Bootfile Name in either the global scope or a specific scope, and set the value to pxelinux.0

ISC DHCPD

Add the following block to your dhcpd.conf file, again either in the global scope or a specific scope:

if substring ( option vendor-class-identifier, 0, 9 ) = "PXEClient" {
     next-server <TFTP server’s IP address>;
     filename “pxelinux.0?;
}

TFTP Server Configuration

[Full Article]

Details

  • install tftpd-hpa (Ubuntu) or tftp-hpa (Gentoo), whichever gets you the tftp server for your Linux distribution
  • as root, run mkdir -p /var/lib/tftpboot/pxelinux.cfg/ && mkdir -p /var/lib/tftpboot/linux/
  • create or edit /etc/xinetd.d/tftp if you’re using xinetd; /etc/conf.d/in.tftpd if you’re running tftp-hpa on Gentoo; include the following command-line arguments for tftp-hpa: -s /var/lib/tftpboot and -m /var/lib/tftpboot/pxelinux.cfg/remap
  • create /var/lib/tftpboot/pxelinux.cfg/remap your favorite text editor, with the following content:
    rg \\ /
    rg ([A-Z]) \L\1
    

PXELinux

[Full Article]

Details

  • install syslinux, and copy pxelinux.0, memdisk, menu.c32 and vesamenu.c32 to /var/lib/tftpboot/
  • mount your Linux install media, and – for RedHat and derivatives like Fedora Core – copy images/pxeboot/vmlinuz and images/pxeboot/initrd.gz to /var/lib/tftpboot/linux/
  • create /var/lib/tftpboot/pxelinux.cfg/default using your favorite text editor, with the following contents:
    default graphics
    timeout 100
    prompt 1
    label text
      kernel linux/vmlinuz
      append initrd=linux/initrd.gz text
    
    label graphics
      kernel linux/vmlinuz
      append initrd=linux/initrd.gz
  • test your setup using a PXE client, and you should end up in Anaconda (the RedHat/Fedora Core installer)

Advanced PXELinux

[Full Article]

Details

  • Alter /var/lib/tftpboot/pxelinux.cfg/default to (changes are in bold):
default vesamenu.c32
prompt 0
timeout 100
menu title PXE Boot Menu
menu autoboot Starting graphics-mode Linux installer in # seconds

label graphics
  menu default
  menu label Linux Installer (Graphics Mode)
  TEXT HELP
  Installs Linux using the GUI installer
  ENDTEXT
  kernel linux/vmlinuz
  append initrd=initrd.gz

label text
  menu label Linux Installer (Text Mode)
  TEXT HELP
  Installs Linux using a text-mode installer
  ENDTEXT
  kernel linux/vmlinuz
  append initrd=initrd.gz text

Automated Linux Installation

[Full Article]

Details

  • setup an NFS or HTTP server to host your installation sources
  • copy the contents of the installation media to an NFS exported or HTTP-accessible directory on your NFS/HTTP server.
  • use a PXE client to boot from the network
  • select the Linux Installer from the PXE menu and press ENTER (either graphics or text mode – doesn’t matter much for this installation, so use whatever works with your PXE client)
  • when prompted for the source location, choose appropriately: if you setup an HTTP export using Apache or IIS, you’ll want to choose HTTP; if you setup an NFS export, you’ll want to choose NFS
  • when prompted, enter the server name and path to your installation sources
  • install your distribution however you want (but keep in mind that the choices you make here will be applied to all future installations, so keep it simple and lean)
  • once the installation is complete, copy /root/anaconda.ks to your installation source export directory, and rename the file so that it’s obvious what distribution you installed (e.g. mv anaconda.ks fc10x86.ks)
  • modify /var/lib/tftpboot/pxelinux.cfg/default, adding ks=<protocol>://<server name>/<filename>.ks to the end of your Linux Installer lines, where <protocol> is either nfs or http depending on how you configured you installation source export location, <server name> is the system containing your installation sources, and <filename> is the path and filename of the renamed anaconda.ks file from the previous step:
    default vesamenu.c32
    prompt 0
    timeout 100
    
    menu title PXE Boot Menu
    menu autoboot Starting graphics-mode Linux installer in # seconds
    
    label graphics
      menu default
      menu label Linux Installer (Graphics Mode)
      TEXT HELP
      Installs Linux using the GUI installer
      ENDTEXT
      kernel linux/vmlinuz
      append initrd=initrd.gz ks=http://install/sources/server/and/path/anaconda.ks
    
    label text
      menu label Linux Installer (Text Mode)
      TEXT HELP
      Installs Linux using a text-mode installer
      ENDTEXT
      kernel linux/vmlinuz
      append initrd=initrd.gz text ks=http://install/sources/server/and/path/anaconda.ks

Leave a Reply

Your email address will not be published. Required fields are marked *