LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Red Hat (https://www.linuxquestions.org/questions/red-hat-31/)
-   -   Red Hat Enterprise Linux 5 RHEL5 kickstart problem with post install (https://www.linuxquestions.org/questions/red-hat-31/red-hat-enterprise-linux-5-rhel5-kickstart-problem-with-post-install-646498/)

tate1615 06-02-2008 04:37 PM

Red Hat Enterprise Linux 5 RHEL5 kickstart problem with post install
 
Hi,
I've had some success with installing RHEL5 unattended using a kickstart file located on the installation DVD.
The only thing that isn't working like it should is that I can't get commands located in the post-install section to work at all.

Here's the line I'm using to try and test functionality--fails:

%post --nochroot cp /post_files/booya.sh /mnt/sysimage/etc/

Here I'm trying to copy booya.sh from a directory on the installation DVD named post_files to the /etc/ directory on the fresh system.
After it installs...I can't find the booya.sh.

--I modeled my option above after the example in the RHEL kickstart docs: (can't add link b/c it's my 1st post)

Goals for post-install section:
1) Copy a directory from the DVD that I put in the iso filled with configuration files.
2) Run a script transferred along in said directory that copies the config files etc.

Any ideas would be most appreciated.
Thanks,

prpednek 04-30-2010 03:38 AM

Quote:

Originally Posted by tate1615 (Post 3172509)
Hi,
I've had some success with installing RHEL5 unattended using a kickstart file located on the installation DVD.
The only thing that isn't working like it should is that I can't get commands located in the post-install section to work at all.

Here's the line I'm using to try and test functionality--fails:

%post --nochroot cp /post_files/booya.sh /mnt/sysimage/etc/

Here I'm trying to copy booya.sh from a directory on the installation DVD named post_files to the /etc/ directory on the fresh system.
After it installs...I can't find the booya.sh.

--I modeled my option above after the example in the RHEL kickstart docs: (can't add link b/c it's my 1st post)

Goals for post-install section:
1) Copy a directory from the DVD that I put in the iso filled with configuration files.
2) Run a script transferred along in said directory that copies the config files etc.

Any ideas would be most appreciated.
Thanks,

Your problem seems reasonable, but you should first copy the files from the DVD in the %pre section and then again in the post section onto the filesystem at /mnt/sysimage/


Something like :

%pre
mkdir -p /testing/
# Copy config file only
cp /mnt/source/post_files/booya.sh /testing/

OR
# To copy all files in your created directory
cp /mnt/source/post_files/* /testing/

%post --nochroot
cp /testing/booya.sh /mnt/sysimage/etc/


Thus you can now find your file in the /etc directory after first reboot.


Hope this helps.


All times are GMT -5. The time now is 03:44 AM.