Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

dhcpd.conf.etherboot.include 9.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207
  1. # dhcpd.conf include file for Etherboot
  2. #
  3. # Include this file from your /etc/dhcpd.conf
  4. # $Id$
  5. # Definition of Etherboot options
  6. # (taken from vendortags.html)
  7. # We use an encapsulated option space to avoid polluting the site-local DHCP option space
  8. #
  9. option space etherboot;
  10. option etherboot-encapsulated-options code 150 = encapsulate etherboot;
  11. # Definition of option codes within the etherboot-encapsulated-options space
  12. #
  13. option etherboot.extensions-path code 18 = string;
  14. option etherboot.magic code 128 = string;
  15. option etherboot.kernel-cmdline code 129 = string;
  16. option etherboot.menu-opts code 160 = string;
  17. option etherboot.nic-dev-id code 175 = string;
  18. option etherboot.menu-selection code 176 = unsigned integer 8;
  19. option etherboot.motd-1 code 184 = string;
  20. option etherboot.motd-2 code 185 = string;
  21. option etherboot.motd-3 code 186 = string;
  22. option etherboot.motd-4 code 187 = string;
  23. option etherboot.motd-5 code 188 = string;
  24. option etherboot.motd-6 code 189 = string;
  25. option etherboot.motd-7 code 190 = string;
  26. option etherboot.motd-8 code 191 = string;
  27. option etherboot.image-1 code 192 = string;
  28. option etherboot.image-2 code 193 = string;
  29. option etherboot.image-3 code 194 = string;
  30. option etherboot.image-4 code 195 = string;
  31. option etherboot.image-5 code 196 = string;
  32. option etherboot.image-6 code 197 = string;
  33. option etherboot.image-7 code 198 = string;
  34. option etherboot.image-8 code 199 = string;
  35. option etherboot.image-9 code 200 = string;
  36. option etherboot.image-10 code 201 = string;
  37. option etherboot.image-11 code 202 = string;
  38. option etherboot.image-12 code 203 = string;
  39. option etherboot.image-13 code 204 = string;
  40. option etherboot.image-14 code 205 = string;
  41. option etherboot.image-15 code 206 = string;
  42. option etherboot.image-16 code 207 = string;
  43. option etherboot.kmod code 254 = string;
  44. # Legacy support for Etherboot options as site-local options (i.e. non-encapsulated)
  45. # Note: options defined after the switch to encapsulated options should not be defined here
  46. #
  47. option legacy-etherboot-magic code 128 = string;
  48. option legacy-etherboot-kernel-cmdline code 129 = string;
  49. option legacy-etherboot-menu-opts code 160 = string;
  50. option legacy-etherboot-menu-selection code 176 = unsigned integer 8;
  51. option legacy-etherboot-motd-1 code 184 = string;
  52. option legacy-etherboot-motd-2 code 185 = string;
  53. option legacy-etherboot-motd-3 code 186 = string;
  54. option legacy-etherboot-motd-4 code 187 = string;
  55. option legacy-etherboot-motd-5 code 188 = string;
  56. option legacy-etherboot-motd-6 code 189 = string;
  57. option legacy-etherboot-motd-7 code 190 = string;
  58. option legacy-etherboot-motd-8 code 191 = string;
  59. option legacy-etherboot-image-1 code 192 = string;
  60. option legacy-etherboot-image-2 code 193 = string;
  61. option legacy-etherboot-image-3 code 194 = string;
  62. option legacy-etherboot-image-4 code 195 = string;
  63. option legacy-etherboot-image-5 code 196 = string;
  64. option legacy-etherboot-image-6 code 197 = string;
  65. option legacy-etherboot-image-7 code 198 = string;
  66. option legacy-etherboot-image-8 code 199 = string;
  67. option legacy-etherboot-image-9 code 200 = string;
  68. option legacy-etherboot-image-10 code 201 = string;
  69. option legacy-etherboot-image-11 code 202 = string;
  70. option legacy-etherboot-image-12 code 203 = string;
  71. option legacy-etherboot-image-13 code 204 = string;
  72. option legacy-etherboot-image-14 code 205 = string;
  73. option legacy-etherboot-image-15 code 206 = string;
  74. option legacy-etherboot-image-16 code 207 = string;
  75. # Apply Etherboot options only for Etherboot clients
  76. #
  77. if substring ( option vendor-class-identifier, 0, 9 ) = "Etherboot" {
  78. # We must specify this value for etherboot-magic, or Etherboot will
  79. # ignore all other options.
  80. #
  81. option etherboot.magic E4:45:74:68:00:00;
  82. # Bootfile name: derive from etherboot.kmod (calculated below)
  83. # Use boot.nbi if no NIC_DEV_ID option present
  84. # (i.e. if etherboot.kmod doesn't get set)
  85. # Also pass filename back in filename field
  86. #
  87. option bootfile-name = pick-first-value ( concat ( "boot-",
  88. config-option etherboot.kmod,
  89. ".nbi" ),
  90. "boot.nbi" ) ;
  91. filename = config-option bootfile-name;
  92. # "Sensible" default values for some options
  93. # Mount devfs (will probably be needed for a network-boot)
  94. option etherboot.kernel-cmdline " devfs=mount";
  95. # Info message (includes client IP address, MAC address, hardware ID string,
  96. # server IP address and name of boot file)
  97. option etherboot.motd-4 = concat ( "Using Etherboot to boot ",
  98. binary-to-ascii ( 10, 8, ".", leased-address ),
  99. " [",
  100. binary-to-ascii ( 16, 8, ":", suffix ( hardware, 6 ) ),
  101. "] [",
  102. pick-first-value ( option etherboot.nic-dev-id, "unknown card" ),
  103. "]", 0d:0a, " from ",
  104. binary-to-ascii ( 10, 8, ".", option dhcp-server-identifier ),
  105. " with file ",
  106. config-option tftp-server-name,
  107. ":",
  108. config-option bootfile-name,
  109. " [",
  110. pick-first-value ( config-option etherboot.kmod, "unknown module" ),
  111. "]", 0d:0a );
  112. # Legacy site-local option support
  113. # If client does not include an etherboot-encapsulated-options field in its DHCPREQUEST, then
  114. # it will not understand etherboot-encapsulated-options in the DHCPACK and so we must send
  115. # back the options as site-local options (i.e. not encapsulated).
  116. # Note: we need do this only for options that existed prior to the switch to encapsulation.
  117. #
  118. if not exists etherboot-encapsulated-options {
  119. option legacy-etherboot-magic = config-option etherboot.magic;
  120. option legacy-etherboot-kernel-cmdline = config-option etherboot.kernel-cmdline;
  121. option legacy-etherboot-menu-opts = config-option etherboot.menu-opts;
  122. option legacy-etherboot-menu-selection = config-option etherboot.menu-selection;
  123. option legacy-etherboot-motd-1 = config-option etherboot.motd-1;
  124. option legacy-etherboot-motd-2 = config-option etherboot.motd-2;
  125. option legacy-etherboot-motd-3 = config-option etherboot.motd-3;
  126. option legacy-etherboot-motd-4 = config-option etherboot.motd-4;
  127. option legacy-etherboot-motd-5 = config-option etherboot.motd-5;
  128. option legacy-etherboot-motd-6 = config-option etherboot.motd-6;
  129. option legacy-etherboot-motd-7 = config-option etherboot.motd-7;
  130. option legacy-etherboot-motd-8 = config-option etherboot.motd-8;
  131. option legacy-etherboot-image-1 = config-option etherboot.image-1;
  132. option legacy-etherboot-image-2 = config-option etherboot.image-2;
  133. option legacy-etherboot-image-3 = config-option etherboot.image-3;
  134. option legacy-etherboot-image-4 = config-option etherboot.image-4;
  135. option legacy-etherboot-image-5 = config-option etherboot.image-5;
  136. option legacy-etherboot-image-6 = config-option etherboot.image-6;
  137. option legacy-etherboot-image-7 = config-option etherboot.image-7;
  138. option legacy-etherboot-image-8 = config-option etherboot.image-8;
  139. option legacy-etherboot-image-9 = config-option etherboot.image-9;
  140. option legacy-etherboot-image-10 = config-option etherboot.image-10;
  141. option legacy-etherboot-image-11 = config-option etherboot.image-11;
  142. option legacy-etherboot-image-12 = config-option etherboot.image-12;
  143. option legacy-etherboot-image-13 = config-option etherboot.image-13;
  144. option legacy-etherboot-image-14 = config-option etherboot.image-14;
  145. option legacy-etherboot-image-15 = config-option etherboot.image-15;
  146. option legacy-etherboot-image-16 = config-option etherboot.image-16;
  147. }
  148. }
  149. # Some options should be set for both Etherboot and the udhcpc client
  150. #
  151. if ( ( substring ( option vendor-class-identifier, 0, 9 ) = "Etherboot" )
  152. or ( substring ( option vendor-class-identifier, 0, 5 ) = "udhcp" ) ) {
  153. # TFTP server defaults to DHCP server and is specified in both
  154. # next-server field and tftp-server-name option field
  155. #
  156. option tftp-server-name = binary-to-ascii ( 10, 8, ".", config-option dhcp-server-identifier );
  157. server-name = config-option tftp-server-name;
  158. next-server = config-option dhcp-server-identifier;
  159. # Root path defaults to root of TFTP server
  160. option root-path = concat ( config-option tftp-server-name, ":/" );
  161. # A fallback hostname, generated from the IP address
  162. option host-name = concat ( "client_", binary-to-ascii ( 10, 8, "_", leased-address ) );
  163. }
  164. # Force some items onto parameter request list for udhcp
  165. #
  166. if substring ( option vendor-class-identifier, 0, 5 ) = "udhcp" {
  167. # Forcibly add root-path to list
  168. option dhcp-parameter-request-list = concat ( option dhcp-parameter-request-list, 11 );
  169. }
  170. # Etherboot sends a string to identify the NIC in etherboot.nic-dev-id.
  171. # For PCI NICs, this string is of the form "PCI:vvvv:dddd" where vvvv is the
  172. # vendor identifier and dddd the device identifier, in lower-case ASCII hex.
  173. # For ISA NICs, the format of the string is "ISA:..." where ... is not yet
  174. # decided upon.
  175. #
  176. # We use the identifier to select the NBI image that will be specified via
  177. # the "bootfile-name" option.
  178. #
  179. # PCI NICs - use PCI vendor and device IDs
  180. # Listed in file generated by mknbi-set
  181. #
  182. include "/etc/dhcpd.conf.etherboot-pcimap.include";
  183. # ISA NICs
  184. #
  185. if substring ( option vendor-class-identifier, 0, 9 ) = "Etherboot" {
  186. if exists etherboot.nic-dev-id {
  187. }
  188. }