OSDN Git Service

2013.10.24
[uclinux-h8/uClinux-dist.git] / freeswan / doc / src / umltesting.html
1 <html>
2 <head>
3 <title>FreeS/WAN User-Mode-Linux testing guide</title>
4 <!-- Changed by: Michael Richardson, 07-Mar-2002 -->
5 <meta name="keywords" content="Linux, IPsec, VPN, security, FreeSWAN, testing, User-Mode-Linux, UML">
6
7 <!--
8
9 Written by Michael Richardson for the Linux FreeS/WAN project
10 Freely distributable under the GNU General Public License
11
12 More information at www.freeswan.org
13 Feedback to users@lists.freeswan.org
14
15 $Id: umltesting.html,v 1.4 2002/03/12 21:10:37 mcr Exp $
16
17 $Log: umltesting.html,v $
18 Revision 1.4  2002/03/12 21:10:37  mcr
19         removed instruction on downloading umlminishare, as this is
20         now simply included in umlrootXXX. reformated some other text.
21
22 Revision 1.3  2002/01/29 02:21:21  mcr
23         updated instructions for 2.4.17, and for newest UMLroot.
24
25 Revision 1.2  2001/11/27 05:24:09  mcr
26         added reference to uml-rhroot, but commented out.
27         This proceedure is not yet ready for prime time.
28
29 Revision 1.1  2001/11/05 04:35:57  mcr
30         adapted text from design list posting into HTML for Sandy.
31
32
33 -->
34 </head>
35
36 <body>
37
38 <h1><a name="umltesting">User-Mode-Linux Testing guide</a></h1>
39
40 <p>
41 User mode linux is a way to compile a linux kernel such that it can run as a
42 process in another linux system (potentially as a *BSD or Windows process
43 later). See <A HREF="http://user-mode-linux.sourceforge.net/">http://user-mode-linux.sourceforge.net/</A>
44 </P>
45
46 <p>
47 You'll need about 500Mb of disk space for a full sunrise-east-west-sunset
48 setup. You can possibly get this down by 130Mb if you remove the
49 sunrise/sunset kernel build. If you just want to run, then you can even
50 remove the east/west kernel build.
51 </P>
52
53 <OL>
54 <LI> Get the following files:
55 <UL>
56 <LI> from <A HREF="http://www.sandelman.ottawa.on.ca/freeswan/uml/">http://www.sandelman.ottawa.on.ca/freeswan/uml/</A>
57 <UL>
58 <LI> umlfreeroot-6.0.tar.gz (or highest numbered one). This is a
59   debian potato root file system. You can use this even on a Redhat
60   host, as it has the newer GLIBC2.2 libraries as well. 
61
62
63 <!-- If you are using
64   Redhat 7.2 or newer as your development machine, you can create the
65   image from your installation media. See <A HREF="uml-rhroot.html">Building a RedHat root"></A>.
66   A future document will explain how to build this from .DEB files as well.
67 -->
68
69 <!--
70 <LI> umlfreesharemini.tar.gz    (or umlfreeshareall.tar.gz). 
71   If you are a Debian potato user, you don't need it you can use your
72   native /usr/share.
73 </UL>
74 -->
75
76 <LI> From <A HREF="ftp://ftp.xs4all.nl/pub/crypto/freeswan/">ftp://ftp.xs4all.nl/pub/crypto/freeswan/</A> a snapshot or release (1.92 or better)
77
78 <LI> From
79   <A HREF="http://linux.kernel.org/mirrors.html">http://linux.kernel.org mirror</A>, the virgin 2.4.17 kernel. (if you get a future kernel, then please report success/failure. AC kernels already have UML patched, so use /dev/null for the patch below)
80
81 <LI> Get
82   <A HREF="http://ftp.nl.linux.org/uml/">http://ftp.nl.linux.org/uml/</A> uml-patch-2.4.17-4.bz2 or the one associated with your kernel. If you use an AC kernel, then subsitute /dev/null.
83 <LI> You'll probably want to visit 
84 <A
85   HREF="http://user-mode-linux.sourceforge.net">http://user-mode-linux.sourceforge.net</A> 
86 and get the UML utilities. These are not needed for the build or interactive use (but recommended). They are necessary for the regression testing proceedures used by "make check". 
87 </UL>
88
89 <LI> Pick a suitable place, and extract the following files:
90 <UL> 
91 <LI> 2.4.17 kernel. For instance:
92 <PRE>
93 <CODE>
94            mkdir -p /c2/kernel/linux-2.4.17
95            cd /c2/kernel/linux-2.4.17
96            tar xzvf ../download/pub/linux/kernel/v2.4/linux-2.4.17.tar.gz
97 </CODE>
98 </PRE>
99
100 <LI> extract the umlfreeroot file 
101 <!-- (unless you <A HREF="uml-rhroot.html">built your own from RPMs</A>) -->
102 <PRE>
103 <CODE>
104            mkdir -p /c2/user-mode-linux/basic-root
105            cd /c2/user-mode-linux/basic-root
106            tar xzvf ../download/umlfreeroot-6.0.tar.gz
107 </CODE>
108 </PRE>
109
110 <LI> FreeSWAN itself (or checkout "all" from CVS)
111 <PRE>
112 <CODE>
113            mkdir -p /c2/freeswan/sandbox
114            cd /c2/freeswan/sandbox
115            tar xzvf ../download/snapshot.tar.gz
116 </CODE>
117 </PRE>
118 </UL>
119
120 <LI> cd to /c2/freeswan/sandbox/testing/utils
121 <LI> copy umlsetup-sample.sh to ../../umlsetup.sh
122 <CODE>
123   cp umlsetup-sample.sh ../../umlsetup.sh
124 </CODE>
125
126 <LI> open up ../../umlsetup.sh in your favorite editor.
127
128 <LI> change POOLSPACE= to point to the place with at least 500Mb of
129 disk. Best if it is on the same partition as the "umlfreeroot" extraction,
130 as it will attempt to use hard links if possible to save  disk space.
131
132 <LI> Set TESTINGROOT if you intend to run the script outside of the
133      sandbox/snapshot/release directory. Otherwise, it will configure itself.
134
135 <LI> KERNPOOL should point to the directory with your 2.4.9 kernel
136    tree. This tree should be unconfigured! This is the directory
137    you used in step 2a.
138
139 <LI> UMLPATCH should point at the bz2 file you downloaded at 1g.
140  
141 <LI> FREESWANDIR should point at the directory where you unpacked
142                the snapshot/release. Include the "freeswan-snap2001sep16b"
143                or whatever in it. If you are running from CVS, then
144                you point at the directory where top, klips, etc. are.
145                The script will fix up the directory so that it can be
146                used.
147
148 <LI> BASICROOT should be set to the directory used in 2b, or to the directory
149   that you created with RPMs.
150
151 <LI> SHAREDIR should be set to the directory used in 2c, to /usr/share
152              for Debian potato users, or to $BASICROOT/usr/share.
153
154 <LI> <PRE><CODE>
155 cd $TESTINGROOT/utils
156 sh make-uml.sh
157 </CODE>
158 <PRE>
159     It will grind for awhile. If there are errors it will bail.
160     If so, run it under "script" and send the output to bugs@lists.freeswan.org.  
161
162 <LI> You will have a bunch of stuff under $POOLSPACE.
163     Open four xterms:
164
165 <PRE>
166 <CODE>
167     for i in sunrise sunset east west
168     do
169         xterm -name $i -e $POOLSPACE/$i/start.sh
170     done
171 </CODE>
172 </PRE>
173
174 <LI> Login as root. Password is "root"
175     (Note, these virtual machines are networked together, but are not
176     configured to talk to the rest of the world.)
177
178 <LI> verify that pluto started on east/west, run "ipsec look"
179
180 <LI> login to sunrise. run "ping sunset"
181
182 <LI> login to west. run "tcpdump -p -i eth1 -n"
183     (note that this is tcpdump.org tcpdump)
184
185 </UL>
186
187 </body>
188 </html>