PXE Install Linux Server

Source: Internet
Author: User

Recently encountered a problem, the company's internal server due to older, optical drive is broken, also does not support USB drive boot, so there is no way, can only use PXE to install the operating system. Many online tutorials, but not clear enough, I came down to write about my transfer process.

A. Installing A DHCP server

Yum install dhcpvim/etc/dhcp/dhcpd.conf# can directly copy my following configuration, modify the subnet to Ddns-update-style Interim;ignore Client-updates;allow    Booting;allow bootp;subnet 192.168.2.0 netmask 255.255.255.0 {range 192.168.2.250 192.168.2.253;    Option routers 192.168.2.1;    Option Subnet-mask 255.255.255.0;    Default-lease-time 21600;    Max-lease-time 43200;    Next-server 192.168.2.136; FileName "pxelinux.0";}

Note:

Next-server: The specified address is the server where you start the file, typically the TFTP server address.

Start DHCP server, if error, view/var/log/message

Chkconfig--add dhcpdservice dhcpd start

B. Installing the TFTP server

yum install tftp-server/etc/xinetd.d/tftp# Direct copy can be service tftp{         socket_type             =  dgram        protocol                 = udp         wait                     = yes        user                     = root         server                   = /usr/sbin/in.tftpd         server_args&nBsp;            = -s /var/lib/tftpboot         disable                  = no        per_ source              = 11         cps                      = 100 2         flags                    = ipv4}

Start

/etc/init.d/xinetd restart

C. Install any one of the http/nfs/ftp to store the ks.cfg and ISO image files.

I use HTTP

Yum install httpd/etc/init.d/httpd startchkconfig httpd on


D. Configuring the required files in TFTP

#引导文件yum  install syslinux cp /usr/share/syslinux/pxelinux.0 /var/lib/tftpboot# kernel file, Hang the CD in the/mnt. cp /mnt/images/pxeboot/{vmlinuz,initrd.img} /var/lib/tftpbootmkdir /var/lib/tftpboot/ pxelinux.cfgcp /mnt/isolinux/isolinux.cfg /var/lib/tftpboot/pxelinux.cfg/defaultvim /var/lib/ tftpboot/pxelinux.cfg/default# Modify the following to modify your server address. Default linuxprompt 1timeout 600display boot.msgmenu background splash.jpgmenu  title Welcome to CentOS 6.6!menu color border 0  #ffffffff  # 00000000menu color sel 7  #ffffffff   #ff000000menu  color title 0 # ffffffff  #00000000menu  color tabmsg 0  #ffffffff   #00000000menu  color  unsel 0  #ffffffff   #00000000menu  color hotsel 0  #ff000000   #ffffffffmenu  color hotkey 7  #ffffffff   #ff000000menu  COLOR&Nbsp;scrollbar 0  #ffffffff   #00000000label  linux  menu label ^install  or upgrade an existing system  menu default  kernel  vmlinuz  append   ks=http://192.168.2.136/ks.cfg initrd=initrd.imglabel  vesa  menu label install system with ^basic video driver   kernel vmlinuz  append initrd=initrd.img xdriver=vesa nomodesetlabel  rescue  menu label ^rescue installed system  kernel vmlinuz   append initrd=initrd.img rescuelabel local  menu label boot from  ^local drive  localboot 0xfffflabel memtest86  menu label ^ memory test  kernel memtest  append -

E. Configuring Kickstart

#安装镜像位置mkdir  /var/www/html/dvdcp -r /mnt/*  /var/www/html/dvd# Configuring Kickstart Files yum  install system-config-kickstartcp /root/anaconda-ks.cfg /var/www/html/ks.cfg vi  ks.cfg# can directly copy the following files, note that the HTTP server is modified to its own. # install os instead of upgradeinstall# use network installationurl  --url= "Http://192.168.2.136/dvd" # root passwordrootpw --iscrypted $1$t8tzkp5c$ 0odx9swkdoyuzlixbku8r.# system authorization informationauth  --useshadow   --passalgo=sha512# use graphical installgraphicalfirstboot --disable# system  Keyboardkeyboard us# system languagelang en_us# selinux configurationselinux  --disabled# installation logging levellogging --level=info# reboot after  installationreboot# system timezonetimezone --isutc asia/shanghai# system bootloader configurationbootloader --location=mbr# partition clearing  Informationclearpart --all%packages@base%end

F. End of configuration, you can find a motherboard with PXE function test can be.

As far as I know, most of the current PCs are supported.

This article is from the "[email protected]" blog, please be sure to keep this source http://ribble.blog.51cto.com/3863110/1676697

PXE Install Linux Server

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.