Hi, all.
I'm trying to customize a CentOS installation cd, but got trouble with kickstart.
I want to use dialog[1] for command line based user interface, but it can't display correctly in kickstart with CentOS 5.5. Same ks file works with CentOS 5.3 (both i386 and x86_64).
What's the different between CentOS 5.3/5.5? I can't find it in release notes. And how can i fix it? Thanks very much. :)
My ks file:
# ========== install cdrom key --skip auth --useshadow --enablemd5 keyboard us lang en_US logging --level=debug selinux --disabled skipx timezone Asia/Hong_Kong text services --enabled=network bootloader --location=mbr zerombr clearpart --all --initlabel rootpw --iscrypted $1$h7EtIFv4$R9JQ4aCOVN7E9ml3A2SXv. firstboot --disable network --onboot=yes --bootproto=dhcp --hostname='iredos.iredmail.org' part swap --bytes-per-inode=4096 --fstype="swap" --size=512 part / --bytes-per-inode=4096 --fstype="ext3" --grow --size=1 %packages --excludedocs basesystem dialog
%post --nochroot echo "* Mount CDROM" mkdir -p /mnt/sysimage/mnt/ mount -t iso9660 /tmp/cdrom /mnt/sysimage/mnt
%post # Run in chrooted env. echo "* Export LC_ALL" export LC_ALL=C
echo "* Set TERM" export TERM='linux'
echo "* Set PATH" export PATH="/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin" dialog --yesno "Yes or no" 0 0 # ======== END KS =========
[1] dialog: http://hightek.org/dialog/
Hi,
On 08/06/2010 17:25, Zhang Huangbin wrote:
I want to use dialog[1] for command line based user interface, but it can't display correctly in kickstart with CentOS 5.5. Same ks file works with CentOS 5.3 (both i386 and x86_64).
I cant comment on your issue here as such, but my the way to achieve something along the lines of what you are doing is to build and drop in a firstboot module that could then use the interface setup via firstboot for user interaction. Generally doing user interaction at the level you are doing, in a kickstart file, is considered bad practice.
- KB
On Jun 9, 2010, at 2:20 AM, Karanbir Singh wrote:
Hi,
On 08/06/2010 17:25, Zhang Huangbin wrote:
I want to use dialog[1] for command line based user interface, but it can't display correctly in kickstart with CentOS 5.5. Same ks file works with CentOS 5.3 (both i386 and x86_64).
I cant comment on your issue here as such, but my the way to achieve something along the lines of what you are doing is to build and drop in a firstboot module that could then use the interface setup via firstboot for user interaction. Generally doing user interaction at the level you are doing, in a kickstart file, is considered bad practice.
Thanks for your advice, but i prefer to start the installation wizard before reboot.
The problem is, same code works with CentOS 5.3, but not with 5.5.
From: Zhang Huangbin zhbmaillistonly@gmail.com
I'm trying to customize a CentOS installation cd, but got trouble with kickstart. I want to use dialog[1] for command line based user interface, but it can't display correctly in kickstart with CentOS 5.5. Same ks file works with CentOS 5.3 (both i386 and x86_64).
What does "can't display correctly" mean? Checked /etc/termcap for available terminals?
JD
On Jun 9, 2010, at 5:39 PM, John Doe wrote:
From: Zhang Huangbin zhbmaillistonly@gmail.com
I'm trying to customize a CentOS installation cd, but got trouble with kickstart. I want to use dialog[1] for command line based user interface, but it can't display correctly in kickstart with CentOS 5.5. Same ks file works with CentOS 5.3 (both i386 and x86_64).
What does "can't display correctly" mean? Checked /etc/termcap for available terminals?
I use 'chvt 3' in ks file to switch to 3rd tty, but it stays in 1th tty (installation console). Swith to 2nd tty with 'Ctrl+Alt+F2', run 'ps' command, i can see dialog process is running.
From: Zhang Huangbin zhbmaillistonly@gmail.com
I use 'chvt 3' in ks file to switch to 3rd tty, but it stays in 1th tty (installation console). Swith to 2nd tty with 'Ctrl+Alt+F2', run 'ps' command, i can see dialog process is running.
I just tested my kickstart with 5.5 and it does fail too now, while it was working with 5.4. The pre ks process was running, but on no vt... I ran my script by hand from vt2, then killed the old stuck one and anaconda switched to vt1 and displayed: "Can't ask a question from command line mode!"...
I also do: chvt 3 /tmp/misc/ks_pre.sh | tee /tmp/ks_pre.log 2>&1 chvt 1
JD
From: John Doe jdmls@yahoo.com
I just tested my kickstart with 5.5 and it does fail too now, while it was working with 5.4. The pre ks process was running, but on no vt... I ran my script by hand from vt2, then killed the old stuck one and anaconda switched to vt1 and displayed: "Can't ask a question from command line mode!"... I also do: chvt 3 /tmp/misc/ks_pre.sh | tee /tmp/ks_pre.log > 2>&1 chvt 1
Disregard the "can't have a question in command line mode!", it might be related to another problem... being that anaconda bugs me about non partioned logical disks, even if they are not referenced in the kickstart configuration... I added all of them to the ignoredisk line and it solved the problem...
Only the chvt problem persists.
JD
From: Zhang Huangbin zhbmaillistonly@gmail.com
I use 'chvt 3' in ks file to switch to 3rd tty, but it stays in 1th tty (installation console). Swith to 2nd tty with 'Ctrl+Alt+F2', run 'ps' command, i can see dialog process is running.
I fixed it with some execs:
chvt 3 exec < /dev/tty3 > /dev/tty3 /tmp/misc/ks_pre.sh | tee /tmp/ks_pre.log 2>&1 chvt 1 exec < /dev/tty1 > /dev/tty1
JD
On Jun 10, 2010, at 12:16 AM, John Doe wrote:
I fixed it with some execs:
chvt 3 exec < /dev/tty3 > /dev/tty3 /tmp/misc/ks_pre.sh | tee /tmp/ks_pre.log 2>&1 chvt 1 exec < /dev/tty1 > /dev/tty1
Thanks John.
It now display dialog pages, but it can't switch to tty1 via 'chvt 1', and/or display further messages in tty3. Any idea?
From: Zhang Huangbin zhbmaillistonly@gmail.com
now display dialog pages, but it can't switch to tty1 via 'chvt 1', and/or display further messages in tty3. Any idea?
It worked for me, but I do not use dialog... Did you check that dialog does indeed exit? Did you try to run the script by hand in vt2?
JD
On Jun 9, 2010, at 5:39 PM, John Doe wrote:
From: Zhang Huangbin zhbmaillistonly@gmail.com
I'm trying to customize a CentOS installation cd, but got trouble with kickstart. I want to use dialog[1] for command line based user interface, but it can't display correctly in kickstart with CentOS 5.5. Same ks file works with CentOS 5.3 (both i386 and x86_64).
What does "can't display correctly" mean? Checked /etc/termcap for available terminals?
I found below lines here: http://fedoraproject.org/wiki/Anaconda/Kickstart
# ==== If your script spawns a daemon process, you must make sure to close stdout and stderr. Doing so is standard procedure for creating daemons. If you do not close these file descriptors, the installation will appear hung as anaconda waits for an EOF from the script. # ====
Will it cause my issue? and how can i close stdout and stderr?