nfs_diskless.c revision 1.1 1 1.1 dholland /* $NetBSD: nfs_diskless.c,v 1.1 2013/09/30 07:19:32 dholland Exp $ */
2 1.1 dholland /*-
3 1.1 dholland * Copyright (c) 1990 The Regents of the University of California.
4 1.1 dholland * All rights reserved.
5 1.1 dholland *
6 1.1 dholland * This code is derived from software contributed to Berkeley by
7 1.1 dholland * William Jolitz.
8 1.1 dholland *
9 1.1 dholland * Redistribution and use in source and binary forms, with or without
10 1.1 dholland * modification, are permitted provided that the following conditions
11 1.1 dholland * are met:
12 1.1 dholland * 1. Redistributions of source code must retain the above copyright
13 1.1 dholland * notice, this list of conditions and the following disclaimer.
14 1.1 dholland * 2. Redistributions in binary form must reproduce the above copyright
15 1.1 dholland * notice, this list of conditions and the following disclaimer in the
16 1.1 dholland * documentation and/or other materials provided with the distribution.
17 1.1 dholland * 4. Neither the name of the University nor the names of its contributors
18 1.1 dholland * may be used to endorse or promote products derived from this software
19 1.1 dholland * without specific prior written permission.
20 1.1 dholland *
21 1.1 dholland * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
22 1.1 dholland * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 1.1 dholland * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 1.1 dholland * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
25 1.1 dholland * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 1.1 dholland * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 1.1 dholland * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 1.1 dholland * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 1.1 dholland * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 1.1 dholland * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 1.1 dholland * SUCH DAMAGE.
32 1.1 dholland *
33 1.1 dholland * from: @(#)autoconf.c 7.1 (Berkeley) 5/9/91
34 1.1 dholland */
35 1.1 dholland
36 1.1 dholland #include <sys/cdefs.h>
37 1.1 dholland /* __FBSDID("FreeBSD: head/sys/nfs/nfs_diskless.c 221436 2011-05-04 13:27:45Z ru "); */
38 1.1 dholland __RCSID("$NetBSD: nfs_diskless.c,v 1.1 2013/09/30 07:19:32 dholland Exp $");
39 1.1 dholland
40 1.1 dholland #include "opt_bootp.h"
41 1.1 dholland
42 1.1 dholland #include <sys/param.h>
43 1.1 dholland #include <sys/systm.h>
44 1.1 dholland #include <sys/jail.h>
45 1.1 dholland #include <sys/kernel.h>
46 1.1 dholland #include <sys/malloc.h>
47 1.1 dholland #include <sys/mount.h>
48 1.1 dholland #include <sys/socket.h>
49 1.1 dholland
50 1.1 dholland #include <net/if.h>
51 1.1 dholland #include <net/if_dl.h>
52 1.1 dholland #include <net/if_types.h>
53 1.1 dholland #include <net/if_var.h>
54 1.1 dholland #include <net/ethernet.h>
55 1.1 dholland #include <net/vnet.h>
56 1.1 dholland
57 1.1 dholland #include <netinet/in.h>
58 1.1 dholland #include <nfs/nfsproto.h>
59 1.1 dholland #include <nfsclient/nfs.h>
60 1.1 dholland #include <nfs/nfsdiskless.h>
61 1.1 dholland
62 1.1 dholland static int inaddr_to_sockaddr(char *ev, struct sockaddr_in *sa);
63 1.1 dholland static int hwaddr_to_sockaddr(char *ev, struct sockaddr_dl *sa);
64 1.1 dholland static int decode_nfshandle(char *ev, u_char *fh, int maxfh);
65 1.1 dholland
66 1.1 dholland /*
67 1.1 dholland * This structure must be filled in by a primary bootstrap or bootstrap
68 1.1 dholland * server for a diskless/dataless machine. It is initialized below just
69 1.1 dholland * to ensure that it is allocated to initialized data (.data not .bss).
70 1.1 dholland */
71 1.1 dholland struct nfs_diskless nfs_diskless = { { { 0 } } };
72 1.1 dholland struct nfsv3_diskless nfsv3_diskless = { { { 0 } } };
73 1.1 dholland int nfs_diskless_valid = 0;
74 1.1 dholland
75 1.1 dholland /*
76 1.1 dholland * Validate/sanity check a rsize/wsize parameter.
77 1.1 dholland */
78 1.1 dholland static int
79 1.1 dholland checkrwsize(unsigned long v, const char *name)
80 1.1 dholland {
81 1.1 dholland /*
82 1.1 dholland * 32K is used as an upper bound because most servers
83 1.1 dholland * limit block size to satisfy IPv4's limit of
84 1.1 dholland * 64K/reassembled packet. The lower bound is pretty
85 1.1 dholland * much arbitrary.
86 1.1 dholland */
87 1.1 dholland if (!(4 <= v && v <= 32*1024)) {
88 1.1 dholland printf("nfs_parse_options: invalid %s %lu ignored\n", name, v);
89 1.1 dholland return 0;
90 1.1 dholland } else
91 1.1 dholland return 1;
92 1.1 dholland }
93 1.1 dholland
94 1.1 dholland /*
95 1.1 dholland * Parse mount options and apply them to the supplied
96 1.1 dholland * nfs_diskless state. Used also by bootp/dhcp support.
97 1.1 dholland */
98 1.1 dholland void
99 1.1 dholland nfs_parse_options(const char *envopts, struct nfs_args *nd)
100 1.1 dholland {
101 1.1 dholland char *opts, *o, *otmp;
102 1.1 dholland unsigned long v;
103 1.1 dholland
104 1.1 dholland opts = strdup(envopts, M_TEMP);
105 1.1 dholland otmp = opts;
106 1.1 dholland while ((o = strsep(&otmp, ":;, ")) != NULL) {
107 1.1 dholland if (*o == '\0')
108 1.1 dholland ; /* Skip empty options. */
109 1.1 dholland else if (strcmp(o, "soft") == 0)
110 1.1 dholland nd->flags |= NFSMNT_SOFT;
111 1.1 dholland else if (strcmp(o, "intr") == 0)
112 1.1 dholland nd->flags |= NFSMNT_INT;
113 1.1 dholland else if (strcmp(o, "conn") == 0)
114 1.1 dholland nd->flags |= NFSMNT_NOCONN;
115 1.1 dholland else if (strcmp(o, "nolockd") == 0)
116 1.1 dholland nd->flags |= NFSMNT_NOLOCKD;
117 1.1 dholland else if (strcmp(o, "nocto") == 0)
118 1.1 dholland nd->flags |= NFSMNT_NOCTO;
119 1.1 dholland else if (strcmp(o, "nfsv2") == 0)
120 1.1 dholland nd->flags &= ~(NFSMNT_NFSV3 | NFSMNT_NFSV4);
121 1.1 dholland else if (strcmp(o, "nfsv3") == 0) {
122 1.1 dholland nd->flags &= ~NFSMNT_NFSV4;
123 1.1 dholland nd->flags |= NFSMNT_NFSV3;
124 1.1 dholland } else if (strcmp(o, "tcp") == 0)
125 1.1 dholland nd->sotype = SOCK_STREAM;
126 1.1 dholland else if (strcmp(o, "udp") == 0)
127 1.1 dholland nd->sotype = SOCK_DGRAM;
128 1.1 dholland else if (strncmp(o, "rsize=", 6) == 0) {
129 1.1 dholland v = strtoul(o+6, NULL, 10);
130 1.1 dholland if (checkrwsize(v, "rsize")) {
131 1.1 dholland nd->rsize = (int) v;
132 1.1 dholland nd->flags |= NFSMNT_RSIZE;
133 1.1 dholland }
134 1.1 dholland } else if (strncmp(o, "wsize=", 6) == 0) {
135 1.1 dholland v = strtoul(o+6, NULL, 10);
136 1.1 dholland if (checkrwsize(v, "wsize")) {
137 1.1 dholland nd->wsize = (int) v;
138 1.1 dholland nd->flags |= NFSMNT_WSIZE;
139 1.1 dholland }
140 1.1 dholland } else
141 1.1 dholland printf("%s: skipping unknown option \"%s\"\n",
142 1.1 dholland __func__, o);
143 1.1 dholland }
144 1.1 dholland free(opts, M_TEMP);
145 1.1 dholland }
146 1.1 dholland
147 1.1 dholland /*
148 1.1 dholland * Populate the essential fields in the nfsv3_diskless structure.
149 1.1 dholland *
150 1.1 dholland * The loader is expected to export the following environment variables:
151 1.1 dholland *
152 1.1 dholland * boot.netif.name name of boot interface
153 1.1 dholland * boot.netif.ip IP address on boot interface
154 1.1 dholland * boot.netif.netmask netmask on boot interface
155 1.1 dholland * boot.netif.gateway default gateway (optional)
156 1.1 dholland * boot.netif.hwaddr hardware address of boot interface
157 1.1 dholland * boot.nfsroot.server IP address of root filesystem server
158 1.1 dholland * boot.nfsroot.path path of the root filesystem on server
159 1.1 dholland * boot.nfsroot.nfshandle NFS handle for root filesystem on server
160 1.1 dholland * boot.nfsroot.nfshandlelen and length of this handle (for NFSv3 only)
161 1.1 dholland * boot.nfsroot.options NFS options for the root filesystem
162 1.1 dholland */
163 1.1 dholland void
164 1.1 dholland nfs_setup_diskless(void)
165 1.1 dholland {
166 1.1 dholland struct nfs_diskless *nd = &nfs_diskless;
167 1.1 dholland struct nfsv3_diskless *nd3 = &nfsv3_diskless;
168 1.1 dholland struct ifnet *ifp;
169 1.1 dholland struct ifaddr *ifa;
170 1.1 dholland struct sockaddr_dl *sdl, ourdl;
171 1.1 dholland struct sockaddr_in myaddr, netmask;
172 1.1 dholland char *cp;
173 1.1 dholland int cnt, fhlen, is_nfsv3;
174 1.1 dholland uint32_t len;
175 1.1 dholland
176 1.1 dholland if (nfs_diskless_valid != 0)
177 1.1 dholland return;
178 1.1 dholland
179 1.1 dholland /* get handle size. If this succeeds, it's an NFSv3 setup. */
180 1.1 dholland if ((cp = getenv("boot.nfsroot.nfshandlelen")) != NULL) {
181 1.1 dholland cnt = sscanf(cp, "%d", &len);
182 1.1 dholland freeenv(cp);
183 1.1 dholland if (cnt != 1 || len == 0 || len > NFSX_V3FHMAX) {
184 1.1 dholland printf("nfs_diskless: bad NFS handle len\n");
185 1.1 dholland return;
186 1.1 dholland }
187 1.1 dholland nd3->root_fhsize = len;
188 1.1 dholland is_nfsv3 = 1;
189 1.1 dholland } else
190 1.1 dholland is_nfsv3 = 0;
191 1.1 dholland /* set up interface */
192 1.1 dholland if (inaddr_to_sockaddr("boot.netif.ip", &myaddr))
193 1.1 dholland return;
194 1.1 dholland if (inaddr_to_sockaddr("boot.netif.netmask", &netmask)) {
195 1.1 dholland printf("nfs_diskless: no netmask\n");
196 1.1 dholland return;
197 1.1 dholland }
198 1.1 dholland if (is_nfsv3 != 0) {
199 1.1 dholland bcopy(&myaddr, &nd3->myif.ifra_addr, sizeof(myaddr));
200 1.1 dholland bcopy(&myaddr, &nd3->myif.ifra_broadaddr, sizeof(myaddr));
201 1.1 dholland ((struct sockaddr_in *)
202 1.1 dholland &nd3->myif.ifra_broadaddr)->sin_addr.s_addr =
203 1.1 dholland myaddr.sin_addr.s_addr | ~ netmask.sin_addr.s_addr;
204 1.1 dholland bcopy(&netmask, &nd3->myif.ifra_mask, sizeof(netmask));
205 1.1 dholland } else {
206 1.1 dholland bcopy(&myaddr, &nd->myif.ifra_addr, sizeof(myaddr));
207 1.1 dholland bcopy(&myaddr, &nd->myif.ifra_broadaddr, sizeof(myaddr));
208 1.1 dholland ((struct sockaddr_in *)
209 1.1 dholland &nd->myif.ifra_broadaddr)->sin_addr.s_addr =
210 1.1 dholland myaddr.sin_addr.s_addr | ~ netmask.sin_addr.s_addr;
211 1.1 dholland bcopy(&netmask, &nd->myif.ifra_mask, sizeof(netmask));
212 1.1 dholland }
213 1.1 dholland
214 1.1 dholland if (hwaddr_to_sockaddr("boot.netif.hwaddr", &ourdl)) {
215 1.1 dholland printf("nfs_diskless: no hardware address\n");
216 1.1 dholland return;
217 1.1 dholland }
218 1.1 dholland ifa = NULL;
219 1.1 dholland CURVNET_SET(TD_TO_VNET(curthread));
220 1.1 dholland IFNET_RLOCK();
221 1.1 dholland TAILQ_FOREACH(ifp, &V_ifnet, if_link) {
222 1.1 dholland TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) {
223 1.1 dholland if (ifa->ifa_addr->sa_family == AF_LINK) {
224 1.1 dholland sdl = (struct sockaddr_dl *)ifa->ifa_addr;
225 1.1 dholland if ((sdl->sdl_type == ourdl.sdl_type) &&
226 1.1 dholland (sdl->sdl_alen == ourdl.sdl_alen) &&
227 1.1 dholland !bcmp(LLADDR(sdl),
228 1.1 dholland LLADDR(&ourdl),
229 1.1 dholland sdl->sdl_alen)) {
230 1.1 dholland IFNET_RUNLOCK();
231 1.1 dholland CURVNET_RESTORE();
232 1.1 dholland goto match_done;
233 1.1 dholland }
234 1.1 dholland }
235 1.1 dholland }
236 1.1 dholland }
237 1.1 dholland IFNET_RUNLOCK();
238 1.1 dholland CURVNET_RESTORE();
239 1.1 dholland printf("nfs_diskless: no interface\n");
240 1.1 dholland return; /* no matching interface */
241 1.1 dholland match_done:
242 1.1 dholland setenv("boot.netif.name", ifp->if_xname);
243 1.1 dholland if (is_nfsv3 != 0) {
244 1.1 dholland strlcpy(nd3->myif.ifra_name, ifp->if_xname,
245 1.1 dholland sizeof(nd3->myif.ifra_name));
246 1.1 dholland
247 1.1 dholland /* set up gateway */
248 1.1 dholland inaddr_to_sockaddr("boot.netif.gateway", &nd3->mygateway);
249 1.1 dholland
250 1.1 dholland /* set up root mount */
251 1.1 dholland nd3->root_args.rsize = 32768; /* XXX tunable? */
252 1.1 dholland nd3->root_args.wsize = 32768;
253 1.1 dholland nd3->root_args.sotype = SOCK_STREAM;
254 1.1 dholland nd3->root_args.flags = (NFSMNT_NFSV3 | NFSMNT_WSIZE |
255 1.1 dholland NFSMNT_RSIZE | NFSMNT_RESVPORT);
256 1.1 dholland if (inaddr_to_sockaddr("boot.nfsroot.server",
257 1.1 dholland &nd3->root_saddr)) {
258 1.1 dholland printf("nfs_diskless: no server\n");
259 1.1 dholland return;
260 1.1 dholland }
261 1.1 dholland nd3->root_saddr.sin_port = htons(NFS_PORT);
262 1.1 dholland fhlen = decode_nfshandle("boot.nfsroot.nfshandle",
263 1.1 dholland &nd3->root_fh[0], NFSX_V3FHMAX);
264 1.1 dholland if (fhlen == 0) {
265 1.1 dholland printf("nfs_diskless: no NFS handle\n");
266 1.1 dholland return;
267 1.1 dholland }
268 1.1 dholland if (fhlen != nd3->root_fhsize) {
269 1.1 dholland printf("nfs_diskless: bad NFS handle len=%d\n", fhlen);
270 1.1 dholland return;
271 1.1 dholland }
272 1.1 dholland if ((cp = getenv("boot.nfsroot.path")) != NULL) {
273 1.1 dholland strncpy(nd3->root_hostnam, cp, MNAMELEN - 1);
274 1.1 dholland freeenv(cp);
275 1.1 dholland }
276 1.1 dholland if ((cp = getenv("boot.nfsroot.options")) != NULL) {
277 1.1 dholland nfs_parse_options(cp, &nd3->root_args);
278 1.1 dholland freeenv(cp);
279 1.1 dholland }
280 1.1 dholland
281 1.1 dholland nfs_diskless_valid = 3;
282 1.1 dholland } else {
283 1.1 dholland strlcpy(nd->myif.ifra_name, ifp->if_xname,
284 1.1 dholland sizeof(nd->myif.ifra_name));
285 1.1 dholland
286 1.1 dholland /* set up gateway */
287 1.1 dholland inaddr_to_sockaddr("boot.netif.gateway", &nd->mygateway);
288 1.1 dholland
289 1.1 dholland /* set up root mount */
290 1.1 dholland nd->root_args.rsize = 8192; /* XXX tunable? */
291 1.1 dholland nd->root_args.wsize = 8192;
292 1.1 dholland nd->root_args.sotype = SOCK_STREAM;
293 1.1 dholland nd->root_args.flags = (NFSMNT_WSIZE |
294 1.1 dholland NFSMNT_RSIZE | NFSMNT_RESVPORT);
295 1.1 dholland if (inaddr_to_sockaddr("boot.nfsroot.server",
296 1.1 dholland &nd->root_saddr)) {
297 1.1 dholland printf("nfs_diskless: no server\n");
298 1.1 dholland return;
299 1.1 dholland }
300 1.1 dholland nd->root_saddr.sin_port = htons(NFS_PORT);
301 1.1 dholland if (decode_nfshandle("boot.nfsroot.nfshandle",
302 1.1 dholland &nd->root_fh[0], NFSX_V2FH) == 0) {
303 1.1 dholland printf("nfs_diskless: no NFS handle\n");
304 1.1 dholland return;
305 1.1 dholland }
306 1.1 dholland if ((cp = getenv("boot.nfsroot.path")) != NULL) {
307 1.1 dholland strncpy(nd->root_hostnam, cp, MNAMELEN - 1);
308 1.1 dholland freeenv(cp);
309 1.1 dholland }
310 1.1 dholland if ((cp = getenv("boot.nfsroot.options")) != NULL) {
311 1.1 dholland struct nfs_args args;
312 1.1 dholland
313 1.1 dholland /*
314 1.1 dholland * XXX yech, convert between old and current
315 1.1 dholland * arg format
316 1.1 dholland */
317 1.1 dholland args.flags = nd->root_args.flags;
318 1.1 dholland args.sotype = nd->root_args.sotype;
319 1.1 dholland args.rsize = nd->root_args.rsize;
320 1.1 dholland args.wsize = nd->root_args.wsize;
321 1.1 dholland nfs_parse_options(cp, &args);
322 1.1 dholland nd->root_args.flags = args.flags;
323 1.1 dholland nd->root_args.sotype = args.sotype;
324 1.1 dholland nd->root_args.rsize = args.rsize;
325 1.1 dholland nd->root_args.wsize = args.wsize;
326 1.1 dholland freeenv(cp);
327 1.1 dholland }
328 1.1 dholland
329 1.1 dholland nfs_diskless_valid = 1;
330 1.1 dholland }
331 1.1 dholland }
332 1.1 dholland
333 1.1 dholland static int
334 1.1 dholland inaddr_to_sockaddr(char *ev, struct sockaddr_in *sa)
335 1.1 dholland {
336 1.1 dholland u_int32_t a[4];
337 1.1 dholland char *cp;
338 1.1 dholland int count;
339 1.1 dholland
340 1.1 dholland bzero(sa, sizeof(*sa));
341 1.1 dholland sa->sin_len = sizeof(*sa);
342 1.1 dholland sa->sin_family = AF_INET;
343 1.1 dholland
344 1.1 dholland if ((cp = getenv(ev)) == NULL)
345 1.1 dholland return (1);
346 1.1 dholland count = sscanf(cp, "%d.%d.%d.%d", &a[0], &a[1], &a[2], &a[3]);
347 1.1 dholland freeenv(cp);
348 1.1 dholland if (count != 4)
349 1.1 dholland return (1);
350 1.1 dholland sa->sin_addr.s_addr =
351 1.1 dholland htonl((a[0] << 24) | (a[1] << 16) | (a[2] << 8) | a[3]);
352 1.1 dholland return (0);
353 1.1 dholland }
354 1.1 dholland
355 1.1 dholland static int
356 1.1 dholland hwaddr_to_sockaddr(char *ev, struct sockaddr_dl *sa)
357 1.1 dholland {
358 1.1 dholland char *cp;
359 1.1 dholland u_int32_t a[6];
360 1.1 dholland int count;
361 1.1 dholland
362 1.1 dholland bzero(sa, sizeof(*sa));
363 1.1 dholland sa->sdl_len = sizeof(*sa);
364 1.1 dholland sa->sdl_family = AF_LINK;
365 1.1 dholland sa->sdl_type = IFT_ETHER;
366 1.1 dholland sa->sdl_alen = ETHER_ADDR_LEN;
367 1.1 dholland if ((cp = getenv(ev)) == NULL)
368 1.1 dholland return (1);
369 1.1 dholland count = sscanf(cp, "%x:%x:%x:%x:%x:%x",
370 1.1 dholland &a[0], &a[1], &a[2], &a[3], &a[4], &a[5]);
371 1.1 dholland freeenv(cp);
372 1.1 dholland if (count != 6)
373 1.1 dholland return (1);
374 1.1 dholland sa->sdl_data[0] = a[0];
375 1.1 dholland sa->sdl_data[1] = a[1];
376 1.1 dholland sa->sdl_data[2] = a[2];
377 1.1 dholland sa->sdl_data[3] = a[3];
378 1.1 dholland sa->sdl_data[4] = a[4];
379 1.1 dholland sa->sdl_data[5] = a[5];
380 1.1 dholland return (0);
381 1.1 dholland }
382 1.1 dholland
383 1.1 dholland static int
384 1.1 dholland decode_nfshandle(char *ev, u_char *fh, int maxfh)
385 1.1 dholland {
386 1.1 dholland u_char *cp, *ep;
387 1.1 dholland int len, val;
388 1.1 dholland
389 1.1 dholland ep = cp = getenv(ev);
390 1.1 dholland if (cp == NULL)
391 1.1 dholland return (0);
392 1.1 dholland if ((strlen(cp) < 2) || (*cp != 'X')) {
393 1.1 dholland freeenv(ep);
394 1.1 dholland return (0);
395 1.1 dholland }
396 1.1 dholland len = 0;
397 1.1 dholland cp++;
398 1.1 dholland for (;;) {
399 1.1 dholland if (*cp == 'X') {
400 1.1 dholland freeenv(ep);
401 1.1 dholland return (len);
402 1.1 dholland }
403 1.1 dholland if ((sscanf(cp, "%2x", &val) != 1) || (val > 0xff)) {
404 1.1 dholland freeenv(ep);
405 1.1 dholland return (0);
406 1.1 dholland }
407 1.1 dholland *(fh++) = val;
408 1.1 dholland len++;
409 1.1 dholland cp += 2;
410 1.1 dholland if (len > maxfh) {
411 1.1 dholland freeenv(ep);
412 1.1 dholland return (0);
413 1.1 dholland }
414 1.1 dholland }
415 1.1 dholland }
416 1.1 dholland
417 1.1 dholland #if !defined(BOOTP_NFSROOT)
418 1.1 dholland static void
419 1.1 dholland nfs_rootconf(void)
420 1.1 dholland {
421 1.1 dholland
422 1.1 dholland nfs_setup_diskless();
423 1.1 dholland if (nfs_diskless_valid)
424 1.1 dholland rootdevnames[0] = "nfs:";
425 1.1 dholland }
426 1.1 dholland
427 1.1 dholland SYSINIT(cpu_rootconf, SI_SUB_ROOT_CONF, SI_ORDER_FIRST, nfs_rootconf, NULL);
428 1.1 dholland #endif
429 1.1 dholland
430