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">
9 Written by Michael Richardson for the Linux FreeS/WAN project
10 Freely distributable under the GNU General Public License
12 More information at www.freeswan.org
13 Feedback to users@lists.freeswan.org
15 $Id: umltesting.html,v 1.4 2002/03/12 21:10:37 mcr Exp $
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.
22 Revision 1.3 2002/01/29 02:21:21 mcr
23 updated instructions for 2.4.17, and for newest UMLroot.
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.
29 Revision 1.1 2001/11/05 04:35:57 mcr
30 adapted text from design list posting into HTML for Sandy.
38 <h1><a name="umltesting">User-Mode-Linux Testing guide</a></h1>
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>
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.
54 <LI> Get the following files:
56 <LI> from <A HREF="http://www.sandelman.ottawa.on.ca/freeswan/uml/">http://www.sandelman.ottawa.on.ca/freeswan/uml/</A>
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.
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.
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
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)
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)
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
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".
89 <LI> Pick a suitable place, and extract the following files:
91 <LI> 2.4.17 kernel. For instance:
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
100 <LI> extract the umlfreeroot file
101 <!-- (unless you <A HREF="uml-rhroot.html">built your own from RPMs</A>) -->
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
110 <LI> FreeSWAN itself (or checkout "all" from CVS)
113 mkdir -p /c2/freeswan/sandbox
114 cd /c2/freeswan/sandbox
115 tar xzvf ../download/snapshot.tar.gz
120 <LI> cd to /c2/freeswan/sandbox/testing/utils
121 <LI> copy umlsetup-sample.sh to ../../umlsetup.sh
123 cp umlsetup-sample.sh ../../umlsetup.sh
126 <LI> open up ../../umlsetup.sh in your favorite editor.
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.
132 <LI> Set TESTINGROOT if you intend to run the script outside of the
133 sandbox/snapshot/release directory. Otherwise, it will configure itself.
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
139 <LI> UMLPATCH should point at the bz2 file you downloaded at 1g.
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
148 <LI> BASICROOT should be set to the directory used in 2b, or to the directory
149 that you created with RPMs.
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.
155 cd $TESTINGROOT/utils
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.
162 <LI> You will have a bunch of stuff under $POOLSPACE.
167 for i in sunrise sunset east west
169 xterm -name $i -e $POOLSPACE/$i/start.sh
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.)
178 <LI> verify that pluto started on east/west, run "ipsec look"
180 <LI> login to sunrise. run "ping sunset"
182 <LI> login to west. run "tcpdump -p -i eth1 -n"
183 (note that this is tcpdump.org tcpdump)