Outils pour utilisateurs

Outils du site


issue78:tuto_installer_linux_via_pxe

Table des matières

1

PXE can be considered as one of the ways to load the operating system on a computer. The Preboot eXecution Environment (PXE, also known as Pre-Execution Environment; sometimes pronounced “pixie”) is an environment to boot computers using a network interface independently of data storage devices (like hard disks) or installed operating systems. When the computer has PXE capabilities, the BIOS allows the user to choose among the possible devices to load the operating system, and thereby boot from the network. If this option is selected, the firmware PXE uses DHCP to configure an IP address on the network adapter and locate a server (the “boot server”) via TFTP to download a file, storing it in RAM memory. This file is then executed, thereby booting an operating system.

PXE peut être considéré comme l'un des moyens de charger le système d'exploitation sur un ordinateur.

Le Preboot eXecution Environment (PXE, également connu comme le Pre-eXecution Environment, parfois prononcé « pixie » (lutin, elfe)) est un environnement pour démarrer les ordinateurs en utilisant une interface réseau indépendamment des périphériques de stockage de données (comme les disques durs) ou des systèmes d'exploitation installés.

Lorsque l'ordinateur a des capacités PXE, le BIOS permet à l'utilisateur de choisir parmi les dispositifs possibles pour charger le système d'exploitation, et ainsi démarrer à partir du réseau.

Si cette option est sélectionnée, le microcode PXE utilise DHCP pour configurer une adresse IP sur la carte réseau et localiser un serveur (le « serveur de démarrage ») via TFTP pour télécharger un fichier, et le stocker dans la mémoire RAM.

Ce fichier est ensuite exécuté, faisant ainsi démarrer un système d'exploitation.

In standard mode, the DHCP server does not directly provide the boot server, but acts as a “PXE redirection service”, which redirects the client to the available PXE server. The PXE server is a modified DHCP server, which uses UDP port 4011 and provides the client with the IP address of the boot server and the name of the network bootstrap program (NBP) to download. In practice, usually the PXE firmware is able to directly receive the necessary parameters from the DHCP server to identify the server and the boot file to download, and you can configure a standard DHCP server to provide the necessary parameters to boot via PXE. sudo apt-get install tftpd-hpa dhcp3-server netkit-inetd lftp Modify the /etc/default/tftpd-hpa file as shown above right. The last row will have a verbose log.

En mode standard, le serveur DHCP n'est pas directement le serveur de démarrage, mais agit comme un « service de redirection PXE », qui redirige le client vers le serveur PXE disponible.

Le serveur PXE est un serveur DHCP modifié, qui utilise le port UDP 4011 et fournit au client l'adresse IP du serveur de démarrage et le nom du programme d'amorçage de réseau (NBP) à télécharger.

Dans la pratique, le plus souvent le microcode PXE est capable de recevoir directement les paramètres nécessaires à partir du serveur DHCP pour identifier le serveur et le fichier de démarrage à télécharger, et vous pouvez configurer un serveur DHCP standard pour fournir les paramètres nécessaires au démarrage via PXE.

sudo apt-get install dhcp3-server netkit-inetd lftp tftpd-hpa

Modifiez le fichier /etc/default/tftpd-hpa, comme indiqué ci-dessus à droite.

La dernière ligne aura un journal détaillé.

2

Now we work on the files related to the DHCP Service: vim /etc/dhcp3/dhcpd.conf and type the text shown below. Clearly, the IP addresses are totally invented; you must insert the correct ones. The filename parameter is usually pxelinux.0, but can be modified at will by placing it where it is convenient for you. It is not over yet with DHCP… vim /etc/default/dhcp3-server and specify the interface to use with the INTERFACES directive.

Maintenant, nous travaillons sur les fichiers liés au service DHCP :

vim /etc/dhcp3/dhcpd.conf

et tapez le texte ci-dessous.

Évidemment, les adresses IP sont totalement inventées, vous devez insérer les bonnes.

Le paramètre de nom de fichier est généralement pxelinux.0, mais peut être modifié à volonté en le plaçant là où c'est pratique pour vous.

Ce n'est pas encore terminé avec DHCP…

vim /etc/default/dhcp3-server

et précisez l'interface à utiliser avec la directive INTERFACES.

We put in /var/ lib/tftpboot an Ubuntu distribution netboot version taking it from here: lftp -c “open http://archive.ubuntu.com/ubuntu/dists/lucid/main/installer-i386/current/images/; mirror netboot/” Then we start the services: sudo /etc/init.d/tftpd-hpa start sudo /etc/init.d/dhcp3-server start and we pass to the configuration of the PC terminal on which it will be installing the operating system.

Nous avons mis dans /var/lib/tftpboot une version de démarrage par le réseau (netboot) d'une distribution d'Ubuntu en la prenant ici :

lftp -c “open http://archive.ubuntu.com/ubuntu/dists/lucid/main/installer-i386/current/images/;

mirror netboot/”

Ensuite, nous démarrons les services :

sudo /etc/init.d/tftpd-hpa start

sudo /etc/init.d/dhcp3-server start

et nous passons à la configuration du PC terminal sur lequel il va installer le système d'exploitation.

3

Usually, modern BIOSes have the boot option set to the F12 key, but I recommend the classic RTFM … to dispel any doubt. The computer that will be used as a terminal seeks the IP address via DHCP, and once it has obtained this, will allow access to the folder of the tftp server to show the typical GRUB installation. I usually work with server versions of Ubuntu, but it could happen that the desktop version, using the graphical installer, does not allow the proper display of the options, especially if the machine on which you want to proceed is a bit old and has not large-capacity video graphics. In this case, edit the /var/lib/tftpboot/ubuntu-installer/i386/boot-screens and write wget http://archive.ubuntu.com/ubuntu/dists/hardy/main/installer-i386/current/images/netboot/ubuntu-installer/i386/boot-screens/boot.txt wget http://archive.ubuntu.com/ubuntu/dists/hardy/main/installer-i386/current/images/netboot/ubuntu-installer/i386/boot-screens/splash.rle This will allow you to boot using older machines.

Habituellement, les BIOS modernes ont l'option de démarrage réglé sur la touche F12, mais je recommande le RTFM classique… pour dissiper tout doute.

L'ordinateur qui sera utilisé en tant que terminal cherche l'adresse IP via DHCP, et une fois qu'il l'a obtenue, permet l'accès au dossier du serveur TFTP pour afficher l'installation typique de GRUB.

Je travaille habituellement avec les versions serveur d'Ubuntu, mais il peut arriver que la version de bureau, en utilisant l'installateur graphique, ne permette pas l'affichage correct des options, surtout si la machine sur laquelle vous voulez procéder est un peu vieille et n'a pas une grande capacité vidéo et graphique. Dans ce cas, modifiez-le :

/var/lib/tftpboot/ubuntu-installer/i386/boot-screens

et écrivez :

wget http://archive.ubuntu.com/ubuntu/dists/hardy/main/installer-i386/current/images/netboot/ubuntu-installer/i386/boot-screens/boot.txt

wget http://archive.ubuntu.com/ubuntu/dists/hardy/main/installer-i386/current/images/netboot/ubuntu-installer/i386/boot-screens/splash.rle

Cela vous permettra de démarrer en utilisant des machines plus anciennes.

issue78/tuto_installer_linux_via_pxe.txt · Dernière modification : 2014/03/24 06:49 de fcm_-_ekel