Linux Server Creation help with procedure and making kickstart
Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: Windows 7, RHEL 5.4, CENTOS 5.4, RHEL 6
Posts: 55
Rep:
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.
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.
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).
Distribution: Windows 7, RHEL 5.4, CENTOS 5.4, RHEL 6
Posts: 55
Original Poster
Rep:
Quote:
Originally Posted by acid_kewpie
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.
Distribution: Windows 7, RHEL 5.4, CENTOS 5.4, RHEL 6
Posts: 55
Original Poster
Rep:
Quote:
Originally Posted by irmin
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).
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.
Distribution: Windows 7, RHEL 5.4, CENTOS 5.4, RHEL 6
Posts: 55
Original Poster
Rep:
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?
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.
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 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".
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.
Distribution: Windows 7, RHEL 5.4, CENTOS 5.4, RHEL 6
Posts: 55
Original Poster
Rep:
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
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 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".
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.
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.
Distribution: Windows 7, RHEL 5.4, CENTOS 5.4, RHEL 6
Posts: 55
Original Poster
Rep:
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?
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.
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.