Archive for the ‘Kickstart’ Category

Kickstart installation guide for CentOS 5.5

This guide explain how to install and configure kickstart server for network based deployments of CentOS, from an NFS share.
The instructions should work the same on RedHat and Fedora.

Pre-requirement

  • CentOS 5.5 DVD
  • Static IP address for the Kickstart/DHCP server
  • /data partition
  • In case using CISCO switches, “Spanning tree port fast” must be enabled.

Installation phase

  1. Login to the CentOS server using Root account.
  2. Mount the CentOS DVD:
    mount /dev/cdrom /media
  3. Move to the CentOS RPM folder inside the DVD:
    cd /media/CentOS
  4. Run the command bellow to install the TFTP-Server:

    rpm -ivh xinetd-2.3.14-10.el5.i386.rpm
    rpm -ivh tftp-server-0.49-2.el5.centos.i386.rpm
  5. Run the command bellow to install the DHCP server:
    rpm -ivh dhcp-3.0.5-23.el5.i386.rpm
  6. Create new folder for the Kickstart server:
    mkdir -p /data/kickstart
  7. Edit using VI, the file /etc/xinetd.d/tftp and change the following settings:
    From:
    disable = yesTo:
    disable = noFrom:
    server_args = -s /tftpbootTo:
    server_args = -s /data/kickstart
  8. Run the command bellow to start the TFTP server:
    /sbin/service xinetd start
  9. Run the command bellow to start the TFTP server run at startup:
    chkconfig xinetd on
  10. Edit using VI, the file /etc/dhcpd.conf and add the following lines:
    ddns-update-style none;
    allow bootp;
    allow booting;
    subnet 10.1.1.0 netmask 255.255.255.0 {
    option routers 10.1.1.254;
    option domain-name-servers 10.1.1.2;
    next-server 10.1.1.1;
    filename "pxelinux.0";
    range dynamic-bootp 10.1.1.200 10.1.1.210;
    }
    Note 1: Replace 10.1.1.0 with the correct network ID.
    Note 2: Replace 255.255.255.0 with the correct subnet mask.
    Note 3: Replace 10.1.1.254 with the correct default gateway.
    Note 4: Replace 10.1.1.1 with the Kickstart server IP address.
    Note 5: Replace 10.1.1.200 with the first IP of the DHCP pool.
    Note 6: Replace 10.1.1.210 with the last IP of the DHCP pool.
    Note 7: Replace 10.1.1.2 with the correct DNS server.
  11. Start the DHCP server
    service dhcpd start
  12. Run the command bellow to start the DHCP server run at startup:
    chkconfig dhcpd on
  13. Copy Boot Files
    cp /usr/lib/syslinux/{pxelinux.0,menu.c32,memdisk,mboot.c32,chain.c32} /data/kickstart
  14. Create a folder for the PXE menu files:
    mkdir -p /data/kickstart/pxelinux.cfg
  15. Move to the CentOS DVD root folder:
    cd /media
  16. Copy vmlinuz and initrd.img from the DVD to the images directory:
    cp /media/images/pxeboot/{vmlinuz,initrd.img} /data/kickstart/images
  17. Create the CentOS DVD structure:
    cp -r CentOS /data/kickstart/
    cp -r isolinux /data/kickstart/
    cp -r repodata /data/kickstart/
    cp -r images /data/kickstart/
  18. Create using VI, the file /data/kickstart/pxelinux.cfg/default with the following content:
    default menu.c32
    prompt 0
    MENU TITLE PXE Menu
    LABEL CentOS
    MENU LABEL CentOS
    KERNEL images/vmlinuz
    append initrd=images/initrd.img vga=normal network ks=nfs:10.1.1.1:/data/kickstart/ks.cfg text
    Note: Replace 10.1.1.1 with the Kickstart server IP address.
  19. Create an unattended installation script /data/kickstart/ks.cfg
    Note: Make sure the file starts with the following lines:
    install
    nfs --server=10.1.1.1 --dir=/data/kickstart
    Note 1: Replace 10.1.1.1 with the Kickstart server IP address.
    Note 2: Make sure the lines beginning with “cdrom” and “url” does not exist on the file.
    Note 3: To review ks.cfg file options, see the link:
    http://www.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/5.4/html/Installation_Guide/s1-kickstart2-options.html
  20. Edit using VI, the file /etc/exports and add the following line:
    /data/kickstart *(ro,no_root_squash)
  21. Start the NFS service:
    service portmap start
    service nfs start
    chkconfig nfs on
Print Friendly, PDF & Email
Search This Blog
NetworkedBlogs