How to dynamically add the network parameters into kickstart using %pre script parsed from anaconda command line?

Solution Verified - Updated -


  • Kickstart files hosted on network doesn't have the network lines.
  • All network parameters are defined on anaconda command line as follows.
ip=<ip> netmask=<netmask> gateway=<gateway> nameserver=<dns> ksdevice=<interface name>
  • How can one parse this command line and add the network line using the values above into the kickstart file dynamically?
  • Can Red Hat provide a sample script?


  • Red Hat Enterprise Linux (all)
  • Kickstart installation

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content