dbe09c24013d6d58dfb87a48ba8138399b31db97
[hdw-linux/hdw-linux.git] / doc / FAI
1 # hdw - linux FAI file
2
3 whats this?
4 -----------
5 explains how to setup a networked computer acting as dhcp/pxeboot/nfsroot fully
6 automated installation server to automate installing your favorite hdw-linux
7 distribution.
8
9 files:
10 ------
11
12 ./scripts/Create-FAI
13 ./fai/*
14 ./doc/FAI
15
16 procedure
17 ---------
18
19         1) install mnimal nfsroot binaries
20
21                 vi Config [enter default as a target, specify arch*]
22
23         note: default target is enough. you dont need to specify fai-server.
24               we are just going to install the nfsroot which will automate
25               the install process. fai-server is actually the target you will
26               need as a running system to have pxeboot/nfsutils and stuff.
27
28         note: you might want to fetch hdw binaries from a mirror.
29               edit your /etc/hdw-get.conf file.
30
31                 ./scripts/Create-FAI <nfsroot>
32
33                 where <nfsroot> is the directory to install the fairoot.
34
35         2) edit the following files to match your needs, and restart services
36
37                 /etc/dhcpd.conf
38                 /etc/inetd.conf
39                 /etc/exports
40                 /tftpboot/pxelinux.cfg/{default,*}
41
42                 (have a look at chapter "fai server configuration")
43
44         note: again you might want to use a mirror. edit hdw-get.conf, but make
45               sure it is the one from fairoot.
46
47         3) adapt configs in ./fai (see chapter "fai config files")
48
49         4) pxeboot your install candidates. this is actually not fully
50            automated.
51
52                 - type "fai" on pxeboot prompt
53                 - after first bootup, use cfdisk to partition your harddisk
54                 - touch a disk_ready file in configuration space
55                   (after using cfdisk, sync to disk file!)
56                 - reboot and finaly wathc your target system to get hdw'ed :)
57
58         5) optional: login, build a new kernel or do other modifications.
59
60
61 fai config files
62 ----------------
63
64         config files reside in 1) ./fai/config/<client_ip>/ and 2) ./fai/files/
65         directories.
66
67         config dir:
68
69                 - the files reside in a subdirectory, which is simply the
70                   clients ip address, as different clients may need different
71                   config.
72                 - files:
73                         1) disk
74                         2) packages
75
76                         disk file is used to determine the partition layout and
77                         used harddisk. the format: (example, its intuitive!)
78
79                         # disk /dev/hda
80                         # swap 7
81                         1       /boot   ext3    format
82                         5       /       ext3    format
83                         6       /home   ext3    preserve
84
85                         packages file contains packages to get installed. you
86                         may use ./scripts/Helper -create_dist_files to create
87                         one. make sure that all the packages are available on
88                         the mirror, otherwise the fai install routine will
89                         break. hint: switch the partitions to "preserve" and
90                         hdw-get will not install already installed packages
91                         again.
92                         
93          files dir:
94
95                 - files called DEFAULT in a special directory will be copied to
96                   every client to the file of its dirname.
97                 - files named like a clients ip address will be only copied to
98                   that client (again, the file will be the dirname)
99
100                 example:
101
102                 ./fai/files/etc/X11/XF86Config/DEFAULT will be copied to all
103                 clients as /etc/X11/XF86Config file.
104
105
106 fai server configuration
107 ------------------------
108
109 there are several files you need to hack. here we go:
110
111         - dhcpd:
112
113                 file: /etc/dhcpd.conf
114
115                 examples rule, have a look at the configuration for my fai
116                 client:
117
118                 ...
119                 option routers 192.168.10.10;
120                 option domain-name-servers 192.168.10.50, 194.25.134.203;
121                 host compaq {
122                         fixed-address 192.168.10.80;
123                         hardware ethernet 00:50:8b:cb:8e:d2;
124                         allow booting;
125                         allow bootp;
126                         next-server hackstation; # the fai server
127                         server-name hackstation;
128                         filename "pxelinux.0";
129                 }
130                 ...
131
132         - tftpboot (you will need tftp-hpa as tftpserver)
133
134                 the scripts prepared a working fai config file at
135                 /tftpboot/pxelinux.cfg, just add a symbolic link of your clients
136                 ip address (in hex, use: gethostip) pointing to fai.
137                 ofcourse you need to have the package syslinux installed.
138
139         - nfsd:
140
141                 file: /etc/exports
142
143                 the scripts added export entries. just substitute "foobar" to
144                 the name or ip address of your fai clients.
145
146         - inetd
147
148                 file: /etc/inetd.conf
149
150                 make sure the tftpboot line is uncommented. if you have problems
151                 of tftpd switching to user nobody google for solutions. if you
152                 are too lazy substitute "nobody" by "root in inetd.conf. this
153                 is dangerous though, you have been warned.
154
155 note: restart all the mentioned services.
156
157 troubleshooting
158 ---------------
159
160 contact me! -> http://www.hackdaworld.dyndns.org/contents/contact/
161 email: hackbard@hackdaworld.dyndns.org
162 irc: irc.hackdaworld.dyndns.org - #hackdaworld
163
164 greets
165 ------
166
167 good luck now, you are own your own! enjoy hdw. :)
168
169 regards, hackbard.