1

I need to perform various things on my custom ISO server installation during the first boot. It needs to be completely hands and internet free.

What are my options here? I see the pre and post install scripts with kickstart but they don't seem to be doing anything. For instance, I tried to set my hostname with a post install script and it didn't work, but the other options in the ks file did.

The things I need to do on first run are:

  • Set a unique hostname
  • Add lines to a conf file
  • Place down a public key
  • Place a custom shell for a certain user
  • Set firewall rules with ufw
  • Set a few internet related things and connect out to chef over vpn

I suppose most if not all of these are just static files that can be placed in a custom .deb file on the ISO and be "installed" during system installation. For those that require running services and however, what is the normal way to go about this?

2 Answers2

1

In the post install script, can't you call out to a BASH Script? The in your BASH script you can then process out?

Is there not a place in in start up to check these options? Trying to understand the requirement here, I would question why you would want to do post install, and rather have a configuration script that runs at start up, trying something like hooking in to the grub configuration or something?

How to Configure the GRUB2 Boot Loader’s Settings

0

I followed shvahabi's advice here How can I make "rc.local" run on startup?. I'm creating a custom /etc/rc.local file and including it into a custom deb that will be placed onto the ISO and installed at installation time. The rc.local file simply has one line added that runs a script I made to achieve the multiple things I bulleted above.

I also placed the actual script that will do all of that work in the custom deb package so it's placed on the system as well.

Things like ssh keys will also be placed in this custom deb package and simply placed onto the file system at installation time.