xref: /freebsd-13.1/share/examples/diskless/ME (revision 902e5bd1)
1*902e5bd1SLuigi RizzoIMPORTANT NOTE:
2*902e5bd1SLuigi Rizzo
3*902e5bd1SLuigi RizzoAs of Feb. 11, 2002 (and indeed, for quite some time before that),
4*902e5bd1SLuigi Rizzothe /etc/rc.diskless{1,2} scripts support a slightly different
5*902e5bd1SLuigi Rizzodiskless boot process than the one documented in the rest of
6*902e5bd1SLuigi Rizzothis file (which is 3 years old).
7*902e5bd1SLuigi Rizzo
8*902e5bd1SLuigi RizzoI am not deleting the information below because it contains some
9*902e5bd1SLuigi Rizzouseful background information on diskless operation, but for the
10*902e5bd1SLuigi Rizzoactual details you should look at /etc/rc.diskless1, /etc/rc.diskless2,
11*902e5bd1SLuigi Rizzoand the /usr/share/examples/diskless/clone_root script which can
12*902e5bd1SLuigi Rizzobe useful to set up clients and server for diskless boot.
13*902e5bd1SLuigi Rizzo
14*902e5bd1SLuigi Rizzo--- $FreeBSD$ ---
15*902e5bd1SLuigi Rizzo------------------------------------------------------------------------
163606882cSMatthew Dillon
17321bc15bSMatthew DillonWhen templating, /conf/ME is typically a softlink to
18321bc15bSMatthew Dillon/conf/<appropriate-machine>.  When doing a diskless boot, /conf/ME is
19321bc15bSMatthew Dillonretargeted by /etc/rc.diskless1 from pointing to the server to pointing
20321bc15bSMatthew Dillonto the client's directory, /conf/<ip-address-of-client>.  The retargeting
21321bc15bSMatthew Dillonis accomplished through an MFS -o union mount.
221bf6d2f8SMatthew Dillon
23321bc15bSMatthew DillonWhen templating, this softlink should be different for each machine.
24321bc15bSMatthew DillonWhen doing a diskless boot, this softlink is typically part of the / NFS
25321bc15bSMatthew Dillonmount from the server and points to the server's conf directory, but gets
26321bc15bSMatthew Dillonretargeted during the /etc/rc.diskless1 phase.
271bf6d2f8SMatthew Dillon
28321bc15bSMatthew DillonSystem-wide configuration files must generally be targeted through /conf/ME.
29321bc15bSMatthew DillonFor example, your /etc/rc.conf.local should become a softlink to
30321bc15bSMatthew Dillon/conf/ME/rc.conf.local and your real rc.conf.local should go into the
31321bc15bSMatthew Dillonappropriate /conf/<appropriate-machine> directory.  This is also true of
32321bc15bSMatthew Dillon/etc/rc.local, /etc/fstab, /etc/syslog.conf, /etc/ccd.conf, /etc/ipfw.conf,
33321bc15bSMatthew Dillon/etc/motd, /etc/resolv.conf, and possibly even /etc/ttys ( if you want
34321bc15bSMatthew Dillonto start an X session up on boot on certain of your machines ).
351bf6d2f8SMatthew Dillon
36321bc15bSMatthew DillonWhen templating, you duplicate your / and /usr partitions on each machine's
37321bc15bSMatthew Dillonlocal disk from a single master ( assuming /var and /home reside elsewhere ),
38321bc15bSMatthew DillonEXCEPT for the /conf/ME softlink.  The /conf/ME softlink is the only thing
39321bc15bSMatthew Dillonon / that should be different for each machine.
40321bc15bSMatthew Dillon
41321bc15bSMatthew DillonThere are often categories of configuration files.  For example, all of your
42321bc15bSMatthew Dillonshell machines may use one resolv.conf while all of your mail proxies may
43321bc15bSMatthew Dillonuse another.  Configuration files can be categorized fairly easily through
44321bc15bSMatthew Dillon/conf/HT.<category> directories.  You put the actual configuration file in
45321bc15bSMatthew Dillon/conf/HT.<category> and make a softlink from
46321bc15bSMatthew Dillon/conf/ME/<appropriate-machines>/config-file to "../HT.<category/config-file".
47321bc15bSMatthew DillonThis means that access to these files tends to run through more then one
48321bc15bSMatthew Dillonsoftlink.  The advantage is that for all the complexity of your /conf
49321bc15bSMatthew Dillondirectory hierarchy, most of your common config files exist in only one place
50321bc15bSMatthew Dillonin reality.
51321bc15bSMatthew Dillon
523606882cSMatthew Dillon
53