LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
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-13-2010, 04:48 PM   #1
linux_newb
Member
 
Registered: Aug 2009
Distribution: Windows 7, RHEL 5.4, CENTOS 5.4, RHEL 6
Posts: 55

Rep: Reputation: 15
Linux Server Creation help with procedure and making kickstart


Hi guys,

I need to create a Redhat or CentOS server but im not really sure where to begin. I'm not sure what network booting and PXE booting is. Are they both the same thing, or are they different? I want to setup one server and two client machines to connect to my server. I would like to be able to load a kickstart CD on my server and have the two client machines boot off that servers kickstart. My concern is, will they boot off the network or do they have to be configured to use PXE booting? I would really appreciate any help with this.
 
Old 01-13-2010, 05:27 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,415

Rep: Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968
They are the same thing, yes. They will request a DHCP address from the network, get a response back with PXE boot attributes in it, use those details to pull an image from a TFTP server and boot it, chaining on using the config recieved there to get the full OS.
 
Old 01-13-2010, 05:36 PM   #3
irmin
Member
 
Registered: Jan 2010
Location: the universe
Distribution: Slackware (modified), Slackware64 (modified), openSuSE (modified)
Posts: 342

Rep: Reputation: 62
Hi,

PXE stands for Preboot Execution Environment (see
http://en.wikipedia.org/wiki/Preboot...on_Environment).
It can be regarded as the standard method for network booting. Normally the PXE is contained in the ROM of the workstation's network card (or somewhere else) and is called when the BIOS is configured to boot from network (so at least for pc architectures). The PXE then will search for a DHCP or BOOTP server in the network directly attached to the network card. The server will send back the network configuration as well a name for some file that will be downloaded by the PXE using TFTP. For linux systems the required file is mostly pxelinux. Then pxelinux will use the TFTP server to download a kernel and optionally a initial ramdisk and boot the kernel and network booting does not differ from local booting anymore.

While it is possible to setup all the required servers and create the kernel images as well as the initrd, distributions like Redhat or CentOS should provide the required files and scripts for configuring everything. You should figure out using google (e.g.: centos kickstart network).

In general what you should do depends on the desired functions and purpose of the server/client system you want to setup. Do you want the clients to boot from the server everytime they are powered on or you just want to install off the network?
For network booting your clients must be configured to use PXE booting unless you have a different network booting method avaible (which I doubt you have).
 
Old 01-13-2010, 05:42 PM   #4
linux_newb
Member
 
Registered: Aug 2009
Distribution: Windows 7, RHEL 5.4, CENTOS 5.4, RHEL 6
Posts: 55

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by acid_kewpie View Post
They are the same thing, yes. They will request a DHCP address from the network, get a response back with PXE boot attributes in it, use those details to pull an image from a TFTP server and boot it, chaining on using the config recieved there to get the full OS.
Thank you.
 
Old 01-13-2010, 05:45 PM   #5
linux_newb
Member
 
Registered: Aug 2009
Distribution: Windows 7, RHEL 5.4, CENTOS 5.4, RHEL 6
Posts: 55

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by irmin View Post
Hi,

PXE stands for Preboot Execution Environment (see
http://en.wikipedia.org/wiki/Preboot...on_Environment).
It can be regarded as the standard method for network booting. Normally the PXE is contained in the ROM of the workstation's network card (or somewhere else) and is called when the BIOS is configured to boot from network (so at least for pc architectures). The PXE then will search for a DHCP or BOOTP server in the network directly attached to the network card. The server will send back the network configuration as well a name for some file that will be downloaded by the PXE using TFTP. For linux systems the required file is mostly pxelinux. Then pxelinux will use the TFTP server to download a kernel and optionally a initial ramdisk and boot the kernel and network booting does not differ from local booting anymore.

While it is possible to setup all the required servers and create the kernel images as well as the initrd, distributions like Redhat or CentOS should provide the required files and scripts for configuring everything. You should figure out using google (e.g.: centos kickstart network).

In general what you should do depends on the desired functions and purpose of the server/client system you want to setup. Do you want the clients to boot from the server everytime they are powered on or you just want to install off the network?
For network booting your clients must be configured to use PXE booting unless you have a different network booting method avaible (which I doubt you have).
Thank you, this is all so overwhelming.
 
Old 01-13-2010, 05:48 PM   #6
linux_newb
Member
 
Registered: Aug 2009
Distribution: Windows 7, RHEL 5.4, CENTOS 5.4, RHEL 6
Posts: 55

Original Poster
Rep: Reputation: 15
ks.cfg

How can I make my ks.cfg file global for as many nodes as possible?
 
Old 01-13-2010, 05:57 PM   #7
irmin
Member
 
Registered: Jan 2010
Location: the universe
Distribution: Slackware (modified), Slackware64 (modified), openSuSE (modified)
Posts: 342

Rep: Reputation: 62
Under
http://www.centos.org/docs/5/html/In...nginstall.html you can find the available options to pass to the linux kernel.

ks=nfs:<server>:/<path>

If you set up a NFS server in your network and provide the ks.cfg file on it, kickstart will be able to find and download it (and use it). Note that you might have specify network parameters to the kernel.

Since the ks.cfg file is available on the network server, all nodes that can connect to it, will be able to use it.
 
Old 01-14-2010, 10:29 AM   #8
linux_newb
Member
 
Registered: Aug 2009
Distribution: Windows 7, RHEL 5.4, CENTOS 5.4, RHEL 6
Posts: 55

Original Poster
Rep: Reputation: 15
this was great

Thank you very much! This is a great help to me! The only this I'm confused about right now is how to name my server? If its IP addres is 10.10.1.1 is that the name I use? Where can I specify the name in the ks.cfg file?



Quote:
Originally Posted by irmin View Post
Under
http://www.centos.org/docs/5/html/In...nginstall.html you can find the available options to pass to the linux kernel.

ks=nfs:<server>:/<path>

If you set up a NFS server in your network and provide the ks.cfg file on it, kickstart will be able to find and download it (and use it). Note that you might have specify network parameters to the kernel.

Since the ks.cfg file is available on the network server, all nodes that can connect to it, will be able to use it.
 
Old 01-14-2010, 10:53 AM   #9
irmin
Member
 
Registered: Jan 2010
Location: the universe
Distribution: Slackware (modified), Slackware64 (modified), openSuSE (modified)
Posts: 342

Rep: Reputation: 62
If you don't want to use DNS (dns= option), then simply enter the IP Address of the server as its name.
You don't have to specify the server name in the ks.cfg file, but pass the option to the kernel, when you boot.

All required files for a network boot can be found on one of the following ISOs (if you're using CentOS, for RedHat you have to search for it):
http://yum.singlehop.com/CentOS/5.4/...netinstall.iso (~10 Mb)

http://yum.singlehop.com/CentOS/5.4/...netinstall.iso (~10 Mb)

All files on the ISO should be made available via TFTP. Because you don't use this disks to boot from, replace isolinux.bin with pxelinux.0 and rename isolinux.cfg to pxelinux.cfg/default, where pxelinux.cfg is a directory. You have to edit pxelinux.cfg and add the required options to the "append" line with ks and replace "default linux" with "default ks".

e.g.:
default ks

...

label ks
kernel vmlinuz
append ks=<...> initrd=initrd.img

Perhaps you want to reduce the timeout-value, too.

If your DHCP server, TFTP server and NFS servers are setup correctly, the workstations should boot via PXE now and start kickstart using the specified configuration file.
 
Old 01-14-2010, 11:24 AM   #10
linux_newb
Member
 
Registered: Aug 2009
Distribution: Windows 7, RHEL 5.4, CENTOS 5.4, RHEL 6
Posts: 55

Original Poster
Rep: Reputation: 15
DNS

This is all great information, thanks again. Well I do want to be able to use DNS. The problem is that I'm not sure how it works. Do I specify an ip address for the DNS server? What if I want my main server to be a DNS server, dhcp server, NFS server? I'm just confused on how I can specify all of this.


Quote:
Originally Posted by irmin View Post
If you don't want to use DNS (dns= option), then simply enter the IP Address of the server as its name.
You don't have to specify the server name in the ks.cfg file, but pass the option to the kernel, when you boot.

All required files for a network boot can be found on one of the following ISOs (if you're using CentOS, for RedHat you have to search for it):
http://yum.singlehop.com/CentOS/5.4/...netinstall.iso (~10 Mb)

http://yum.singlehop.com/CentOS/5.4/...netinstall.iso (~10 Mb)

All files on the ISO should be made available via TFTP. Because you don't use this disks to boot from, replace isolinux.bin with pxelinux.0 and rename isolinux.cfg to pxelinux.cfg/default, where pxelinux.cfg is a directory. You have to edit pxelinux.cfg and add the required options to the "append" line with ks and replace "default linux" with "default ks".

e.g.:
default ks

...

label ks
kernel vmlinuz
append ks=<...> initrd=initrd.img

Perhaps you want to reduce the timeout-value, too.

If your DHCP server, TFTP server and NFS servers are setup correctly, the workstations should boot via PXE now and start kickstart using the specified configuration file.
 
Old 01-14-2010, 11:46 AM   #11
irmin
Member
 
Registered: Jan 2010
Location: the universe
Distribution: Slackware (modified), Slackware64 (modified), openSuSE (modified)
Posts: 342

Rep: Reputation: 62
You may have a look at

http://www.linuxtopia.org/online_boo...llation_guide/

especially chapters 28, 29 and 31 can help you.

What kind of operating system is currently installed on the server? If you run a RedHat or CentOS server, then you should have a look at chapter 31 that explains how to setup a server for network boots. If not, I can tell you how to setup everything manually.

Now to your questions:
If you prefer to lookup the NFS server via DNS, you have to add something like "dns=<ipaddressofmydnsserver>". To the "append" line in the pxelinux.cfg/default file.

Note that this setting is only needed to find the ks.cfg file, nothing more.

You can configure your server to be a DNS, DHCP, TFTP and NFS server the same time. But manual setup can be a little bit tedious and there are some linux distributions that provide scripts to help you with this.
 
Old 01-14-2010, 02:32 PM   #12
linux_newb
Member
 
Registered: Aug 2009
Distribution: Windows 7, RHEL 5.4, CENTOS 5.4, RHEL 6
Posts: 55

Original Poster
Rep: Reputation: 15
This is excellent information

Thank you for so much insight on this topic. One thing I don't understand is, if I'm making a kickstart cd with centos loaded onto it which will be loaded into a server, do I need to specify an ip address for that server? I ask this because I thought you put in the network information for the clients and not the server. How would the server go about knowing what its ip address, dns, default gateway and netmask would be if I'am not specifying it in the ks.cfg?

Quote:
Originally Posted by irmin View Post
You may have a look at

http://www.linuxtopia.org/online_boo...llation_guide/

especially chapters 28, 29 and 31 can help you.

What kind of operating system is currently installed on the server? If you run a RedHat or CentOS server, then you should have a look at chapter 31 that explains how to setup a server for network boots. If not, I can tell you how to setup everything manually.

Now to your questions:
If you prefer to lookup the NFS server via DNS, you have to add something like "dns=<ipaddressofmydnsserver>". To the "append" line in the pxelinux.cfg/default file.

Note that this setting is only needed to find the ks.cfg file, nothing more.

You can configure your server to be a DNS, DHCP, TFTP and NFS server the same time. But manual setup can be a little bit tedious and there are some linux distributions that provide scripts to help you with this.
 
Old 01-14-2010, 04:42 PM   #13
irmin
Member
 
Registered: Jan 2010
Location: the universe
Distribution: Slackware (modified), Slackware64 (modified), openSuSE (modified)
Posts: 342

Rep: Reputation: 62
If the server is running and setup properly, the clients will ask the server on boot for the ks.cfg file. In order to do this, they need to know how the network is configured and where to find the ks.cfg file. These parameters need to be passed to the kernel. The kernel parameters are also requested from the server via pxelinux.cfg/default.

Once the ks.cfg file is loaded, it will be examined for the network configuration again and ks.cfg also contains the location of the kickstart files. Thus you will have to make these files (from the cd) available on the network via NFS.

This all requires, that the server is already set up property, which can be done via a normal installation.

Summary:
pxelinux.cfg/default:
contains parameters to pass to the kernel on the client machines required to find "ks.cfg"

ks.cfg: will be stored on the server and must contain a valid configuration for the client as well as the position of the kickstart files

kickstart files: contents can be made available on the network using NFS
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
procedure for making simplified linux kernel from scratch eliza Linux - Kernel 6 08-27-2009 01:46 PM
i want complete confiruration and installation procedure for ris server in linux nghadge1801 Linux - Newbie 1 05-22-2009 05:39 AM
making kickstart in GUI varunkant Linux - Newbie 3 09-17-2008 03:18 AM
plz tell me the procedure for kickstart installation in rhel 5 himanshu07 Linux - Newbie 1 02-21-2008 11:48 PM
RHEL5 kickstart config file creation problem rado_dimitrov Linux - Enterprise 2 02-13-2008 10:50 AM


All times are GMT -5. The time now is 06:47 PM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration