Queste modifiche servono per far funzionare il boot da PXE di Fog quando non si vuole o non di può modificare il dhcp.
Inoltre le modifiche servono anche perché il boot funzioni su più sottoreti.
Ovviamente il server Fog/DNSMASQ deve avere una scheda per ogni sottorete.
Installare fog come con queste opzioni.
DNSMASQ
Installare dnsmasq
# apt-get install dnsmasq
creare il file /etc/dnsmasq.d/ltsp.conf come dal forum di Fog e modificarlo come segue:
port=0 log-dhcp tftp-root=/tftpboot dhcp-boot=net:eth0,undionly.kpxe,,192.168.2.7 dhcp-boot=net:eth1,undionly.kpxe,,192.168.121.254 dhcp-no-override pxe-prompt="Press F8 for LDSS boot menu", 1 pxe-service=X86PC, "Boot from network", undionly pxe-service=X86PC, "Boot from local hard disk", 0 dhcp-range=192.168.121.254,proxy dhcp-range=192.168.2.7,proxy
Le modifiche in grassetto sono quelle importanti per far funzionare il boot da PXE su due o più sottoreti.
TFTP
Le modifiche al servizio TFTP vanno fatte nel file /tftpboot/default.ipxe:
#!ipxe
cpuid --ext 29 && set arch x86_64 || set arch i386
params
param mac0 ${net0/mac}
param arch ${arch}
echo ****************************************************
route
set gat ${net0/gateway}
echo rete: ${gat} - Processore: ${arch}
echo ****************************************************
iseq ${gat} 192.168.2.1 && goto rete1 ||
iseq ${gat} 192.168.121.1 && goto rete2 ||
echo ******************************************
echo -n Sottorete sbagliata per il boot da rete
echo ******************************************
read ciccio
:rete1
echo rete1 ufficio
#echo -n premi qualcosa per continuare:
#read ciccio
chain http://192.168.2.7/fog/service/ipxe/boot.php##params
goto end
:rete2
echo rete2 lab
#echo -n premi qualcosa per continuare:
#read ciccio
chain http://192.168.121.254/fog/service/ipxe/boot.php##params
goto end
:end
Poi
# service dnsmasq restart
Crea il Link simbolico seguente così dnsmasq può trovare undionly.kpxe:
cd /tftpboot ln -s undionly.kpxe undionly.0