Gentoo Archives: gentoo-user

From: Dan Farrell <dan@×××××××××.cx>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] diskless booting
Date: Mon, 01 Oct 2007 22:22:27
Message-Id: 20071001170759.7afa3c45@pascal.spore.ath.cx
In Reply to: Re: [gentoo-user] diskless booting [solved, I hope] by Roger Mason
1 On Mon, 01 Oct 2007 12:57:05 -0230
2 Roger Mason <rmason@×××××××.ca> wrote:
3
4 > Well, I had it working on Friday but over the weeekend I tinkered some
5 > more with pixegrub and broke it again. Now pxelinux won't work
6 > either.
7
8 I've attached my dhcpd.conf, sans rndc-key. Please note that this
9 configuration has a big block of code that is for dynamic DNS updates.
10 I kept it in because I found it hard to figure out for myself, and I
11 figured it would be better to put more out on the web rather than refer
12 you to sources I don't even know exist. I don't know if you are
13 running BIND or a DNS server that can do static updates, but if you
14 can, I highly suggest it for your own sanity.
15
16 For usefulness of online archives, which probably strip attachments,
17 here is the same info. I even annotated it a little.
18
19 /*===================================================================
20 dhcpd.conf from spore.ath.cx
21 ===================================================================*/
22
23 key "rndc-key" { algorithm hmac-md5;
24 secret "xxxxxxxxxxxxxxxxxxxxxxxx";
25 };
26
27 server-identifier zeus.pantheon.spore.ath.cx;
28 authoritative;
29
30 option domain-name-servers 192.168.10.1, 192.168.1.87;
31 ddns-update-style interim;
32
33 use-host-decl-names on;
34 allow client-updates;
35
36 # these two lines are important for net booting.. i think...
37 option oe-key code 159 = string;
38 option oe-gateway code 160 = ip-address;
39
40 on commit {
41 if (not static and
42 ((config-option server.ddns-updates = null) or
43 (config-option server.ddns-updates != 0))) {
44 if exists oe-key {
45 set ddns-rev-name =
46 concat (binary-to-ascii (10, 8, ".",
47 reverse (1, leased-address)), ".",
48 pick (config-option server.ddns-rev-domainname,
49 "in-addr.arpa."));
50 set full-oe-key = option oe-key;
51 switch (ns-update (delete (IN, 25, ddns-rev-name, null),
52 add (IN, 25, ddns-rev-name, full-oe-key,
53 lease-time / 2)))
54 {
55 default:
56 unset ddns-rev-name;
57 break;
58 case NOERROR:
59 on release or expiry {
60 switch (ns-update (delete (IN, 25, ddns-rev-name, null))) {
61 case NOERROR:
62 unset ddns-rev-name;
63 break;
64 }
65 }
66 }
67 }
68 }
69 }
70
71 default-lease-time 609080;
72 max-lease-time 1218160;
73
74 # tftp server, I believe.
75 next-server 192.168.10.1;
76
77 #barge in and take over any lease you hear of, even if
78 #you don't remember granting it.
79 authoritative
80
81 # more pxe settings:
82 option space PXE;
83 option PXE.mtftp-ip code 1 = ip-address;
84 option PXE.mtftp-cport code 2 = unsigned integer 16;
85 option PXE.mtftp-sport code 3 = unsigned integer 16;
86 option PXE.mtftp-tmout code 4 = unsigned integer 8;
87 option PXE.mtftp-delay code 5 = unsigned integer 8;
88 option PXE.discovery-control code 6 = unsigned integer 8;
89 option PXE.discovery-mcast-addr code 7 = ip-address;
90
91 # each subdomain should have a zone entry.
92
93 #wireless, g.spore.ath.cx
94 zone g.spore.ath.cx. {
95 primary 192.168.1.87;
96 key rndc-key;
97 }
98
99 #you might well need the in-addr.arpa zone too:
100
101 zone 2.168.192.in-addr.arpa. {
102 primary 192.168.1.87;
103 key rndc-key;
104 }
105
106 # this subnet doesn't support diskless booting. Yuck, doing that
107 # over WIFI would be icky.
108 subnet 192.168.2.0 netmask 255.255.255.0
109 {
110 option domain-name "g.spore.ath.cx";
111 # the default route for the subdomain.
112 option routers 192.168.1.1;
113 option domain-name-servers 192.168.1.87;
114 }
115
116 #pantheon
117
118 # another one of those netbooting things
119 option option-150 code 150 = text ;
120
121 # another zone...
122 zone pantheon.spore.ath.cx. {
123 primary 192.168.10.1;
124 key rndc-key;
125 }
126
127 # ... and reverse ...
128 zone 10.168.192.in-addr.arpa. {
129 primary 192.168.10.1;
130 key rndc-key;
131
132 # ... and the subnet information ...
133 subnet 192.168.10.0 netmask 255.255.255.0 {
134 range 192.168.10.101 192.168.10.199;
135 option domain-name-servers 192.168.10.1;
136 option domain-name "pantheon.spore.ath.cx";
137 option routers 192.168.10.1;
138 option broadcast-address 192.168.10.255;
139 one-lease-per-client on;
140 option routers 192.168.10.1;
141 option domain-name-servers 192.168.10.1;
142 update-static-leases on;
143 ddns-domainname "pantheon.spore.ath.cx";
144
145 #the host entry is required for any host that is to be net booted.
146 host apollo{
147 # some way to identify
148 hardware ethernet 00:04:76:e3:3b:95;
149 fixed-address 192.168.10.99;
150 option host-name "apollo";
151 DDNS-hostname "apollo";
152 # analagous to next server , I guess
153 option PXE.mtftp-ip 0.0.0.0;
154 # file to be served. In this case, it's the syslinux preboot
155 #execution environment binary.
156 filename "pxelinux.0";
157 }
158 #more examples of host entries, all pretty much the same idea.
159 host aphrodite{
160 hardware ethernet 00:01:02:5F:6E:6B;
161 fixed-address 192.168.10.96;
162 option host-name "aphrodite";
163 DDNS-hostname "aphrodite";
164 option PXE.mtftp-ip 0.0.0.0;
165 filename "pxelinux.0";
166 }
167 host artemis {
168 hardware ethernet 00:01:02:46:E7:CC;
169 fixed-address 192.168.10.97;
170 option host-name "artemis";
171 DDNS-hostname "artemis";
172 option PXE.mtftp-ip 0.0.0.0;
173 filename "pxelinux.0";
174 }
175 host matty{
176 hardware ethernet 00:01:03:20:B8:04;
177 fixed-address 192.168.10.95;
178 option host-name "matty";
179 DDNS-hostname "matty";
180 option PXE.mtftp-ip 0.0.0.0;
181 filename "pxelinux.0";
182 }
183 host cuttlefish{
184 hardware ethernet 00:50:da:d7:45:a4;
185 fixed-address 192.168.10.94;
186 option host-name "cuttlefish";
187 DDNS-hostname "cuttlefish";
188 option PXE.mtftp-ip 0.0.0.0;
189 filename "pxelinux.0";
190 }
191 }
192
193 #spore.ath.cx
194 zone spore.ath.cx. {
195 primary 192.168.1.87;
196 key rndc-key;
197 }
198 zone 1.168.192.in-addr.arpa. {
199 primary 192.168.1.87;
200 key rndc-key;
201 }
202
203 subnet 192.168.1.0 netmask 255.255.255.0 {
204 range 192.168.1.101 192.168.1.199;
205 option domain-name-servers 192.168.1.87;
206 option domain-name "spore.ath.cx";
207 ddns-domainname "spore.ath.cx";
208 option routers 192.168.1.1;
209 option subnet-mask 255.255.255.0;
210 option broadcast-address 192.168.1.255;
211 one-lease-per-client on;
212 update-static-leases on;
213
214 host davey{
215 hardware ethernet 00:01:03:20:AE:CF;
216 fixed-address 192.168.1.1;
217 option host-name "davey";
218 option routers none;
219 DDNS-hostname "davey";
220 option PXE.mtftp-ip 192.168.10.1;
221 filename "pxelinux.0";
222 }
223
224 host hydra{
225 hardware ethernet 00:01:03:1E:08:FC;
226 fixed-address 192.168.1.187;
227 option host-name "hydra";
228 DDNS-hostname "hydra";
229 option PXE.mtftp-ip 0.0.0.0;
230 filename "pxelinux.0";
231 }
232
233 host slim{
234 # slimline pentium4's hardware addr
235 # hardware ethernet 00:E0:81:60:DF:69;
236 #
237 # hardware ethernet 00:03:47:7d:33:d8;
238 hardware ethernet 00:03:47:A3:99:C8;
239 fixed-address 192.168.1.86;
240 option host-name "slim";
241 DDNS-hostname "slim";
242 option PXE.mtftp-ip 192.168.10.1;
243 filename "pxelinux.0";
244 }
245
246 host pascal{
247 hardware ethernet 00:50:70:56:2E:CA;
248 fixed-address 192.168.1.100;
249 option host-name "pascal";
250 DDNS-hostname "pascal";
251 }
252
253 host plato{
254 hardware ethernet 00:11:D8:BC:6C:DF;
255 fixed-address 192.168.1.79;
256 option host-name "plato";
257 DDNS-hostname "plato";
258 }
259
260 #host loki{
261 # hardware ethernet 00:03:47:7d:33:d8;
262 # fixed-address 192.168.1.201;
263 # option host-name "loki";
264 # DDNS-hostname "loki";
265 # option PXE.mtftp-ip 192.168.10.1;
266 # filename "pxelinux.0";
267 #
268 #}
269 host diathlon{
270 hardware ethernet 00:50:04:0B:F9:C3;
271 fixed-address 192.168.1.185;
272 option host-name "diathlon";
273 DDNS-hostname "diathlon";
274 }
275
276 } # end of spore subnet.
277
278
279 /*===================================================================
280 END dhcpd.conf from spore.ath.cx END
281 ===================================================================*/
282
283 If you still have problems, better let us know.
284
285 Good luck!

Attachments

File name MIME type
dhcpd.conf application/octet-stream

Replies

Subject Author
Re: [gentoo-user] diskless booting Roger Mason <rmason@×××××××.ca>