четверг, 10 ноября 2011 г.

PXE boot

cisco 800:

ip dhcp pool pxetest
     network 192.168.186.0 255.255.255.192
    bootfile pxelinux.0
    next-server 192.168.186.3 

     dns-server 172.17.1.2 172.17.2.2
     default-router 192.168.186.1
     option 78 ip 192.168.1.15
     option 79 ascii "DEFAULT"
     lease 5

apt-get install  bootp tftpd

echo "bootps dgram udp wait root /usr/sbin/bootpd bootpd -i -t 120 " >>/etc/inetd.conf
echo "tftp dgram udp wait nobody /usr/sbin/tcpd /usr/sbin/in.tftpd /srv/tftp" >>/
etc/inetd.con

in /etc/bootptab:

client:\
  hd=/srv/tftp:\  <--Path to root
  bf=pxelinux.0:\  <-- image file
  ip=192.168.186.5:\  <-- client ip
  sm=255.255.255.0:\
  sa=192.168.186.3:\  <-- tftp & bootp server
  ha=0022158FC9C5: <--client mac


cd /srv/tftp; wget http://http.us.debian.org/debian/dists/squeeze/main/installer-i386/current/images/netboot/netboot.tar.gz && tar xfz netboot.tar.gz && rm  netboot.tar.gz