Netboot - Boot do Ubuntu Lucid via rede - DHCP-BOOT

link: https://help.ubuntu.com/community/Installation/Netboot

link: https://help.ubuntu.com/community/Installation/QuickNetboot

Imagens do CD em : http://cdimage.ubuntu.com/netboot/lucid/

melhor link: http://www.marcosorfila.com/site/boot-a-traves-de-la-red-con-pxe/

Instalação de software necessário:

sudo apt-get install dhcp3-server tftpd-hpa tftp-hpa

Depois altere a configuração do DHCP server:

ddns-update-style interim;
ignore client-updates;
ddns-domainname "casa.lan.";
ddns-rev-domainname "in-addr.arpa.";
option domain-name "casa.lan";
option domain-name-servers master.casa.lan;
default-lease-time 600;
max-lease-time 7200;
key DHCP_UPDATER {
algorithm HMAC-MD5.SIG-ALG.REG.INT;
# Important: Replace this key with your generated key.
# Also note that the key should be surrounded by quotes.
secret "dmY5cRTBAENrkhHqqbebrg==";
};
zone casa.lan. {
primary 127.0.0.1;
key DHCP_UPDATER;
}
zone 0.168.192.in-addr.arpa. {
primary 127.0.0.1;
key DHCP_UPDATER;
}
authoritative;
log-facility local7;
option wpad-url code 252 = text;
option wpad-url "http://192.168.0.1/wpad.dat\n";
subnet 10.152.187.0 netmask 255.255.255.0 {
}
allow booting;
allow bootp;
subnet 192.168.0.0 netmask 255.255.255.0 {
range 192.168.0.11 192.168.0.20;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.0.255;
option routers 192.168.0.1;
option netbios-name-servers 192.168.0.1;
option netbios-node-type 2;
option ntp-servers 192.168.0.1;
option domain-name-servers 192.168.0.1;
option wpad-url "http://192.168.0.1/wpad.dat\n";
default-lease-time 600;
max-lease-time 7200;
# PXE Parameters
next-server 192.168.0.1;
filename "pxelinux.0";
}

Depois configure o tftp:

cd /var/lib/tftpboot
DISTRIB=`grep DISTRIB_CODENAME /etc/lsb-release | cut -d'=' -f2`
sudo wget -np -r http://archive.ubuntu.com/ubuntu/dists/${DISTRIB}/main/installer-i386/current/images/netboot/
sudo wget -np -r http://archive.ubuntu.com/ubuntu/dists/${DISTRIB}/main/installer-i386/current/images/netboot/ubuntu-installer/i386/
sudo /bin/mv archive.ubuntu.com/ubuntu/dists/${DISTRIB}/main/installer-i386/current/images/netboot/* .
sudo /bin/rm -rf archive.ubuntu.com/
sudo find . -name 'index.html*' -exec /bin/rm {} \;
sudo chown -R root:root /var/lib/tftpboot
sudo chmod -R 777 /var/lib/tftpboot

O comando abaixo lista as portas e serviços:

netstat -nulp

Reinicie o dhcp-server:
sudo /etc/init.d/dhcp3-server restart

Teste o tftp com os comandos abaixo:

sudo /etc/init.d/tftpd-hpa start
mkdir /tmp/prueba-tftp
cd /tmp/prueba-tftp
tftp localhost -c get pxelinux.0
ls -l pxeli*

Comments