Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentes Révision précédente Prochaine révision | Révision précédente | ||
informatique:linux:pxe [2007/11/09 10:55] benoit |
informatique:linux:pxe [2018/09/06 19:10] (Version actuelle) |
||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
===== Serveurs boot PXE ===== | ===== Serveurs boot PXE ===== | ||
+ | ==== Sous redhat5 ==== | ||
+ | Cette méthode peut fonctionner pour la plupart des distributions linux | ||
+ | |||
+ | Prerequis: installer un serveur [[dhcp]] | ||
+ | |||
+ | === Installer les packages suivants === | ||
+ | syslinux | ||
+ | tftp | ||
+ | |||
+ | === Configuration PXE === | ||
+ | **Copier le binaire PXE linux:** | ||
+ | cp /usr/lib/syslinux/pxelinux.0 /tftpboot/pxelinux.0 | ||
+ | |||
+ | **Créer le répertoire ''pxelinux.cfg''** | ||
+ | mkdir /tftpboot/pxelinux.cfg | ||
+ | |||
+ | **Créer le fichier /tftpboot/pxelinux.cfg/default avec ce type de contenu :** | ||
+ | PROMPT 1 | ||
+ | DEFAULT 0 | ||
+ | DISPLAY messages | ||
+ | TIMEOUT 60 | ||
+ | label 0 | ||
+ | LOCALBOOT 0 | ||
+ | label 1 | ||
+ | kernel rhel4/vmlinuz | ||
+ | append initrd=rhel4/initrd.img ks=ftp://192.168.96.129/kickstart/rhel4.cfg | ||
+ | label 2 | ||
+ | kernel rhel5/vmlinuz | ||
+ | append initrd=rhel5/initrd.img ks=ftp://192.168.96.129/kickstart/rhel5.cfg | ||
+ | |||
+ | Chaques label représente un OS à démarrer, ci-dessus, celui par defaut est le ''LOCALBOOT'' | ||
+ | |||
+ | ''DISPLAY messages'' est un fichier texte ''/tftpboot/messages'' pour informer les choix possible. Le contenu peut-être par exemple: | ||
+ | |||
+ | ################################################################ | ||
+ | Kickstart Installer | ||
+ | - Taper 0 : Pour booter localement | ||
+ | - Taper 1 : Pour installer RedHat 4 enterprise ES Update 4 | ||
+ | - Taper 2 : pour installer RedHat 5 enterprise Server Update 1 | ||
+ | ################################################################ | ||
+ | |||
+ | |||
+ | **Créer le repertoire contenant le kernel et l'initrd que l'on recupère d'un CDrom linux** | ||
+ | mkdir /tftpboot/rhel4 | ||
+ | cp /media/cdrom/images/pxeboot/vmlinuz /tftpboot/rhel4/ | ||
+ | cp /media/cdrom/images/pxeboot/initrd.img /tftpboot/rhel4/ | ||
+ | |||
+ | === Configuration de DHCP === | ||
+ | Ajouter les instructions suivantes dans /etc/dhcpd.conf en plus de la configuration [[dhcp]] standard | ||
+ | allow booting; | ||
+ | allow bootp; | ||
+ | class "pxeclients" { | ||
+ | match if substring(option vendor-class-identifier, 0, 9) = "PXEClient"; | ||
+ | next-server 192.168.96.129; | ||
+ | filename "pxelinux.0"; | ||
+ | } | ||
==== Sous redhat4 ==== | ==== Sous redhat4 ==== | ||
Ligne 52: | Ligne 108: | ||
10.0.0.2 etant le serveur tftp | 10.0.0.2 etant le serveur tftp | ||
- | |||
- | ==== Sous redhat5 ==== | ||
- | === Installer les packages suivants === | ||
- | syslinux | ||
- | tftp | ||
- | |||
- | === Configuration PXE === | ||
- | Copier le binaire PXE linux: | ||
- | cp /usr/lib/syslinux/pxelinux.0 /tftpboot/pxelinux.0 | ||
- | |||
- | Créer le répertoire ''pxelinux.cfg'' | ||
- | mkdir /tftpboot/pxelinux.cfg | ||
- | |||
- | Créer le fichier /tftpboot/pxelinux.cfg/default avec ce type de contenu : | ||
- | label 1 | ||
- | kernel rhel4/vmlinuz | ||
- | append initrd=rhel4/initrd.img | ||
- | |||
- | Créer le repertoire contenant le kernel et l'initrd que l'on recupère d'un CDrom linux | ||
- | mkdir /tftpboot/rhel4 | ||
- | cp /media/cdrom/images/pxeboot/vmlinuz /tftpboot/rhel4/ | ||
- | cp /media/cdrom/images/pxeboot/initrd.img /tftpboot/rhel4/ | ||
- | |||
- | === Configuration de DHCP === | ||
- | Ajouter les instructions suivantes dans /etc/dhcpd.conf en plus de la configuration [[dhcp]] standard | ||
- | allow booting; | ||
- | allow bootp; | ||
- | class "pxeclients" { | ||
- | match if substring(option vendor-class-identifier, 0, 9) = "PXEClient"; | ||
- | next-server 192.168.96.129; | ||
- | filename "pxelinux.0"; | ||
- | } |