Merge branch 'vendor/DHCPCD'
[dragonfly.git] / share / examples / diskless / ME
1 IMPORTANT NOTE:
2
3 For quite some time
4 the /etc/rc.d/{initdiskless,diskless} scripts support a slightly different
5 diskless boot process than the one documented in the rest of this file.
6
7 I am not deleting the information below because it contains some
8 useful background information on diskless operation, but for the
9 actual details you should look at diskless(8), /etc/rc.d/initdiskless,
10 /etc/rc.d/diskless,
11 and the /usr/share/examples/diskless/clone_root script which can
12 be useful to set up clients and server for diskless boot.
13
14 --- $FreeBSD: src/share/examples/diskless/ME,v 1.3.4.1 2002/03/15 06:52:38 luigi Exp $ ---
15 --- $DragonFly: src/share/examples/diskless/ME,v 1.3 2008/07/08 12:08:29 thomas Exp $ ---
16 ------------------------------------------------------------------------
17
18 When templating, /conf/ME is typically a softlink to
19 /conf/<appropriate-machine>.  When doing a diskless boot, /conf/ME is
20 retargeted by /etc/rc.diskless1 from pointing to the server to pointing
21 to the client's directory, /conf/<ip-address-of-client>.  The retargeting
22 is accomplished through an MFS -o union mount.
23
24 When templating, this softlink should be different for each machine.
25 When doing a diskless boot, this softlink is typically part of the / NFS
26 mount from the server and points to the server's conf directory, but gets
27 retargeted during the /etc/rc.diskless1 phase.
28
29 System-wide configuration files must generally be targeted through /conf/ME.
30 For example, your /etc/rc.conf.local should become a softlink to
31 /conf/ME/rc.conf.local and your real rc.conf.local should go into the 
32 appropriate /conf/<appropriate-machine> directory.  This is also true of
33 /etc/rc.local, /etc/fstab, /etc/syslog.conf, /etc/ccd.conf, /etc/ipfw.conf,
34 /etc/motd, /etc/resolv.conf, and possibly even /etc/ttys ( if you want
35 to start an X session up on boot on certain of your machines ).
36
37 When templating, you duplicate your / and /usr partitions on each machine's
38 local disk from a single master ( assuming /var and /home reside elsewhere ),
39 EXCEPT for the /conf/ME softlink.  The /conf/ME softlink is the only thing
40 on / that should be different for each machine.
41
42 There are often categories of configuration files.  For example, all of your
43 shell machines may use one resolv.conf while all of your mail proxies may
44 use another.  Configuration files can be categorized fairly easily through
45 /conf/HT.<category> directories.  You put the actual configuration file in
46 /conf/HT.<category> and make a softlink from
47 /conf/ME/<appropriate-machines>/config-file to "../HT.<category/config-file".
48 This means that access to these files tends to run through more then one
49 softlink.  The advantage is that for all the complexity of your /conf
50 directory hierarchy, most of your common config files exist in only one place
51 in reality.
52
53