• VMware

    Learn about VMware virtualization for its products like vsphere ESX and ESXi, vCenter Server, VMware View, VMware P2V and many more

  • Linux

    Step by step configuration tutorials for many of the Linux services like DNS, DHCP, FTP, Samba4 etc including many tips and tricks in Red Hat Linux.

  • Database

    Learn installation and configuration of databases like Oracle, My SQL, Postgresql, etc including many other related tutorials in Linux.

  • How to perform interactive kickstart installation on Red Hat

    Kickstart is used to perform an automated installation where no manual intervention would be needed but there are times when we want the end user to fill in some needed details for eg keyboard type, network details etc so kickstart must wait and prompt for these information before the installation is completed.

    Here I have written an article to automate a customized DVD installation using kickstart file

    Now suppose in the same DVD installation you want the installation to halt and prompt for network.

    This can be done using the %pre and %post installation scripts from the kickstart file.

    # vim ks.cfg

    # Network Information
    %include /tmp/network.ks

    # Create a %pre section as below
    %pre --interpreter=/usr/bin/bash
    exec < /dev/tty6 > /dev/tty6 2> /dev/tty6
    chvt 6

     read -p "Enter INS hostname    : " HOSTNAME
     read -p "Enter IP Address      : " IPADDR
     read -p "Enter NetMask         : " NETMASK
     read -p "Enter Gateway         : " GATEWAY
    sleep 1

    echo "network --bootproto=static --hostname=$HOSTNAME --device=eth0 --gateway=$GATEWAY --ip=$IPADDR --netmask=$NETMASK --noipv6 --nodns --onboot=on --activate" > /tmp/network.ks

    chvt 1
    exec < /dev/tty1 > /dev/tty1 2> /dev/tty1

    Here we are halting the automated installation, switching to terminal 6 and prompting user for hostname and network details and the same is populated into "/tmp/network.ks"

    which is added as in the ks,cfg
    %include /tmp/network.ks
    so kickstart will collect this input and store it in the ks.cfg. Once ks.cfg gets all the needed information we have to again switch back the console to tty1 where the actual installation was happening so we do it using the last two lines before %end.

    I have used these steps in Red Hat 6 and 7 and seems to work very well.

    Follow the below links for more tutorials

    How to find the path of any command in Linux
    How to configure a Clustered Samba share using ctdb in Red Hat Cluster
    How to delete an iscsi-target from openfiler and Linux
    How to perform a local ssh port forwarding in Linux
    How to use yum locally without internet connection using cache?
    What is umask and how to change the default value permanently?
    Understanding Partition Scheme MBR vs GPT
    How does a successful or failed login process works in Linux
    How to find all the process accessing a file in Linux
    How to exclude multiple directories from du command in Linux
    How to configure autofs in Linux and what are its advantages?
    How to resize software raid partition in Linux
    How to configure Software RAID 1 mirroring in Linux
    How to prevent a command from getting stored in history in Linux

    How to perform interactive kickstart installation on Red Hat How to perform interactive kickstart installation on Red Hat Reviewed by Deepak Prasad on Thursday, June 01, 2017 Rating: 5

    No comments:

    Powered by Blogger.