Próxima revisión | Revisión previa |
es:howtos:network_services:ipxe [2019/02/11 12:14 (UTC)] – creado slackwarespanol | es:howtos:network_services:ipxe [2019/02/14 18:24 (UTC)] (actual) – slackwarespanol |
---|
<!-- Add your text below. We strongly advise to start with a Headline (see button bar above). --> | <!-- Add your text below. We strongly advise to start with a Headline (see button bar above). --> |
====== iPXE boot server ====== | ====== Servidor de arranque iPXE ====== |
iPXE is an open-source Preboot Execution Environment implementation that has a lot more functionality than most firmware PXE clients. Apart from using tftp to download data, iPXE can also use HTTP. Other boot methods include booting from an iSCSI SAN, a fibre channel SAN using FCoE, an ATA over Ethernet (AoE) SAN, or a wireless network. It also has a scripting language so you can create complex boot scripts. iPXE is also used as the PXE client in QEMU, so with a iPXE server you can boot virtual machines directly from a webserver. | iPXE es una implementación de código abierto de Preboot Execution Environment que tiene mucha más funcionalidad que la mayoría de los clientes PXE de firmware. Además de usar tftp para descargar datos, iPXE también puede usar HTTP. Otros métodos de arranque incluyen el arranque desde una SAN iSCSI, una SAN de canal de fibra usando FCoE, una SAN ATA sobre Ethernet (AoE) o una red inalámbrica. También tiene un lenguaje de secuencias de comandos para que pueda crear secuencias de comandos de arranque complejas. iPXE también se utiliza como cliente PXE en QEMU, por lo que con un servidor iPXE puede arrancar máquinas virtuales directamente desde un servidor web. |
| |
In this article, we will configure a web server as a primary boot server. Because not all PXE clients can use HTTP, we will setup a simple tftp server to serve (or chain-load) the iPXE client itself. | En este artículo, configuraremos un servidor web como servidor de arranque primario. Debido a que no todos los clientes PXE pueden usar HTTP, configuraremos un servidor tftp simple para servir (o cargar en cadena) al propio cliente iPXE. |
| |
===== Assumptions and prerequisites ===== | ===== Supuestos y requisitos previos ===== |
* We will use //dnsmasq// as DHCP and tftp server. We only need a minimal tftp setup and dnsmasq has a built-in server. | * Usaremos // dnsmasq // como servidor DHCP y tftp. Solo necesitamos una configuración tftp mínima y dnsmasq tiene un servidor incorporado. |
* tftp root folder is ''/srv/tftproot''. | * La carpeta raíz tftp es '' /srv/tftproot ''. |
* Web server is www.mynetwork.com. Web server root is ''/var/www/htdocs''. | * El servidor web es www.mynetwork.com. La raíz del servidor web es '' /var/www/htdocs ''. |
* We need a kernel and initrd file. Copy these from either a Slackware cd or mirror. | * Necesitamos un kernel y un archivo initrd. Copie esto desde un CD de Slackware o un mirror. |
| ===== Configurar el servidor DHCP y tftp ===== |
| Agregue la siguiente sección a '' /etc/dnsmasq.conf '': |
===== Configure DHCP and tftp server ===== | |
Add following section to ''/etc/dnsmasq.conf'': | |
<file . dnsmasq.conf> | <file . dnsmasq.conf> |
# PXE booting: setup tftp server | # PXE booting: setup tftp server |
</file> | </file> |
| |
The first lines will activate the built-in tftp server and define the root folder. Then a tag is set to determine if the boot request is coming from an iPXE client. If the request is not coming from iPXE, the iPXE client itself is downloaded and executed. If the request came from iPXE, a boot script is downloaded from the webserver and executed. | Las primeras líneas activarán el servidor tftp incorporado y definirán la carpeta raíz. Luego, se establece una etiqueta para determinar si la solicitud de inicio proviene de un cliente iPXE. Si la solicitud no proviene de iPXE, el cliente iPXE se descarga y se ejecuta. Si la solicitud proviene de iPXE, se descarga un script de arranque desde el servidor web y se ejecuta. |
| |
The above section deals specifically with PXE booting. You will also need to setup basic DHCP functionality; see the [[howtos:network_services:dhcp_server_via_dnsmasq|DHCP server via dnsmasq]] article for that. To activate dnsmasq, make sure script ''/etc/rc.d/rc.dnsmasq'' is executable. | La sección anterior trata específicamente con el arranque PXE. También necesitarás configurar la funcionalidad básica de DHCP; vea el artículo [[howtos: network_services: dhcp_server_via_dnsmasq | DHCP a través de dnsmasq]] para eso. Para activar dnsmasq, asegúrese de que el script '' /etc/rc.d/rc.dnsmasq '' sea ejecutable. |
| |
Create a new directory ''/srv/tftproot''. Download the [[http://boot.ipxe.org/undionly.kpxe|undionly.kpxe]] file from the iPXE website and copy to the ''/srv/tftproot'' directory. This is the iPXE client file which will be downloaded from the tftp server. | Cree un nuevo directorio '' /srv/tftproot ''. Descargue el archivo [[http://boot.ipxe.org/undionly.kpxe|undionly.kpxe]] desde el sitio web de iPXE y cópielo al directorio '' /srv/tftproot ''. Este es el archivo del cliente iPXE que se descargará del servidor tftp. |
| |
===== Webserver setup ===== | ===== Configuración del servidor web ===== |
Create a new folder ''/var/www/htdocs/pxe''. From the Slackware CD or mirror, copy the following files: ''isolinux/initrd.img'' and ''kernels/huge.s/bzImage'' into the pxe folder. Now create a new text file ''boot.txt'' with the following content: | Cree una nueva carpeta '' /var/www/htdocs/pxe ''. Desde el CD o espejo de Slackware, copie los siguientes archivos: '' isolinux/initrd.img '' y '' kernels/huge.s/bzImage '' en la carpeta pxe. Ahora cree un nuevo archivo de texto '' boot.txt '' con el siguiente contenido: |
| |
<file . boot.txt> | <file . boot.txt> |
</file> | </file> |
| |
This is all that is needed to create a PXE boot server. This is a very simple example that just boots the default huge installation kernel. To cater for more dynamic situations, you will have to create more complex boot scripts. Look at the examples page on the iPXE website. | Esto es todo lo que se necesita para crear un servidor de arranque PXE. Este es un ejemplo muy simple que simplemente inicia el gran núcleo de instalación predeterminado. Para atender situaciones más dinámicas, tendrá que crear scripts de arranque más complejos. Mira la página de ejemplos en el sitio web de iPXE. |
===== Complex scripts ===== | ===== Scripts complejos ===== |
A more complex script with a boot menu is shown below: | A continuación se muestra un script más complejo con un menú de arranque: |
| |
<file . boot.txt> | <file . boot.txt> |
chain ${mirror}/${dir}/${slackversion}/kernels/huge.s/bzImage ${args} ${extraargs} | chain ${mirror}/${dir}/${slackversion}/kernels/huge.s/bzImage ${args} ${extraargs} |
</file> | </file> |
| Tenga en cuenta que también puede usar una réplica pública de Slackware en lugar de alojar los archivos usted mismo. Si apunta a un espejo actual de slackware, ¡puede arrancar el kernel de instalación más reciente directamente desde Internet! |
Note that you can also use a public Slackware mirror instead of hosting the files yourself. If you point to a slackware current mirror, you can boot the latest installation kernel directly from the internet ! | |
| |
| |
| |
====== Sources ====== | ====== Fuentes ====== |
<!-- If you are copying information from another source, then specify that source --> | <!-- If you are copying information from another source, then specify that source --> |
<!-- * Original source: [[http://some.website.org/some/page.html]] --> | <!-- * Original source: [[http://some.website.org/some/page.html]] --> |
<!-- * Originally written by [[wiki:user:xxx | User X]] --> | <!-- * Originally written by [[wiki:user:xxx | User X]] --> |
<!-- * Contributions by [[wiki:user:yyy | User Y]] --> | <!-- * Contributions by [[wiki:user:yyy | User Y]] --> |
* The iPXE website: [[http://ipxe.org|ipxe.org]] with many [[http://ipxe.org/examples|examples]]. | * El sitio web de iPXE: [[http://ipxe.org|ipxe.org]] con muchos [[http://ipxe.org/examples|ejemplos]]. |
* Originally written by [[wiki:user:fdonkers | Frank Donkers]] | * Escrito originalmente por [[wiki:user:fdonkers | Frank Donkers]] |
| * Traducido por: [[wiki:user: slackwarespanol | Victor]] 2019/02/14 18:21 (UTC) |
| |
<!-- Please do not modify anything below, except adding new tags.--> | <!-- Please do not modify anything below, except adding new tags.--> |
<!-- You must remove the tag-word "template" below before saving your new page --> | <!-- You must remove the tag-word "template" below before saving your new page --> |
{{tag>howtos boot pxe ipxe author_fdonkers}} | {{tag>howtos boot pxe ipxe author_fdonkers}} |