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

Solution Verified - Updated -

Issue

  • 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?

Environment

  • Red Hat Enterprise Linux (all)
  • Kickstart installation

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.