Building pxelinux in RHEL6.3

Source: Internet
Author: User

First, let's take a look at the services required for the production of pxe. linux:

DHCP, tftp, and pxelinux files,

First, set up a DHCP server.

Install the tftp package as follows:Tftp-server.i686

During installation, the processes and services of the tftp package are related to the xtend service:

Enable the tftp service under xinted:

Switch to the xinted service cd/etc/xinetd. d/

Edit the tftp service configuration file vim tftp

Disable = no // enable the tftp service

Use rpm-ql tftp-server to find the path of the tftp configuration file:

/Var/lib/tftpboot

Since pxelinux.0 is a built-in system command, we use:

# Yum whatprovides */pxelinux.0 // find the installation package of pxelinux.0 and the file path.

Installation Package: # yum install syslinux-4.02-7.el6.i686-y

When the system is started, the read pxelinux.0 is in the tftp directory and is not in the/usr/share/syslinux directory at all, right?

 

We know where the blue image of the startup system and the title file are stored?

First mount the image:

Add the image to the virtual machine configuration and mount it with mount.

 

 

Switch to the/mnt/isolinux directory. Note: vmlinuz, initrd. img, and isolinux. cfg are available in the same version. Otherwise, the experiment may fail.

All we need to do is to cp all the files in this directory to/var/lib/tftpboot:

[Root @ redhat isolinux] # cp-a./*/var/lib/tftpboot/

[Root @ redhat tftpboot] # ls

Boot. cat grub. conf isolinux. bin memtest splash.jpg vesamenu. c32

Boot. msg initrd. img isolinux. cfgPxelinux.0TRANS. TBL vmlinuz

The original tftp directory only hasPxelinux.0File, right.

Create a directory pxelinux. cfg, The following are all fixed formats, official website pxelinux.0The manual is written in this way.

Modify defaule.File to add the following lines to it:

 

Label linux

Menu label ^ Install hello world //Added a hello worldTitle

Menu default

Kernel vmlinuz

Append initrd = initrd. img

 

 

Configure dhcpService:

Add only the following 2Line, next-server 192.168.7.3; filename "pxelinux.0 ";

 

Restart DHCPService:

[Root @ redhat tftpboot] #/etc/init. d/dhcpd restart

Shutting down dhcpd: [OK]

Starting dhcpd: [OK]

 

Client test:

First, unplug the network cable and use your own DHCPService:

Restart the network:If unplugging is not performed, local DHCP is not used.Service.

 

Ip addressChange to dynamic retrieval:In this way, local DHCP can be obtained.Service ip Address

 

Start from network instead:The following error is reported:

 

 

This is because selinux = enforcingWe setenforce = 0OKNow

 

OK will be found when you start againOf:

It can also be written like this: with kisckstartOne use:

Comment out 22 rows and add them below:
Append initrd = initrd. img ks = http: // 192.168.7.3/ks. cfg

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.