LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-25-2012, 05:42 PM   #1
only1rb
LQ Newbie
 
Registered: Apr 2012
Posts: 3

Rep: Reputation: Disabled
kickstart %post fails to run


I have a kickstart script that works just fine. We have new software that is replacing our current software. I have taken that script and in the %post section I have just changed the file name that I want to copy from nfs to new install. when I run the new kickstart it completely skips over the %post section. What causes it to skip the entire %post section? Any help would be greatly appreciated.

running Red Hat Enterprise Linux 5.1


Working %post
Code:
%post --nochroot
(
mkdir /mnt/sysimage/home/install
cp -r /mnt/source/common /mnt/sysimage/home/install/
cp -r /mnt/source/duprm /mnt/sysimage/home/install/
cp /mnt/source2/Workstation/vsftpd-2.0.5-10.el5.i386.rpm /mnt/sysimage/home/install/
cp /mnt/source2/Workstation/ncurses-devel-5.5-24.20060715.i386.rpm /mnt/sysimage/home/install/
cp /mnt/sysimage/home/install/duprm/doInstall_ts88.sh /mnt/sysimage/home/install/doInstall.sh
chmod +x /mnt/sysimage/home/install/doInstall.sh
chmod +x /mnt/sysimage/home/install/duprm/install_ts88.sh
)
This is what I have changed and NOTHING ELSE!

Failing to run any of %post
Code:
%post --nochroot
(
mkdir /mnt/sysimage/home/install
cp -r /mnt/source/common /mnt/sysimage/home/install/
cp -r /mnt/source/duprm /mnt/sysimage/home/install/
cp /mnt/source2/Workstation/vsftpd-2.0.5-10.el5.i386.rpm /mnt/sysimage/home/install/
cp /mnt/source2/Workstation/ncurses-devel-5.5-24.20060715.i386.rpm /mnt/sysimage/home/install/
cp /mnt/sysimage/home/install/duprm/doInstall_1010.sh /mnt/sysimage/home/install/doInstall.sh
chmod +x /mnt/sysimage/home/install/doInstall.sh
chmod +x /mnt/sysimage/home/install/duprm/install_1010.sh
)

Last edited by only1rb; 07-25-2012 at 05:43 PM.
 
Old 07-25-2012, 07:16 PM   #2
whizzit
Member
 
Registered: Aug 2004
Location: UK
Distribution: Gentoo, OpenBSD, Debian, FreeBSD, RHEL, CentOS
Posts: 65

Rep: Reputation: 24
Can you add --log=/root/post.log to the %post line (?) to see if there any errors given that you can look at after the event.

When I see practically the same config where one works and the other doesn't my first suspicion is line termination. What editor was used to make changes to the file?
 
Old 07-25-2012, 08:30 PM   #3
only1rb
LQ Newbie
 
Registered: Apr 2012
Posts: 3

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by whizzit View Post
Can you add --log=/root/post.log to the %post line (?) to see if there any errors given that you can look at after the event.
I will try this and let you know what is in the log.


Quote:
Originally Posted by whizzit View Post
When I see practically the same config where one works and the other doesn't my first suspicion is line termination. What editor was used to make changes to the file?
I thought the same thing. I have tried vi & wordpad.
 
Old 07-26-2012, 04:46 PM   #4
only1rb
LQ Newbie
 
Registered: Apr 2012
Posts: 3

Original Poster
Rep: Reputation: Disabled
thanks wizzit! adding the log file help find the issue. I am not sure how it happened but there were extra hidden carrage returns at the end of the lines. the post.log showed the extra characters. I completely retyped (mostly cut and paste) the cfg in vi. It is now working.
 
Old 07-26-2012, 04:52 PM   #5
whizzit
Member
 
Registered: Aug 2004
Location: UK
Distribution: Gentoo, OpenBSD, Debian, FreeBSD, RHEL, CentOS
Posts: 65

Rep: Reputation: 24
Excellent!
 
Old 12-27-2012, 07:45 AM   #6
philip_rhoades
LQ Newbie
 
Registered: Nov 2008
Posts: 12

Rep: Reputation: 0
Quote:
Originally Posted by whizzit View Post
Can you add --log=/root/post.log to the %post line (?) to see if there any errors given that you can look at after the event.

When I see practically the same config where one works and the other doesn't my first suspicion is line termination. What editor was used to make changes to the file?
I have a ks file with a lot of stuff after post and NONE of it getting done. I tried the log above and that doesn't get created either. There are only newlines (no CRs) in the file. Any other ideas?

Thanks,

Phil.
 
Old 01-07-2013, 05:23 PM   #7
whizzit
Member
 
Registered: Aug 2004
Location: UK
Distribution: Gentoo, OpenBSD, Debian, FreeBSD, RHEL, CentOS
Posts: 65

Rep: Reputation: 24
Hi Phil,

This thread is solved for the OP so I guess the correct action would be to create a new thread (and reference this one if necessary) including some more information about your specific case; including details about the ks file, what system it's on etc.. Otherwise, it'll just polute this one.

If the OP is still reading - perhaps you could mark this as SOLVED ?

Thanks all,
Grant
 
  


Reply


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
kickstart post-installation abhi2778 Linux - Software 8 07-10-2012 10:30 AM
kickstart %post problem rbell54 Linux - Newbie 3 02-10-2010 03:13 PM
%post section of Fedora8 kickstart install doesn't run scott.anderson Fedora - Installation 2 07-31-2008 09:41 AM
Post script in kickstart qiuzhihong Linux - Software 1 04-19-2008 04:52 AM
Unable to run post-Installation kickstart scripts zoulo Linux - Enterprise 0 07-05-2005 04:26 AM


All times are GMT -5. The time now is 08:30 PM.

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