View | Details | Raw Unified | Return to bug 160698
Collapse All | Expand All

(-)en_US.ISO8859-1/articles/Makefile (-1 lines)
Lines 47-53 Link Here
47
SUBDIR+= portbuild
47
SUBDIR+= portbuild
48
SUBDIR+= pr-guidelines
48
SUBDIR+= pr-guidelines
49
SUBDIR+= problem-reports
49
SUBDIR+= problem-reports
50
SUBDIR+= pxe
51
SUBDIR+= rc-scripting
50
SUBDIR+= rc-scripting
52
SUBDIR+= relaydelay
51
SUBDIR+= relaydelay
53
SUBDIR+= releng
52
SUBDIR+= releng
(-)en_US.ISO8859-1/articles/pxe/Makefile (-28 lines)
Removed Link Here
1
#
2
# $FreeBSD: doc/en_US.ISO8859-1/articles/pxe/Makefile,v 1.5 2004/04/06 16:10:07 phantom Exp $
3
#
4
# Article: FreeBSD PXE Jumpstart Guide
5
6
DOC?= article
7
8
FORMATS?= html
9
10
INSTALL_COMPRESSED?=gz
11
INSTALL_ONLY_COMPRESSED?=
12
13
EXTRAS=		dhcpd.conf
14
EXTRAS+=	install.cfg
15
EXTRAS+=	loader.rc
16
EXTRAS+=	pkgmaker.sh
17
EXTRAS+=	post
18
EXTRAS+=	pre
19
20
SRCS=	article.sgml
21
22
afterinstall:
23
.for entry in ${EXTRAS}
24
	${INSTALL_DOCS} ${.CURDIR}/${entry} ${DESTDIR}
25
.endfor
26
27
DOC_PREFIX?= ${.CURDIR}/../../..
28
.include "${DOC_PREFIX}/share/mk/doc.project.mk"
(-)en_US.ISO8859-1/articles/pxe/article.sgml (-285 lines)
Removed Link Here
1
<!DOCTYPE article PUBLIC "-//FreeBSD//DTD DocBook V4.1-Based Extension//EN" [
2
<!ENTITY % articles.ent PUBLIC "-//FreeBSD//ENTITIES DocBook FreeBSD Articles Entity Set//EN">
3
%articles.ent;
4
]>
5
6
<article>
7
  <articleinfo>
8
    <title>FreeBSD Jumpstart Guide</title>
9
10
    <authorgroup>
11
      <author>
12
        <firstname>Alfred</firstname>
13
        <surname>Perlstein</surname>
14
15
        <affiliation>
16
          <address><email>alfred@FreeBSD.org</email></address>
17
        </affiliation>
18
      </author>
19
    </authorgroup>
20
21
    <pubdate>$FreeBSD: doc/en_US.ISO8859-1/articles/pxe/article.sgml,v 1.27 2006/08/29 19:45:44 blackend Exp $</pubdate>
22
23
    <legalnotice id="trademarks" role="trademarks">
24
      &tm-attrib.freebsd;
25
      &tm-attrib.intel;
26
      &tm-attrib.general;
27
    </legalnotice>
28
29
    <abstract>
30
      <para>This article details the method used to allow machines to install
31
        FreeBSD using the &intel; PXE method of booting a machine over a network.
32
        </para>
33
    </abstract>
34
  </articleinfo>
35
36
  <sect1 id="introduction">
37
    <title>Introduction</title>
38
39
    <warning>
40
      <para>This procedure will make the <quote>Server</quote> both insecure and dangerous,
41
        it is best to just keep the <quote>Server</quote> on its own hub and not in any way
42
        accessible by any machines other than the <quote>Clients</quote>.</para>
43
    </warning>
44
45
    <para>Terminology:</para>
46
47
    <informaltable frame="none" pgwide="1">
48
      <tgroup cols="2">
49
50
        <tbody>
51
          <row>
52
            <entry>Server</entry>
53
            <entry>The machine offering netboot and install options.</entry>
54
          </row>
55
56
          <row>
57
            <entry>Client</entry>
58
            <entry>The machine that will have FreeBSD installed on it.</entry>
59
          </row>
60
        </tbody>
61
      </tgroup>
62
    </informaltable>
63
64
    <para>Requires:
65
      Clients supporting the &intel; PXE netboot option, an Ethernet connection.
66
      </para>
67
68
    <para>Please let me know if you come across anything you have problems with
69
      or suggestions for additional documentation.</para>
70
71
    <para>If you would like someone to train/implement a specific netinstall system
72
      for you, please send email so that we can discuss terms.</para>
73
74
    <para>I would also like to thank &a.ps; and &a.jhb; for doing most of the
75
      programming work on pxeboot, the interface to the &intel; PXE (netboot)
76
      system.</para>
77
  </sect1>
78
79
  <sect1 id="server-config">
80
    <title>Server Configuration</title>
81
82
    <procedure>
83
      <step>
84
        <para>Install DHCP: Install <filename role="package">net/isc-dhcp3-server</filename> you can use this config file
85
          <ulink url="dhcpd.conf">
86
          <filename>dhcpd.conf</filename></ulink>, stick it in <filename>/usr/local/etc/</filename>.</para>
87
      </step>
88
89
      <step>
90
        <para>Enable tftp:</para>
91
	
92
        <procedure>
93
          <step>
94
            <para>Make a directory <filename>/usr/tftpboot</filename></para>
95
          </step>
96
97
          <step>
98
            <para>Add this line to your
99
              <filename>/etc/inetd.conf</filename>:</para>
100
	
101
<programlisting>tftp    dgram   udp     wait    nobody  /usr/libexec/tftpd    tftpd /usr/tftpboot</programlisting>
102
          </step>
103
        </procedure>
104
105
      </step>
106
107
      <step>
108
        <para>Enable NFS:</para>
109
	
110
        <procedure>
111
          <step>
112
            <para>Add this to <filename>/etc/rc.conf</filename>:</para>
113
114
	    <programlisting>nfs_server_enable="YES"</programlisting>
115
          </step>
116
117
          <step>
118
            <para>Add this to <filename>/etc/exports</filename>:</para>
119
120
	    <programlisting>/usr -alldirs -ro</programlisting>
121
          </step>
122
        </procedure>
123
      </step>
124
125
      <step>
126
        <para>Reboot to enable the new services or start them
127
          manually.</para>
128
      </step>
129
    </procedure>
130
  </sect1>
131
132
  <sect1 id="bootstrap-config">
133
    <title>Bootstrap Setup</title>
134
135
    <procedure>
136
      <step>
137
        <para>Download bootfiles: Download the
138
          <ulink
139
	  url="&snapshots.stable;/floppies/kern.flp">
140
          kern.flp</ulink> and
141
          <ulink
142
	  url="&snapshots.stable;/floppies/mfsroot.flp">
143
          mfsroot.flp</ulink> floppy images.</para>
144
      </step>
145
146
      <step>
147
        <para>Set up tftp/pxe-boot directory:</para>
148
	
149
        <procedure>
150
          <step>
151
            <para>Put pxeboot in the boot directory:</para>
152
	
153
	    <screen>&prompt.root; <userinput>rm -rf /usr/obj/*</userinput>
154
&prompt.root; <userinput>cd /usr/src/sys/boot</userinput>
155
&prompt.root; <userinput>make</userinput>
156
&prompt.root; <userinput>cp /usr/src/sys/boot/i386/pxeldr/pxeboot /usr/tftpboot</userinput></screen>
157
          </step>
158
159
          <step>
160
            <para>Using the vndevice mount the <filename>kern.flp</filename>
161
	      file and copy its contents to
162
	      <filename>/usr/tftpboot</filename>:</para>
163
164
	    <screen>&prompt.root; <userinput>mdconfig -a -t vnode -f kern.flp -u 0</userinput> # (vnconfig vn0 kern.flp) associate a vndevice with the file
165
&prompt.root; <userinput>mount /dev/md0 /mnt</userinput> # (mount /dev/vn0 /mnt) mount it
166
&prompt.root; <userinput>cp -R /mnt /usr/tftpboot</userinput> # copy the contents to /usr/tftpboot
167
&prompt.root; <userinput>umount /mnt</userinput>              # unmount it
168
&prompt.root; <userinput>vnconfig -u vn0</userinput>          # disassociate the vndevice from the file</screen>
169
          </step>
170
        </procedure>
171
      </step>
172
173
      <step>
174
        <para>Compile a custom kernel for the clients (particularly to avoid
175
          the device config screen at boot) and stick it in
176
          <filename>/usr/tftpboot</filename>.</para>
177
      </step>
178
179
      <step>
180
        <para>Make a special <filename>loader.rc</filename> to and install it
181
          in <filename>/usr/tftpboot/boot/loader.rc</filename> so that it
182
          does not prompt for the second disk, here is
183
          <ulink url="loader.rc">mine</ulink>.</para>
184
      </step>
185
186
      <step>
187
        <para>Extract the installer and helper utilities from the mfsroot disk
188
          and uncompress them, put them in <filename>/usr/tftpboot</filename>
189
          as well:</para>
190
191
	<screen>&prompt.root; <userinput>vnconfig vn0 mfsroot.flp</userinput>         # associate a vndevice with the file
192
&prompt.root; <userinput>mount /dev/vn0 /mnt</userinput>              # mount it
193
&prompt.root; <userinput>cp /mnt/mfsroot.gz /usr/tftpboot</userinput> # copy the contents to /usr/tftpboot
194
&prompt.root; <userinput>umount /mnt</userinput>                      # unmount it
195
&prompt.root; <userinput>vnconfig -u vn0</userinput>                  # disassociate the vndevice from the file
196
&prompt.root; <userinput>cd /usr/tftpboot</userinput>                 # get into the pxeboot directory
197
&prompt.root; <userinput>gunzip mfsroot.gz</userinput>                # uncompress the mfsroot</screen>
198
      </step>
199
200
      <step>
201
        <para>Make your sysinstall script <filename>install.cfg</filename>, you
202
          can use
203
          <ulink url="install.cfg">mine</ulink>
204
          as a template, but you must edit it.</para>
205
      </step>
206
207
      <step>
208
        <para>Copy the sysinstall script into the extracted and uncompressed
209
          mfsroot image:</para>
210
211
	<screen>&prompt.root; <userinput>cd /usr/tftpboot</userinput>
212
&prompt.root; <userinput>vnconfig vn0 mfsroot</userinput>
213
&prompt.root; <userinput>mount /dev/vn0 /mnt</userinput>
214
&prompt.root; <userinput>cp install.cfg /mnt</userinput>
215
&prompt.root; <userinput>umount /mnt</userinput>
216
&prompt.root; <userinput>vnconfig -u vn0</userinput></screen>
217
      </step>
218
    </procedure>
219
  </sect1>
220
221
  <sect1 id="install-setup">
222
    <title>Install Setup</title>
223
224
    <procedure>
225
      <step>
226
        <para>Put the install files in an NFS accessible location on the
227
	  Server. Make a directory corresponding the 'nfs' directive in the
228
	  <filename> install.cfg</filename> file and mirror the FreeBSD
229
	  install files there, you will want it to look somewhat like
230
	  this:</para>
231
232
	<screen>ABOUT.TXT       TROUBLE.TXT     compat20        floppies        ports
233
ERRATA.TXT      UPGRADE.TXT     compat21        games           proflibs
234
HARDWARE.TXT    XF86336         compat22        info            src
235
INSTALL.TXT     bin             compat3x        kern.flp
236
LAYOUT.TXT      catpages        crypto          manpages
237
README.TXT      cdrom.inf       dict            mfsroot.flp
238
RELNOTES.TXT    compat1x        doc             packages</screen>
239
      </step>
240
241
      <step>
242
        <para>Copy the compressed packages into the packages/All directory
243
          under <filename>nfs</filename>.</para>
244
      </step>
245
246
      <step>
247
        <para>Make sure you have an <filename>INDEX</filename> file prepared
248
	  in the packages directory. You can make your own
249
	  <filename>INDEX</filename> entries like so:</para>
250
251
	<programlisting>alfred-1.0||/|Alfred install bootstrap||alfred@FreeBSD.org||||</programlisting>
252
253
        <para>Then you can install custom packages, particularly your own
254
	  custom post-install package.</para>
255
      </step>
256
    </procedure>
257
  </sect1>
258
259
  <sect1 id="custom-postinst-package">
260
    <title>Custom Post-Install Package</title>
261
262
    <para>You can use the script <ulink url="pkgmaker.sh"><filename>pkgmaker.sh
263
      </filename></ulink> to create a
264
      custom package for post install, the idea is to have it install and
265
      configure any special things you may need done.
266
      <filename>pkgmaker</filename> is run in the directory above the package
267
      you wish to create with the single argument of the package (i.e., mypkg)
268
      which will then create a mypkg.tgz for you to include in your sysinstall
269
      package.</para>
270
271
    <para>Inside your custom package dir you will want a file called
272
      <filename>PLIST</filename> which contains all the files that you wish to
273
      install and be incorporated into your package.</para>
274
275
    <para>You will also want files called
276
      <ulink url="pre"><filename>pre</filename></ulink> and
277
      <ulink url="post"><filename>post</filename></ulink>
278
      in the directory, these are shell scripts
279
      that you want to execute before and after your package is
280
      installed.</para>
281
282
    <para>Since this package is in your <filename>install.cfg</filename> file
283
      it should be run and do the final configuration for you.</para>
284
  </sect1>
285
</article>
(-)en_US.ISO8859-1/articles/pxe/dhcpd.conf (-23 lines)
Removed Link Here
1
2
# $Wintelcom: src/freebsd/pxe/doc/dhcpd.conf,v 1.2 2000/09/24 09:18:14 bright Exp $
3
# $FreeBSD: doc/en_US.ISO8859-1/articles/pxe/dhcpd.conf,v 1.2 2003/06/17 15:09:51 alfred Exp $
4
5
option subnet-mask 255.255.255.0;
6
option routers 10.8.253.254;
7
filename "pxeboot";
8
9
ddns-update-style none;
10
11
option domain-name "google.com";
12
option broadcast-address 10.8.253.255;
13
option domain-name-servers 10.8.0.7;
14
server-name "DHCPserver";
15
server-identifier 10.8.253.201;
16
17
default-lease-time 7200;
18
max-lease-time 7200;
19
20
subnet 10.8.253.0 netmask 255.255.255.0 {
21
	next-server 10.8.253.201;
22
	range 10.8.253.29 10.8.253.200;
23
}
(-)en_US.ISO8859-1/articles/pxe/install.cfg (-209 lines)
Removed Link Here
1
2
# $Wintelcom: src/freebsd/pxe/doc/install.cfg,v 1.1 2000/07/14 12:42:05 bright Exp $
3
# $FreeBSD: doc/en_US.ISO8859-1/articles/pxe/install.cfg,v 1.2 2003/11/23 18:50:32 ceri Exp $
4
5
# This is the installation configuration file for our rackmounted FreeBSD 
6
# cluster machines
7
8
# Turn on extra debugging.
9
debug=YES
10
11
# Ok, this ought to turn off ALL prompting, don't complain to me that you
12
# lost a machine because you netbooted it on  the same subnet as this 
13
# box
14
nonInteractive=YES
15
noWarn=YES
16
tryDHCP=YES
17
18
################################
19
# My host specific data
20
hostname=booter
21
domainname=mydomain.com
22
# DHCP does this for us
23
#nameserver=10.0.0.1
24
#defaultrouter=10.0.0.1
25
#ipaddr=DHCP
26
#netmask=255.255.255.0
27
################################
28
29
################################
30
# Which installation device to use 
31
nfs=x.x.x.x:/usr/releng4
32
netDev=fxp0
33
tryDHCP=YES
34
mediaSetNFS
35
################################
36
37
################################
38
# Select which distributions we want.
39
dists= bin doc games manpages catpages proflibs dict info des compat1x compat20  compat21 compat22 compat3x crypto
40
distSetCustom
41
################################
42
43
################################
44
# Now set the parameters for the partition editor on sd0.  
45
disk=ad0
46
partition=all
47
bootManager=standard
48
diskPartitionEditor
49
#diskPartitionWrite
50
################################
51
52
################################
53
# All sizes are expressed in 512 byte blocks!
54
#
55
# A 96MB root partition, followed by a 0.5G swap partition, followed by
56
# a 1G /var, and a /usr using all the remaining space on the disk
57
#
58
ad0s1-1=ufs 1999999 /
59
ad0s1-2=swap 6485760 none
60
ad0s1-3=ufs 2097152 /var
61
ad0s1-4=ufs 0 /usr
62
# Let's do it!
63
diskLabelEditor
64
#diskLabelCommit
65
66
# OK, everything is set.  Do it!
67
installCommit
68
69
package=XFree86-3.3.6
70
packageAdd
71
72
#package=XFree86-aoutlibs-3.3.3
73
#packageAdd
74
75
package=XFree86-contrib-3.3.6
76
packageAdd
77
78
package=arpwatch-2.1.a4
79
packageAdd
80
81
package=bash-2.04
82
packageAdd
83
84
package=bison-1.28
85
packageAdd
86
87
package=bzip2-1.0.0
88
packageAdd
89
90
package=ctags-3.5.2
91
packageAdd
92
93
package=dvips2ascii-1.3
94
packageAdd
95
96
package=electricfence-2.0.5
97
packageAdd
98
99
package=emacs-20.6
100
packageAdd
101
102
package=enscript-letter-1.6.1
103
packageAdd
104
105
package=fping-1.20
106
packageAdd
107
108
package=gawk-3.0.4
109
packageAdd
110
111
package=gdbm-1.8.0
112
packageAdd
113
114
package=gettext-0.10.35
115
packageAdd
116
117
package=gmake-3.79
118
packageAdd
119
120
package=ispell-3.1.20c
121
packageAdd
122
123
package=less-352
124
packageAdd
125
126
package=libgnugetopt-1.1
127
packageAdd
128
129
package=libtool-1.3.4
130
packageAdd
131
132
package=linux_base-6.1
133
packageAdd
134
135
package=linux_devtools-6.1
136
packageAdd
137
138
package=lmbench-1.1
139
packageAdd
140
141
package=m4-1.4
142
packageAdd
143
144
package=mprof-3.0
145
packageAdd
146
147
package=mtr-0.42
148
packageAdd
149
150
package=nmap-2.53
151
packageAdd
152
153
package=pine-4.21
154
packageAdd
155
156
package=portscanner-1.0
157
packageAdd
158
159
package=portsentry-1.0
160
packageAdd
161
162
package=python-1.5.2
163
packageAdd
164
165
package=rpm-2.5.6
166
packageAdd
167
168
package=rsaref-2.0
169
packageAdd
170
171
package=rsync-2.4.3
172
packageAdd
173
174
package=screen-3.9.5
175
packageAdd
176
177
package=stlport-3.01
178
packageAdd
179
180
package=tcsh-6.09.00
181
packageAdd
182
183
package=tk-8.0.5
184
packageAdd
185
186
package=vim-lite-5.6.70
187
packageAdd
188
189
package=wget-1.5.3
190
packageAdd
191
192
package=word2x-0.005
193
packageAdd
194
195
package=zip-2.3
196
packageAdd
197
198
package=zsh-3.0.7
199
packageAdd
200
201
#
202
# this last package is special.  It is used to configure the machine.
203
# it installs several files (like /root/.rhosts) and its installation
204
# script tweaks several options in /etc/rc.conf
205
#
206
package=mypkg-1.0
207
packageAdd
208
209
shutdown
(-)en_US.ISO8859-1/articles/pxe/loader.rc (-11 lines)
Removed Link Here
1
\ $Wintelcom: src/freebsd/pxe/doc/loader.rc,v 1.1 2000/07/15 07:20:37 bright Exp $
2
\ $FreeBSD: doc/en_US.ISO8859-1/articles/pxe/loader.rc,v 1.1 2003/06/17 08:21:40 alfred Exp $
3
echo Loading Kernel...
4
load /kernel
5
echo Loading mfsroot...
6
load -t mfs_root /mfsroot
7
echo booting...
8
echo \007\007
9
echo initializing h0h0magic...
10
set vfs.root.mountfrom="ufs:/dev/md0c"
11
boot
(-)en_US.ISO8859-1/articles/pxe/pkgmaker.sh (-9 lines)
Removed Link Here
1
#!/bin/sh
2
3
# $Wintelcom: src/freebsd/pxe/doc/pkgmaker.sh,v 1.1 2000/07/14 12:42:05 bright Exp $
4
# $FreeBSD: doc/en_US.ISO8859-1/articles/pxe/pkgmaker.sh,v 1.1 2003/06/17 08:21:40 alfred Exp $
5
6
PKGNAME=${1}
7
PKGDIR=`pwd`/${PKGNAME}/
8
9
pkg_create -i ${PKGDIR}pre -I ${PKGDIR}post -f ${PKGDIR}PLIST  -s ${PKGDIR} -p / -d ${PKGDIR}DESCR -c ${PKGDIR}COMMENT ${PKGNAME}.tgz
(-)en_US.ISO8859-1/articles/pxe/post (-36 lines)
Removed Link Here
1
#!/bin/sh
2
3
# $Wintelcom: src/freebsd/pxe/doc/post,v 1.1 2000/07/14 12:42:05 bright Exp $
4
# $FreeBSD: doc/en_US.ISO8859-1/articles/pxe/post,v 1.2 2003/11/05 10:59:34 ceri Exp $
5
6
echo post-install
7
8
set PATH=/bin:/usr/local/bin:/sbin:/usr/sbin:/usr/bin:/usr/bin/X11
9
export PATH
10
11
# do timezone
12
cp /usr/share/zoneinfo/America/Los_Angeles /etc/localtime
13
14
conf="/etc/rc.conf.local"
15
16
rm $conf
17
18
echo 'sendmail_enable="NO"' >> $conf
19
echo 'dumpdev="/dev/ad0s1b"' >> $conf
20
echo 'sshd_enable="YES"' >> $conf
21
echo 'linux_enable="YES"' >> $conf
22
23
# set up IP address and hostname
24
if=`ifconfig fxp1 inet | grep '[ 	]*inet' | sed 's/[ 	]*//'`
25
echo "ifconfig_fxp1=\"${if}\"" >> $conf
26
name=`echo $if | sed 's/[ 	][ 	]*/ /g' | cut -f2 -d" " | cut -f4 -d.`
27
echo "hostname=\"suyy${name}\"" >> $conf
28
29
echo "network_interfaces=\"fxp0 fxp1 lo0\"" >> $conf
30
31
# set up gateway, parse netstat output
32
gw=`netstat -rn | grep '^default' | sed 's/[ 	][ 	]*/ /g' | cut -f2 -d" "`
33
echo "defaultrouter=\"${gw}\"" >> $conf
34
35
pwd_mkdb -p /etc/master.passwd
36
exit 0
(-)en_US.ISO8859-1/articles/pxe/pre (-7 lines)
Removed Link Here
1
#!/bin/sh
2
3
# $Wintelcom: src/freebsd/pxe/doc/pre,v 1.1 2000/07/14 12:42:05 bright Exp $
4
# $FreeBSD: doc/en_US.ISO8859-1/articles/pxe/pre,v 1.1 2003/06/17 15:34:24 alfred Exp $
5
6
echo pre-install
7
exit 0

Return to bug 160698