Como Redes Servidor de imagenes de arranque gPXE
instalar dhcpd syslinux tftp-server compiladores (bulid-essential/group development)
++centos
preparar tftp
yum install tftp-server --- modificar /etc/xinetd.d/tftp cambiar "disable = yes" a "disable = no" service xinetd restart
descargar roms pxe
- ir a [http://rom-o-matic.net/|ROM-o-matic] y seleccionar el ultimo release
- en el formato de salida (output format) elegir “PXE bootstrap loader image [Unload PXE stack] (.pxe)”
—- tipo uno
- Elegir tipo de tarjeta (NIC type) “all-drivers”
- Click en “Personalizar" (Customize)
- Marcar “DOWNLOAD_PROTO_HTTPS”
- Descargar con el boton "Tomar Imagen" (Get Image)
- Guardar en /tftpboot/gpxe.pxe (o donde corresponda)
—- tipo dos
- Elegir tipo de tarjeta (NIC type) “undionly”
- Descargar con el boton "Tomar Imagen" (Get Image)
- Guardar en /tftpboot/undi.pxe (o donde corresponda)
editar /etc/dhcp/dhcpd.conf
allow booting; allow bootp; authoritative; option routers 192.168.16.1; option subnet-mask 255.255.255.0; filename "pxelinux.0"; next-server 192.168.16.210; #option space gpxe; #option gpxe-encap-opts code 175 = encapsulate gpxe; #option gpxe.bus-id code 177 = string; subnet 192.168.16.0 netmask 255.255.255.0 { allow unknown-clients; option routers 192.168.16.1; range 192.168.16.100 192.168.16.109; # if not exists gpxe.bus-id { # filename "undionly.kpxe"; # } # else { # filename "gpxe.kpxe"; # } # if not exists gpxe.bus-id { # filename "undionly.kpxe"; # } # else { # filename ""; # option root-path "aoe:e0.0"; # } }
configurando arranque
[root@pxe ~]# yum -y install syslinux xinetd tftp-server [root@pxe ~]# mkdir /var/lib/tftpboot/pxelinux.cfg [root@pxe ~]# cp /usr/share/syslinux/pxelinux.0 /var/lib/tftpboot/ ------------------ [root@pxe ~]# vi /etc/xinetd.d/tftp # line 14: chnage disable = no --------------- [root@pxe ~]# /etc/rc.d/init.d/xinetd start Starting xinetd: [ OK ] [root@pxe ~]# chkconfig xinetd on ------------------------ [root@pxe ~]# vi /etc/dhcp/dhcpd.conf option domain-name-servers 10.0.0.30; # near line 8: add filename "pxelinux.0"; next-server 10.0.0.70; # IP address of PXE Server ------------------------- [root@pxe ~]# /etc/rc.d/init.d/dhcpd restart Shutting down dhcpd: [ OK ] Starting dhcpd: [ OK ] --------------------- [root@pxe ~]# mkdir -p /var/pxe/centos6 [root@pxe ~]# mkdir /var/lib/tftpboot/centos6 [root@pxe ~]# mount -t iso9660 -o loop /home/iso/CentOS-6.0-x86_64-bin-DVD1.iso /var/pxe/centos6 [root@pxe ~]# cp /var/pxe/centos6/images/pxeboot/vmlinuz /var/lib/tftpboot/centos6/ [root@pxe ~]# cp /var/pxe/centos6/images/pxeboot/initrd.img /var/lib/tftpboot/centos6/ [root@pxe ~]# cp /usr/share/syslinux/menu.c32 /var/lib/tftpboot/ ------------------------------------ [root@pxe ~]# vi /var/lib/tftpboot/pxelinux.cfg/default # create new timeout 100 default menu.c32 menu title ########## PXE Boot Menu ########## label 1 menu label ^1) Install CentOS 6 kernel centos6/vmlinuz append initrd=centos6/initrd.img method=http://10.0.0.70/centos6 devfs=nomount label 2 menu label ^2) Boot from local drive localboot ------------------------ [root@pxe ~]# vi /etc/httpd/conf.d/pxeboot.conf # create new Alias /centos6 /var/pxe/centos6 <Directory /var/pxe/centos6> Options Indexes FollowSymLinks Order Deny,Allow Deny from all Allow from 127.0.0.1 10.0.0.0/24 # Ip address you allow </Directory> ------------------------------------ [root@pxe ~]# /etc/rc.d/init.d/httpd restart Stopping httpd: [ OK ] Starting httpd: [ OK ]
referencias
page revision: 3, last edited: 14 Dec 2012 13:01