1.t (afe61c15161c324a7af299a9b8457aba5afc92db) 1.t (b3bfc7199eb51b03496567ea71bff82b75a2209d)
1.\" Copyright (c) 1993
2.\" The Regents of the University of California. All rights reserved.
3.\"
4.\" This document is derived from software contributed to Berkeley by
5.\" Rick Macklem at The University of Guelph.
6.\"
7.\" Redistribution and use in source and binary forms, with or without
8.\" modification, are permitted provided that the following conditions

--- 498 unchanged lines hidden (view full) ---

507\**Unfortunately, a monitoring tool that uses these logs is still in the
508planning (dreaming) stage.
509.)f
510.sh 1 "Diskless Client Support"
511.pp
512The NFS client does include kernel support for diskless/dataless operation
513where the root file system and optionally the swap area is remote NFS mounted.
514A diskless/dataless client is configured using a version of the
1.\" Copyright (c) 1993
2.\" The Regents of the University of California. All rights reserved.
3.\"
4.\" This document is derived from software contributed to Berkeley by
5.\" Rick Macklem at The University of Guelph.
6.\"
7.\" Redistribution and use in source and binary forms, with or without
8.\" modification, are permitted provided that the following conditions

--- 498 unchanged lines hidden (view full) ---

507\**Unfortunately, a monitoring tool that uses these logs is still in the
508planning (dreaming) stage.
509.)f
510.sh 1 "Diskless Client Support"
511.pp
512The NFS client does include kernel support for diskless/dataless operation
513where the root file system and optionally the swap area is remote NFS mounted.
514A diskless/dataless client is configured using a version of the
515``swapvmunix.c'' file as provided in the directory \fIcontrib/diskless.nfs\fR.
515``swapkernel.c'' file as provided in the directory \fIcontrib/diskless.nfs\fR.
516If the swap device == NODEV, it specifies an NFS mounted swap area and should
517be configured the same size as set up by diskless_setup when run on the server.
518This file must be put in the \fIsys/compile/<machine_name>\fR kernel build
519directory after the config command has been run, since config does
520not know about specifying NFS root and swap areas.
521The kernel variable mountroot must be set to nfs_mountroot instead of
522ffs_mountroot and the kernel structure nfs_diskless must be filled in
523properly.
524There are some primitive system administration tools in the \fIcontrib/diskless.nfs\fR directory to assist in filling in
525the nfs_diskless structure and in setting up an NFS server for
526diskless/dataless clients.
527The tools were designed to provide a bare bones capability, to allow maximum
528flexibility when setting up different servers.
529.lp
530The tools are as follows:
531.ip \(bu
516If the swap device == NODEV, it specifies an NFS mounted swap area and should
517be configured the same size as set up by diskless_setup when run on the server.
518This file must be put in the \fIsys/compile/<machine_name>\fR kernel build
519directory after the config command has been run, since config does
520not know about specifying NFS root and swap areas.
521The kernel variable mountroot must be set to nfs_mountroot instead of
522ffs_mountroot and the kernel structure nfs_diskless must be filled in
523properly.
524There are some primitive system administration tools in the \fIcontrib/diskless.nfs\fR directory to assist in filling in
525the nfs_diskless structure and in setting up an NFS server for
526diskless/dataless clients.
527The tools were designed to provide a bare bones capability, to allow maximum
528flexibility when setting up different servers.
529.lp
530The tools are as follows:
531.ip \(bu
532diskless_offset.c - This little program reads a ``vmunix'' object file and
532diskless_offset.c - This little program reads a ``kernel'' object file and
533writes the file byte offset of the nfs_diskless structure in it to
534standard out. It was kept separate because it sometimes has to
535be compiled/linked in funny ways depending on the client architecture.
536(See the comment at the beginning of it.)
537.ip \(bu
538diskless_setup.c - This program is run on the server and sets up files for a
539given client. It mostly just fills in an nfs_diskless structure and
533writes the file byte offset of the nfs_diskless structure in it to
534standard out. It was kept separate because it sometimes has to
535be compiled/linked in funny ways depending on the client architecture.
536(See the comment at the beginning of it.)
537.ip \(bu
538diskless_setup.c - This program is run on the server and sets up files for a
539given client. It mostly just fills in an nfs_diskless structure and
540writes it out to either the "vmunix" file or a separate file called
540writes it out to either the "kernel" file or a separate file called
541/var/diskless/setup.<official-hostname>
542.ip \(bu
543diskless_boot.c - There are two functions in here that may be used
541/var/diskless/setup.<official-hostname>
542.ip \(bu
543diskless_boot.c - There are two functions in here that may be used
544by a bootstrap server such as tftpd to permit sharing of the ``vmunix''
544by a bootstrap server such as tftpd to permit sharing of the ``kernel''
545object file for similar clients. This saves disk space on the bootstrap
546server and simplify organization, but are not critical for correct operation.
545object file for similar clients. This saves disk space on the bootstrap
546server and simplify organization, but are not critical for correct operation.
547They read the ``vmunix''
547They read the ``kernel''
548file, but optionally fill in the nfs_diskless structure from a
549separate "setup.<official-hostname>" file so that there is only
548file, but optionally fill in the nfs_diskless structure from a
549separate "setup.<official-hostname>" file so that there is only
550one copy of "vmunix" for all similar (same arch etc.) clients.
550one copy of "kernel" for all similar (same arch etc.) clients.
551These functions use a text file called
552/var/diskless/boot.<official-hostname> to control the netboot.
553.lp
554The basic setup steps are:
555.ip \(bu
551These functions use a text file called
552/var/diskless/boot.<official-hostname> to control the netboot.
553.lp
554The basic setup steps are:
555.ip \(bu
556make a "vmunix" for the client(s) with mountroot() == nfs_mountroot()
556make a "kernel" for the client(s) with mountroot() == nfs_mountroot()
557and swdevt[0].sw_dev == NODEV if it is to do nfs swapping as well
557and swdevt[0].sw_dev == NODEV if it is to do nfs swapping as well
558(See the same swapvmunix.c file)
558(See the same swapkernel.c file)
559.ip \(bu
559.ip \(bu
560run diskless_offset on the vmunix file to find out the byte offset
560run diskless_offset on the kernel file to find out the byte offset
561of the nfs_diskless structure
562.ip \(bu
563Run diskless_setup on the server to set up the server and fill in the
564nfs_diskless structure for that client.
565The nfs_diskless structure can either be written into the
561of the nfs_diskless structure
562.ip \(bu
563Run diskless_setup on the server to set up the server and fill in the
564nfs_diskless structure for that client.
565The nfs_diskless structure can either be written into the
566vmunix file (the -x option) or
566kernel file (the -x option) or
567saved in /var/diskless/setup.<official-hostname>.
568.ip \(bu
569Set up the bootstrap server. If the nfs_diskless structure was written into
567saved in /var/diskless/setup.<official-hostname>.
568.ip \(bu
569Set up the bootstrap server. If the nfs_diskless structure was written into
570the ``vmunix'' file, any vanilla bootstrap protocol such as bootp/tftp can
570the ``kernel'' file, any vanilla bootstrap protocol such as bootp/tftp can
571be used. If the bootstrap server has been modified to use the functions in
572diskless_boot.c, then a
573file called /var/diskless/boot.<official-hostname>
574must be created.
575It is simply a two line text file, where the first line is the pathname
571be used. If the bootstrap server has been modified to use the functions in
572diskless_boot.c, then a
573file called /var/diskless/boot.<official-hostname>
574must be created.
575It is simply a two line text file, where the first line is the pathname
576of the correct ``vmunix'' file and the second line has the pathname of
576of the correct ``kernel'' file and the second line has the pathname of
577the nfs_diskless structure file and its byte offset in it.
578For example:
579.br
577the nfs_diskless structure file and its byte offset in it.
578For example:
579.br
580 /var/diskless/vmunix.pmax
580 /var/diskless/kernel.pmax
581.br
582 /var/diskless/setup.rickers.cis.uoguelph.ca 642308
583.br
584.ip \(bu
585Create a /var subtree for each client in an appropriate place on the server,
586such as /var/diskless/var/<client-hostname>/...
587By using the <client-hostname> to differentiate /var for each host,
588/etc/rc can be modified to mount the correct /var from the server.
581.br
582 /var/diskless/setup.rickers.cis.uoguelph.ca 642308
583.br
584.ip \(bu
585Create a /var subtree for each client in an appropriate place on the server,
586such as /var/diskless/var/<client-hostname>/...
587By using the <client-hostname> to differentiate /var for each host,
588/etc/rc can be modified to mount the correct /var from the server.