Guest User

Untitled

a guest
Oct 5th, 2017
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.82 KB | None | 0 0
  1. #!ipxe
  2. set fog-ip 192.168.20.2
  3. set fog-webroot fog
  4. set boot-url http://${fog-ip}/${fog-webroot}
  5. cpuid --ext 29 && set arch x86_64 || set arch i386
  6. goto get_console
  7. :console_set
  8. colour --rgb 0x00567a 1 ||
  9. colour --rgb 0x00567a 2 ||
  10. colour --rgb 0x00567a 4 ||
  11. cpair --foreground 7 --background 2 2 ||
  12. goto MENU
  13. :alt_console
  14. cpair --background 0 1 ||
  15. cpair --background 1 2 ||
  16. goto MENU
  17. :get_console
  18. console --picture http://192.168.20.2/fog/service/ipxe/bt_bear.png --left 100 --right 80 && goto console_set || goto alt_console
  19. :MENU
  20. menu
  21. colour --rgb 0xff0000 0 ||
  22. cpair --foreground 1 1 ||
  23. cpair --foreground 0 3 ||
  24. cpair --foreground 4 4 ||
  25. item --gap Host is NOT registered!
  26. item --gap -- -------------------------------------
  27. item fog.local Boot from hard disk
  28. item fog.memtest Run Memtest86+
  29. item fog.reginput Perform Full Host Registration and Inventory
  30. item fog.reg Quick Registration and Inventory
  31. item fog.deployimage Deploy Image
  32. item fog.multijoin Join Multicast Session
  33. item fog.sysinfo Client System Information (Compatibility)
  34. item DBAN boot and nuke
  35. choose --default fog.local --timeout 30000 target && goto ${target}
  36. :fog.local
  37. sanboot --no-describe --drive 0x80 || goto MENU
  38. :fog.memtest
  39. kernel memdisk initrd=memtest.bin iso raw
  40. initrd memtest.bin
  41. boot || goto MENU
  42. :fog.reginput
  43. kernel bzImage32 loglevel=4 initrd=init_32.xz root=/dev/ram0 rw ramdisk_size=127000 web=192.168.20.2/fog/ consoleblank=0 rootfstype=ext4 storage=192.168.20.2:/images/ storageip=192.168.20.2 loglevel=4 mode=manreg
  44. imgfetch init_32.xz
  45. boot || goto MENU
  46. :fog.reg
  47. kernel bzImage32 loglevel=4 initrd=init_32.xz root=/dev/ram0 rw ramdisk_size=127000 web=192.168.20.2/fog/ consoleblank=0 rootfstype=ext4 storage=192.168.20.2:/images/ storageip=192.168.20.2 loglevel=4 mode=autoreg
  48. imgfetch init_32.xz
  49. boot || goto MENU
  50. :fog.deployimage
  51. login
  52. params
  53. param mac0 ${net0/mac}
  54. param arch ${arch}
  55. param username ${username}
  56. param password ${password}
  57. param qihost 1
  58. isset ${net1/mac} && param mac1 ${net1/mac} || goto bootme
  59. isset ${net2/mac} && param mac2 ${net2/mac} || goto bootme
  60. :fog.multijoin
  61. login
  62. params
  63. param mac0 ${net0/mac}
  64. param arch ${arch}
  65. param username ${username}
  66. param password ${password}
  67. param sessionJoin 1
  68. isset ${net1/mac} && param mac1 ${net1/mac} || goto bootme
  69. isset ${net2/mac} && param mac2 ${net2/mac} || goto bootme
  70. :fog.sysinfo
  71. kernel bzImage32 loglevel=4 initrd=init_32.xz root=/dev/ram0 rw ramdisk_size=127000 web=192.168.20.2/fog/ consoleblank=0 rootfstype=ext4 storage=192.168.20.2:/images/ storageip=192.168.20.2 loglevel=4 mode=sysinfo
  72. imgfetch init_32.xz
  73. boot || goto MENU
  74. :DBAN
  75. kernel http://${fog+ip}/dban/dban.bzi nuke="dwipe --autonuke --method quick" silent vga=785
  76. boot || goto MENU
  77. :bootme
  78. chain -ar http://192.168.20.2/fog/service/ipxe/boot.php##params ||
  79. goto MENU
  80. autoboot
Add Comment
Please, Sign In to add comment