Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Red Hat This forum is for the discussion of Red Hat Linux.


  Search this Thread
Old 07-08-2009, 07:19 AM   #1
LQ Newbie
Registered: Aug 2007
Posts: 4

Rep: Reputation: 0
Handling Kickstart post-install script GUI


I'm experimenting with Kickstart/Centos5.3

Basic question: How can you handle interactive questions from within a kickstart environment, with a graphical installer?

All of my scripts work fine under a text-only install, but when (Anaconda?) is running a GUI and gets to the post-install scripts, my one and only interactive script causes problems.

Basically, I think my script is waiting for input, but (Anaconda?) is hiding the interface. What I see is the graphical install, but it sits there at post-install.

The script is there to ask for the hostname:

function sethostname
#setup hostname
echo "`date`,sethostname,start" >> $LOG
exec < /dev/tty6 > /dev/tty6
chvt 6
echo -n "What is my hostname?? : "
read linein
linein=`echo $linein | tr '[:lower:]' '[:upper:]'`
#remove old
cp $FILE $FILE.centos
grep -v HOSTNAME= $FILE.centos > /tmp/a
echo HOSTNAME=$linein >> /tmp/a
mv /tmp/a $FILE
echo "OK: Hostname will be $linein"
echo "`date`,sethostname,stop,$LINEIN" >> $LOG
sethostname is called from a script higher up. I found I had to switch tty's.

My ks.cfg is:

#platform=x86, AMD64, or Intel EM64T
#vnc --password=secret
# System authorization information
auth --useshadow --enablemd5
# System bootloader configuration
bootloader --location=mbr
# Partition clearing information
clearpart --linux --initlabel
# Use graphical install
# Firewall configuration
firewall --disabled
# Run the Setup Agent on first boot
firstboot --disable
# System keyboard
keyboard uk
# System language
lang en_GB
# Installation logging level
logging --level=info
# Use network installation
url --url=http://centosmirror.ubiquisys.local/centos/5/os/i386/
repo --name Updates --baseurl=http://centosmirror.ubiquisys.local/centos/5/updates/i386/
#Root password
rootpw --iscrypted xxxxxx
# SELinux configuration
selinux --permissive
# System timezone
timezone Europe/London
# Install OS instead of upgrade
# X Window System configuration information
xconfig --defaultdesktop=GNOME --depth=8 --resolution=1024x768
#POST Install scripts
cd /root
echo "cd /root
rm /root/ 2> /dev/null
wget http://centosmirror.ubiquisys.local/
sh /root/
rm -f /root/" >

( is the parent script that in turn calls the function sethostname)
Old 07-08-2009, 03:44 PM   #2
LQ Newbie
Registered: Jul 2009
Posts: 12

Rep: Reputation: 0
We use kick start with cobbler and build the profiles for the servers etc. The best way is to do a text install and feed it all the required information.
Old 07-10-2009, 09:43 AM   #3
LQ Newbie
Registered: Aug 2007
Posts: 4

Original Poster
Rep: Reputation: 0
Cobbler ?
Old 08-10-2009, 10:37 PM   #4
LQ Newbie
Registered: Aug 2009
Posts: 3

Rep: Reputation: 0

thanks so much for useful info
Old 08-10-2009, 10:37 PM   #5
LQ Newbie
Registered: Aug 2009
Posts: 3

Rep: Reputation: 0

Great work .. really informative .. and thanks a lot for sharing ..
script install


anaconda, centos, gui, kickstart

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Post script in kickstart qiuzhihong Linux - Software 1 04-19-2008 04:52 AM
FC6 kickstart doesn't post install pete@cosc. Fedora - Installation 2 01-15-2007 09:54 PM
running %post script for Mailserver through kickstart abhi2778 Fedora 0 09-06-2006 04:12 AM
rh9 kickstart post install help stockcowboy Linux - Newbie 1 12-05-2003 12:45 PM
Kickstart Post-install tasks TheRealDeal Linux - General 0 09-03-2003 02:13 AM > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 03:38 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration