Select Your Language

Infrastructure and Management

Cloud Computing

Storage

Runtimes

Integration and Automation

  • Comments
  • Kickstart Post Install Script

    Posted on

    I am trying to get a post install script to run through my kickstart file. It does not run at all (none of the results of the commands seem to be in effect) and there is no log file created. Can someone help me figure this out?

    Thanks!

    #version=DEVEL
    # System authorization information
    auth --enableshadow --passalgo=sha512
    repo --name="Server-HighAvailability" --baseurl=file:///run/install/repo/addons/HighAvailability
    repo --name="Server-ResilientStorage" --baseurl=file:///run/install/repo/addons/ResilientStorage
    # Use CDROM installation media
    cdrom
    # Use graphical install
    graphical
    # Run the Setup Agent on first boot
    firstboot --disable
    ignoredisk --only-use=sda
    # Accept Eula
    eula --agreed
    # Reboot after installing
    reboot
    # Keyboard layouts
    keyboard --vckeymap=us --xlayouts='us'
    # System language
    lang en_US.UTF-8
    
    # Network information
    network  --bootproto=dhcp --device=em1 --onboot=off --ipv6=auto --no-activate
    network  --bootproto=dhcp --device=em2 --onboot=off --ipv6=auto
    network  --hostname=localhost.localdomain
    
    # Root password
    rootpw --iscrypted $6$WQRG6/wAAivFH8Oc$Oth7T3s7.cN9eKuuYYen9/wF7/y4j8xltVvLTYbwKIeDtFwNj9CQ7CzeByzOkMBhsFiCdXWkCsr5ZNT8ZFOvi1
    # System services
    services --disabled="chronyd"
    # System timezone
    timezone America/Chicago --isUtc --nontp
    # X Window System configuration information
    xconfig  --startxonboot
    # System bootloader configuration
    bootloader --append=" crashkernel=auto" --location=mbr --boot-drive=sda
    autopart --type=lvm
    # Partition clearing information
    clearpart --all --initlabel --drives=sda
    
    %packages
    @^graphical-server-environment
    @base
    @core
    @desktop-debugging
    @dial-up
    @fonts
    @gnome-desktop
    @guest-agents
    @guest-desktop-agents
    @hardware-monitoring
    @input-methods
    @internet-browser
    @multimedia
    @print-client
    @x11
    kexec-tools
    
    %end
    
    %addon com_redhat_kdump --enable --reserve-mb='auto'
    
    %end
    
    %post --log=/root/ks-post.log
    yum -y remove gnome-initial-setup
    chmod 777 /etc/xdg/autostart/gnome-initial-setup-first-login.desktop
    echo 'X-GNOME-Autostart-enabled=false' >> /etc/xdg/autostart/gnome-initial-setup-first-login.desktop
    mkdir /etc/skel/.config
    echo 'yes' >> /etc/skel/.config/gnome-initial-setup-done
    %end
    
    %anaconda
    pwpolicy root --minlen=6 --minquality=50 --notstrict --nochanges --notempty
    pwpolicy user --minlen=6 --minquality=50 --notstrict --nochanges --notempty
    pwpolicy luks --minlen=6 --minquality=50 --notstrict --nochanges --notempty
    %end
    

    by

    points

    Responses

    Red Hat LinkedIn YouTube Facebook X, formerly Twitter

    Quick Links

    Help

    Site Info

    Related Sites

    © 2026 Red Hat