informatique:nix:linux:linux_pxe:pxe_dhcpd_tftp_boot_reseau

  • /etc/dhcp/dhcpd.conf
filename "gpxelinux.0";
next-server 10.1.239.136;
  • Installer le package syslinux
  • Copier les fichiers ci-dessous de /usr/share/syslinux vers /images/tftpboot :
pxelinux.0
menu.c32
memdisk
mboot.c32
chain.c32
gpxelinux.0

Ci-dessous mon arbo :

[root@pxe tftpboot]# ls -l --group-directories-first
total 280
drwxr-xr-x 3 root root  4096 Apr  4 11:26 aix
drwxr-xr-x 3 root root  4096 Apr  4 11:26 cristie_sol10u5_8_9_sparc
drwxr-xr-x 3 root root  4096 Mar 26 10:44 cristie_sol10u6_11_sparc
drwxr-xr-x 3 root root  4096 Apr  9 11:42 linux
drwxr-xr-x 2 root root  4096 Apr  9 11:55 pxelinux.cfg
-rwxr-xr-x 1 root root 20192 Mar  6 18:03 chain.c32
-rwxr-xr-x 1 root root 89501 Apr  9 10:28 gpxelinux.0
-rwxr-xr-x 1 root root 35420 Mar  6 18:03 mboot.c32
-rwxr-xr-x 1 root root 25244 Mar  6 18:03 memdisk
-rwxr-xr-x 1 root root 60928 Mar  6 18:03 menu.c32
-rwxr-xr-x 1 root root 26828 Mar  6 18:03 pxelinux.0

Sous le répertoire Linux on a :

[root@pxe linux]# ls -ltr
total 4
drwxr-xr-x 4 root root 4096 Apr  9 14:21 knoppix

Ce répertoire contient une copie de l'image ISO (ici une Knoppix). L’environnent PXE a besoin de 2 fichiers : un kernel (fichier linux) et un miniroot (fichier miniroot.gz) :

[root@pxe knoppix]# ls -ltr
total 8512
-rwxr-xr-x 1 root root      54 Jun 17  2001 autorun.bat
-rwxr-xr-x 1 root root      45 Feb 23  2003 autorun.inf
-rwxr-xr-x 1 root root     967 May  1  2004 autorun.pif
-rwxr-xr-x 1 root root   32606 Feb 22  2006 cdrom.ico
drwxr-xr-x 3 root root    4096 Jul 13  2009 boot
-rwxr-xr-x 1 root root    1744 Jul 19  2012 index.html
drwxr-xr-x 3 root root    4096 Aug 22  2012 KNOPPIX
-rwxr-xr-x 1 root root 4685140 Apr  9 11:44 miniroot.gz
-rwxr-xr-x 1 root root 3972400 Apr  9 12:16 linux

Pour les générer le plus simple et de booter sur la knoppix, configurer le réseau (netcardconfig) et de lancer knoppix-terminalserver qui va générer (entre autres) les 2 fichiers qui nous intéressent sous /tftpboot/. On les rapatrie ensuite sur le serveur dhcp.

  • /etc/exportfs
[root@pxe knoppix]# cat /etc/exports
/images/tftpboot/cristie_sol10u6_11_sparc/system        *(ro,sync,no_root_squash,all_squash,anonuid=0,anongid=0)
/images/tftpboot/cristie_sol10u5_8_9_sparc/system       *(ro,sync,no_root_squash,all_squash,anonuid=0,anongid=0)
/images/tftpboot/aix/recovery   *(ro,sync,no_root_squash,all_squash,anonuid=0,anongid=0)
/images/tftpboot/linux/knoppix  *(ro,sync,no_root_squash,all_squash,anonuid=0,anongid=0)
  • /images/tftpboot/pxelinux.cfg/default
default menu.c32
prompt 0
timeout 300
ONTIMEOUT local

MENU TITLE PXE for Cristie Recovery

label Knoppix
 MENU LABEL Knoppix
 kernel linux/knoppix/linux
 append nfsdir=10.1.239.136:/images/tftpboot/linux/knoppix nodhcp lang=fr ramdisk_size=100000 init=/etc/init apm=power-off nomce vga=normal initrd=linux/knoppix/miniroot.gz quiet BOOT_IMAGE=knoppix

Booter directement un ISO

label Cristie_env_win
        MENU LABEL Cristie env (win)
        kernel windows/memdisk
        append initrd=windows/NBMR6.4.2_for_NetWorker7.6.5-pe2.iso iso raw
  • informatique/nix/linux/linux_pxe/pxe_dhcpd_tftp_boot_reseau.txt
  • Dernière modification : 2013/04/16 16:28
  • de 127.0.0.1