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

SLater01
  • 113
  • 3
  • 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 Answers1

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.

Aaron Copley
  • 12,525
  • 5
  • 47
  • 68
  • Thanks for this suggestion. How do I access the virtual console though please? – SLater01 Jan 19 '20 at 20:36
  • 1
    CTRL + ALT + F1 through F7 are each different virtual consoles with different purpose. You can read more about it here. https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/installation_guide/sect-consoles-logs-during-installation-x86#sect-installation-consoles-x86 – Aaron Copley Jan 19 '20 at 23:59