1

I have a PXE server for network installations (configured similar to, e.g. https://www.linuxtechi.com/configure-pxe-installation-server-centos-7/) and am using a Kickstart script to automatically implement many settings. The CentOS image is stored on the PXE server and accessed via FTP (location on server: /var/ftp/pub)

Is it possible for the kickstart script to copy across files from the PXE server so they are available on the client's hard-drive when the install is finished?

i.e. I have a folder called foo on the server: /var/ftp/pub/foo. How can I copy across this so that the freshly installed client has these files at e.g. /home/foo please?

I've seen numerous questions asking this already for DVD / USB installs, but my question concerns network installations so I don't think the scripts used for DVD installs will work.

Thanks

1
  • In theory you can use most of the tools installed on your systems in the post section of a kickstart. (You may need to use ip-addresses rather than hostnames (when you run in a chroot)) Consider checking out content from a git repository, running curl, rsync or simply mount a nfs export and copy the file tree you need. - I prefer to only do the minimal in the kickstart to enroll the newly installed system in our configuration management system and then after the system boots normally for the first time all logic and settings are applied from there. – Bob Jan 10 '20 at 14:31
1

Yes, you can copy files during Kickstart.

Depending on when you copy the files in Kickstart, you may or may not be in a chroot environment. Your copy target might need to use the filesystem under /mnt/sysimage.

Use the virtual console during install and play around inside the Anaconda environment. Inspect mount to see how your remote FTP is mounted so you can get the source for the copy. Insert a sleep or similar in various stages of Kickstart so you can get the time you need in each.

2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.