Kickstarting Linux without a DHCP server

Kickstart is a super useful techology for performing Linux installations. Typically when you type linux ks=XXX from the boot menu:

boot: linux ks=floppy:/ks.cfg

The host will use DHCP to acquire an IP address. If a DHCP server isn’t available on the network you want to perform the kickstart on, you can forego DHCP and assign a static IP address by appending the “ip=,” “netmask=,” “gateway=” and “dns=” options to the kickstart command line:

boot: linux ks=flopp:/ks.cfg ip=192.168.1.10 netmask=255.255.255.0 gateway=192.168.1.1 dns=192.168.1.1

This can come in handy!

4 thoughts on “Kickstarting Linux without a DHCP server”

  1. Another nifty trick with kickstart is to combine it with PXE boot.

    As I don’t have the media here, I’m doing this from memory.

    1) Go into the pxe section of the images directory of the CentOS, Fedora, or Redhat installation media.
    2) Take the initrd there, unzip it and mount it via loopback, since it’s just an ext2 image. I think the later ones you’ll have to use cpio , since it’s an archive, not an image.
    3) Copy your ks.cfg into the root of that image. unmount it or repack the archive.
    4) Move the initrd and kernel into the tfpserver that you use for pxe boots.
    5) I use pxelinux to handle everything, but make sure you configure it to pass ks=file:/ks.cfg as an argument to the boot.
    6) voila! Everything should work peachy!

    Email me if I was a bit vague on some of the steps.

    P.S. Your math spam filter check didn’t appear to work so well when I had scripting turned off on this page.

  2. PXE booting is definitely the way to go, and I use it to bootstrap Solaris and Linux hosts at work and home. In this specific instance, we didn’t have time to get the infrastructure setup, so kickstarting using a static IP was a quick fix. Did the the math spam checker displays any errors?

  3. Nope, I went back through and checked after I had made the post and without javascript it’s displayed below the input box. Just didn’t see it.

    Check out unattended.sf.net Handy for doing windows installs from linux and pxe.

  4. “and I use it to bootstrap Solaris and Linux hosts at work and home” – Ryan, wouldn’t like to do a quick post on your setup at home would you? Do you run dhcp/pxe from Linux, or Solaris? Cheers!

Leave a Reply

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