LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 01-18-2018, 07:46 AM   #1
bkone
Member
 
Registered: Jun 2006
Distribution: SUSE, Red Hat, Oracle Linux, CentOS
Posts: 108

Rep: Reputation: 15
Kickstart Static IP CentOS/RHEL/OL


I am trying to figure out how to boot from the DVD media and perform a kickstart installation when there is no DHCP. My network environment uses static IP addresses and I cannot see any options to key in a static IP address to boot and get onto the network to complete an installation of RHEL/CentOS/OL (Red Hat based installation). This is for version 7.4 and I browsed the Internets and found a 'asknetwork' option which doesn't appear to work.

Ideally, I would like to boot from the DVD configure the IP, Gateway, DNS, and hostname and then during or after kickstart those values I manually key in to get network connectivity flow into the system so I don't have to reconfigure them. Coming from SUSE I was able to configure networking and then in autoyast it would ask for those values and incorporate them into the build so there was nothing left to do once the install was complete. Is this possible with Red Hat distributions?

Thanks in advance!
 
Old 01-18-2018, 08:29 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,636

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by bkone View Post
I am trying to figure out how to boot from the DVD media and perform a kickstart installation when there is no DHCP. My network environment uses static IP addresses and I cannot see any options to key in a static IP address to boot and get onto the network to complete an installation of RHEL/CentOS/OL (Red Hat based installation). This is for version 7.4 and I browsed the Internets and found a 'asknetwork' option which doesn't appear to work.

Ideally, I would like to boot from the DVD configure the IP, Gateway, DNS, and hostname and then during or after kickstart those values I manually key in to get network connectivity flow into the system so I don't have to reconfigure them. Coming from SUSE I was able to configure networking and then in autoyast it would ask for those values and incorporate them into the build so there was nothing left to do once the install was complete. Is this possible with Red Hat distributions?
This is covered on Red Hat's knowledgebase: https://access.redhat.com/solutions/442073

Since you're using RHEL 7, you're paying for it (right??), so that content should be available to you. Red Hat support should also easily be able to walk you through it. You could also set up a DHCP server with only ONE address in the range, which will accomplish what you're after, and take it down shortly after build. You could also script something in %pre or %post in the kickstart configs, to set the address(s) there. But in kickstart, the address isn't set until after the system is built and it reboots. Something like this:
Code:
network --device eth0 --bootproto=static --ip=1.2.3.4 --netmask=255.255.255.0 --hostname=somehost
..goes in %post.
 
Old 01-18-2018, 09:27 AM   #3
bkone
Member
 
Registered: Jun 2006
Distribution: SUSE, Red Hat, Oracle Linux, CentOS
Posts: 108

Original Poster
Rep: Reputation: 15
So there is no option to configure networking before the system boots by the installation media? I'll take a look at that link as well. I am trying to create a generic kickstart in which you don't need to hardcode IPs, hostname, etc but rather the user doing the installation would fill in the blanks which would get carried over into the installation.
 
Old 01-18-2018, 10:15 AM   #4
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,636

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by bkone View Post
So there is no option to configure networking before the system boots by the installation media?
How would there be? Before the install media comes up, PXE (or SOMETHING) has to grab an address somehow. You can install boot-ROM's on some network cards to provide such things, but 99% of the time, this doesn't happen. DHCP will grab a server on the local network (doesn't even know about routes at this point), grab an address, and THEN it's able to see a network image. Until then....no hardware/devices/anything, and even after the install media spins up, there is no operating system to speak of at that point.
Quote:
I'll take a look at that link as well. I am trying to create a generic kickstart in which you don't need to hardcode IPs, hostname, etc but rather the user doing the installation would fill in the blanks which would get carried over into the installation.
Those are called kicstart profiles. You create one for a machine/host, and put in the host-specific information. Much like an RPM file, you can specify a pre and post set of commands to run, so (for example), an Oracle server can have system limits raised, and have the Oracle software shoved on automatically after build. And having the user key it in before is not a smaller amount of work than keying it into the config file.
 
Old 01-18-2018, 10:25 AM   #5
sgrlscz
Member
 
Registered: Aug 2008
Posts: 123

Rep: Reputation: 84
When booting from the DVD, a static IP address can be specified using the boot options (see https://access.redhat.com/documentat...a-boot-options - especially Table 22.4)

Within the kickstart file, you can access the boot options through /proc/cmdline, so you can even pass your own settings to customize the installation.
 
Old 01-18-2018, 10:53 AM   #6
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,636

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by sgrlscz View Post
When booting from the DVD, a static IP address can be specified using the boot options (see https://access.redhat.com/documentat...a-boot-options - especially Table 22.4)

Within the kickstart file, you can access the boot options through /proc/cmdline, so you can even pass your own settings to customize the installation.
Yes, that will get the system to BOOT and install from kickstart...but those parameters aren't going to get passed to the system for use later. All you can specify is the IP address of the kickstart server. That doesn't translate to the permanent IP address of the server after kickstart has configured it.
 
Old 01-18-2018, 01:07 PM   #7
sgrlscz
Member
 
Registered: Aug 2008
Posts: 123

Rep: Reputation: 84
Quote:
Originally Posted by TB0ne View Post
Yes, that will get the system to BOOT and install from kickstart...but those parameters aren't going to get passed to the system for use later. All you can specify is the IP address of the kickstart server. That doesn't translate to the permanent IP address of the server after kickstart has configured it.
As noted, /proc/cmdline tells you the parameters used to boot. So, you can get those values in the kickstart, use them to configure the network, and you don't need to hardcode any settings.
 
Old 01-23-2018, 06:45 AM   #8
bkone
Member
 
Registered: Jun 2006
Distribution: SUSE, Red Hat, Oracle Linux, CentOS
Posts: 108

Original Poster
Rep: Reputation: 15
I am still trying to get this to work. I have read over the document you provided I boot the DVD and then hit the ESC key which brings me to the boot: prompt. From there I am typing in ip=<ip address)::<gateway_address>:netmask:hostname:ens160:none ks=http://website/kickstart/rhel7.ks After I hit enter it doesn't or can't configure the static IP I presented and after everything finishes up I get the
Entering emergency mode. Exit the shell to continue
Type "journalctl" to view system logs.
You might want to save "/run/initramfs/rdsosreport.txt" to a USB stick or /boot
after mounting them and attach it to a bug report.

dracut:/#

I also don't know where I can set the /proc/cmdline or how to access that.
 
Old 01-23-2018, 06:49 AM   #9
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,636

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by bkone View Post
I am still trying to get this to work. I have read over the document you provided I boot the DVD and then hit the ESC key which brings me to the boot: prompt. From there I am typing in ip=<ip address)::<gateway_address>:netmask:hostname:ens160:none ks=http://website/kickstart/rhel7.ks After I hit enter it doesn't or can't configure the static IP I presented and after everything finishes up I get the
Entering emergency mode. Exit the shell to continue
Type "journalctl" to view system logs.
You might want to save "/run/initramfs/rdsosreport.txt" to a USB stick or /boot
after mounting them and attach it to a bug report.

dracut:/#

I also don't know where I can set the /proc/cmdline or how to access that.
Because, again...you don't do this. Go back and re-read post #2, and follow the link provided there. Again, contact Red Hat support for help, since you're using RHEL 7. You were given suggestions.
 
Old 01-23-2018, 07:10 AM   #10
bkone
Member
 
Registered: Jun 2006
Distribution: SUSE, Red Hat, Oracle Linux, CentOS
Posts: 108

Original Poster
Rep: Reputation: 15
Yeah, well Red Hat should update their doc or you are pointed me to a doc that is not applicable. I am running RHEL 7 this shows the information is for -

Environment
Red Hat Enterprise Linux 5/6
Bare Metal Kickstart Installation in a network with no DHCP

Also the boot: linux ks=http://server.example.com/ks.cfg ksdevice=eth0 text asknetwork from what I've seen the 'asknetwork' is no longer valid in version 7. I also tried that and it doesn't work.
 
Old 01-23-2018, 10:11 AM   #11
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,636

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by bkone View Post
Yeah, well Red Hat should update their doc or you are pointed me to a doc that is not applicable. I am running RHEL 7 this shows the information is for -

Environment
Red Hat Enterprise Linux 5/6
Bare Metal Kickstart Installation in a network with no DHCP

Also the boot: linux ks=http://server.example.com/ks.cfg ksdevice=eth0 text asknetwork from what I've seen the 'asknetwork' is no longer valid in version 7. I also tried that and it doesn't work.
Since the ENTIRE document is "Subscriber Content Only" (meaning you have to sign in with your RHN credentials), that means you're paying for RHEL...so again, have you contacted their support for assistance? And this also applies to RHEL 7, not just 5 and 6.

Again, simplest thing to do would be to put a DHCP server onto your subnet with a single IP address, and let things roll from there, and remove it when done. Kickstart profiles are where you can define %pre/%post things to set up system-specific items like the static addressess you want to use after, packages, etc.
 
Old 04-06-2018, 12:11 PM   #12
larryaero
LQ Newbie
 
Registered: Apr 2018
Posts: 2

Rep: Reputation: Disabled
If this is not too late, Ch22 of Redhat Enterprise Linux 7.4 Installation Guide do cover the boot options, I think the guide is freely accessible:
https://access.redhat.com/documentat...on_guide/index
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to Configure Network Static IP Address and Manage Services on RHEL/CentOS 7.0 onebuck CentOS 0 07-21-2014 01:44 AM
Kickstart upgrade to RHEL/CentOS 6.5 levm Linux - Enterprise 2 05-07-2014 11:48 PM
Using kickstart with static IP Yzord Linux - Newbie 3 03-05-2014 06:36 PM
Kickstart not working with static ip configuration wischad Linux - Server 1 11-05-2009 09:32 AM
Static IP addresses supplied through default kickstart config file? stuart_cherrington Red Hat 5 10-29-2009 12:39 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 11:50 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration