aquaballoon

PXE Booting - Netboot

Aug 19th, 2013
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.92 KB | None | 0 0
  1. http://cdimage.ubuntu.com/netboot/
  2. http://www.serenux.com/2010/05/howto-setup-your-own-pxe-boot-server-using-ubuntu-server/
  3. http://www.serenux.com/2010/05/howto-get-an-ubuntu-live-cd-to-boot-off-a-pxe-server/
  4.  
  5. $ sudo apt-get install tftpd-hpa inetutils-inetd
  6.  
  7. $ sudo nano /etc/inetd.conf
  8. tftp    dgram   udp    wait    root    /usr/sbin/in.tftpd /usr/sbin/in.tftpd -s /srv/tftp
  9.  
  10. $ sudo nano /etc/default/tftpd-hpa
  11. TFTP_USERNAME="tftp"
  12. TFTP_DIRECTORY="/srv/tftp"
  13. TFTP_ADDRESS="0.0.0.0:69"
  14. TFTP_OPTIONS="--secure"
  15.  
  16. $ sudo service inetutils-inetd restart
  17. $ sudo service tftpd-hpa restart
  18.  
  19. $ sudo mkdir -p /srv/tftp
  20.  
  21. ### Download netboot from http://cdimage.ubuntu.com/netboot/ ###
  22. $ sudo cp /media/cdrom/install/netboot/pxelinux.0 /srv/tftp
  23. $ sudo mkdir -p /srv/tftp/ubuntu-installer/i386
  24. $ cd /media/cdrom/install/netboot/ubuntu-installer/i386
  25. $ sudo cp -R boot-screens /srv/tftp/ubuntu-installer/i386
  26. $ sudo cp initrd.gz linux /srv/tftp/ubuntu-installer/i386
  27.  
  28. $ sudo mkdir /srv/tftp/pxelinux.cfg
  29. $ sudo nano /srv/tftp/pxelinux.cfg/default
  30. include mybootmenu.cfg
  31. default ubuntu-installer/i386/boot-screens/vesamenu.c32
  32. prompt 0
  33. timeout 0
  34.  
  35. $ sudo nano /srv/tftp/mybootmenu.cfg
  36. menu hshift 13
  37. menu width 49
  38. menu margin 8
  39. menu title Boot Menu - MIU ICC.
  40. include ubuntu-installer/i386/boot-screens/stdmenu.cfg
  41. label install
  42.    menu label ^Install 12.04 from Mirrors
  43.    menu default
  44.    kernel ubuntu-installer/i386/linux
  45.    append vga=normal initrd=ubuntu-installer/i386/initrd.gz -- quiet
  46.  
  47. $ sudo chmod 777 -R /srv
  48.  
  49. ### dhcp ###
  50. $ sudo nano /etc/dhcp/dhcpd.conf
  51. #next-server 192.168.0.10; ## -> pxe server
  52. filename "pxelinux.0";
  53.  
  54. $ sudo /etc/init.d/isc-dhcp-server restart
  55.  
  56. ### iptables ###
  57. # # PXE TFTP
  58. -A INBOUND -p tcp -m tcp --dport 69 -j ACCEPT
  59. -A INBOUND -p udp -m udp --dport 69 -j ACCEPT
  60. # # PXE DHCP
  61. -A INBOUND -p tcp -m tcp --dport 67:68 -j ACCEPT
  62. -A INBOUND -p udp -m udp --dport 67:68 -j ACCEPT
Advertisement
Add Comment
Please, Sign In to add comment