Hi,
I'm trying to install RHEL7.2 OS from a USB drive (Linux bootable)
I have kickstart file at the root of the pendrive and configured in grub.cfg. I am able to install Linux without any user interaction.
Problem I am facing is, I need to run a startup script when Linux boots after installation is complete. I have the startup script in the root of the USB drive. And I want to copy this file to /etc/init.d folder at the end of installation.
But I am not sure in which path the source USB drive is mounted. I tried below post installation script, but I keep getting error. Can someone help to point out in which path the source USB drive will be mounted, or how to copy the file from source USB drive to /etc/init.d ?
Code:
%post --nochroot --log=/mnt/sysimage/root/ks-post.log
cp -af /mnt/source/testscript /mnt/sysimage/etc/init.d/testscript
chkconfig --add testscript
%end
error received:
cp: cannot stat `/mnt/source/testscript': No such file or directory
Thanks,
Arun D