ME revision 92302
192302SluigiIMPORTANT NOTE: 243240Sdillon 392302SluigiAs of Feb. 11, 2002 (and indeed, for quite some time before that), 492302Sluigithe /etc/rc.diskless{1,2} scripts support a slightly different 592302Sluigidiskless boot process than the one documented in the rest of 692302Sluigithis file (which is 3 years old). 792302Sluigi 892302SluigiI am not deleting the information below because it contains some 992302Sluigiuseful background information on diskless operation, but for the 1092302Sluigiactual details you should look at /etc/rc.diskless1, /etc/rc.diskless2, 1192302Sluigiand the /usr/share/examples/diskless/clone_root script which can 1292302Sluigibe useful to set up clients and server for diskless boot. 1392302Sluigi 1492302Sluigi--- $FreeBSD: head/share/examples/diskless/ME 92302 2002-03-15 06:47:38Z luigi $ --- 1592302Sluigi------------------------------------------------------------------------ 1692302Sluigi 1743808SdillonWhen templating, /conf/ME is typically a softlink to 1843808Sdillon/conf/<appropriate-machine>. When doing a diskless boot, /conf/ME is 1943808Sdillonretargeted by /etc/rc.diskless1 from pointing to the server to pointing 2043808Sdillonto the client's directory, /conf/<ip-address-of-client>. The retargeting 2143808Sdillonis accomplished through an MFS -o union mount. 2243240Sdillon 2343808SdillonWhen templating, this softlink should be different for each machine. 2443808SdillonWhen doing a diskless boot, this softlink is typically part of the / NFS 2543808Sdillonmount from the server and points to the server's conf directory, but gets 2643808Sdillonretargeted during the /etc/rc.diskless1 phase. 2743247Sdillon 2843808SdillonSystem-wide configuration files must generally be targeted through /conf/ME. 2943808SdillonFor example, your /etc/rc.conf.local should become a softlink to 3043808Sdillon/conf/ME/rc.conf.local and your real rc.conf.local should go into the 3143808Sdillonappropriate /conf/<appropriate-machine> directory. This is also true of 3243808Sdillon/etc/rc.local, /etc/fstab, /etc/syslog.conf, /etc/ccd.conf, /etc/ipfw.conf, 3343808Sdillon/etc/motd, /etc/resolv.conf, and possibly even /etc/ttys ( if you want 3443808Sdillonto start an X session up on boot on certain of your machines ). 3543247Sdillon 3643808SdillonWhen templating, you duplicate your / and /usr partitions on each machine's 3743808Sdillonlocal disk from a single master ( assuming /var and /home reside elsewhere ), 3843808SdillonEXCEPT for the /conf/ME softlink. The /conf/ME softlink is the only thing 3943808Sdillonon / that should be different for each machine. 4043247Sdillon 4143808SdillonThere are often categories of configuration files. For example, all of your 4243808Sdillonshell machines may use one resolv.conf while all of your mail proxies may 4343808Sdillonuse another. Configuration files can be categorized fairly easily through 4443808Sdillon/conf/HT.<category> directories. You put the actual configuration file in 4543808Sdillon/conf/HT.<category> and make a softlink from 4643808Sdillon/conf/ME/<appropriate-machines>/config-file to "../HT.<category/config-file". 4743808SdillonThis means that access to these files tends to run through more then one 4843808Sdillonsoftlink. The advantage is that for all the complexity of your /conf 4943808Sdillondirectory hierarchy, most of your common config files exist in only one place 5043808Sdillonin reality. 5143808Sdillon 5243808Sdillon 53