2 -------------------------------
3 strongSwan UML - Installation
4 -------------------------------
10 1. Making the host system UML-capable
11 2. Installing the required files
12 3. Creating the UML testing environment
15 1. Making the host system UML-capable
16 ----------------------------------
18 UML instances can be run on both Linux 2.4 and Linux 2.6 kernels.
19 If you are using a vanilla kernel from kernel.org then you must first
20 apply the host SKAS patch available from
22 http://www.user-mode-linux.org/~blaisorblade/patches/
24 and recompile and reboot your host kernel. Some Linux distributions as e.g.
25 SuSE already include the SKAS patch in their kernels.
27 You will also need the UML utilities (uml_mconsole and uml_switch)
30 http://prdownloads.sourceforge.net/user-mode-linux/uml_utilities_20040406.tar.bz2
32 Many Linux distributions offer the UML utilities as a package.
35 2. Installing the required files
36 -----------------------------
38 First create a directory where you want the strongSwan UML testing environment
39 to be located.The default directory is "~/strongswan-testing". If you choose a
40 different location, please adapt the UMLTESTDIR variable in "testing.conf"
43 mkdir ~/strongswan-testing
45 Now copy the "testing" subdirectory coming with the strongSwan distribution to
46 the UML testing environment:
48 cp -r testing ~/strongswan-testing
50 Next you need to copy several files into the ~/strongswan-testing directory that
51 are required for the strongSwan testing environment:
53 * A vanilla Linux kernel on which the UML kernel will be based on.
54 We recommend the use of
56 http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.28.6.tar.bz2
58 * The Linux kernel 2.6.28 does not require any patches for the uml guest kernel
59 to successfully start up.
61 * The matching .config file required to compile the UML kernel:
63 http://download.strongswan.org/uml/.config-2.6.28
65 * A gentoo-based UML file system (compressed size 130 MBytes) found at
67 http://download.strongswan.org/uml/gentoo-fs-20080407.tar.bz2
69 * The latest strongSwan distribution
71 http://download.strongswan.org/strongswan-4.2.13.tar.bz2
74 3. Creating the environment
75 ------------------------
77 Now change into the testing subdirectory
79 cd ~/strongswan-testing/testing
81 and make the UML testing environment:
83 ./make-testing <hosts>
85 The "make-testing" script calls a series of subscripts which can be
86 enabled or disabled individually by setting the corresponding flags
89 if [ $ENABLE_BUILD_UMLKERNEL = "yes" ]
91 scripts/build-umlkernel
94 builds an UML kernel out of the vanilla Linux kernel and the corresponding
97 if [ $ENABLE_BUILD_HOSTCONFIG = "yes" ]
99 scripts/build-hostconfig
102 generates the default configurations for the UML hosts alice, venus, moon,
103 carol, winnetou, dave, sun, and bob by replacing the wildcards PH_IP_ALICE,
104 etc. by the actual IP addresses defined in "testing.conf".
106 if [ $ENABLE_BUILD_UMLROOTFS = "yes" ]
108 scripts/build-umlrootfs
111 takes the gentoo-based UML file system and compiles the latest strongSwan
112 distribution into it.
114 if [ $ENABLE_BUILD_SSHKEYS = "yes" ]
116 scripts/build-sshkeys
119 adds the common RSA public key of the UML instances to your ~/.ssh/known_hosts
120 directory so that you can log onto the UML instances using ssh without typing
121 in a password. The "scripts/build-sshkeys" script should only be run once.
123 if [ $ENABLE_BUILD_UMLHOSTFS = "yes" ]
125 scripts/build-umlhostfs <hosts>
128 creates the customized UML file systems for the instances given as command line
129 arguments by adding the default host configurations to the UML root file system.
130 If the "make-starting" scripts is called without any arguments then by default
131 the UML file systems are created for the hosts alice, venus, moon, carol,
132 winnetou, dave, sun, and bob. Each UML root file system has as size defined by
133 the ROOTFSSIZE in testing.conf which by default is 544 MBytes. Thus all 8 UML
134 hosts plus the master copy will require a total of 5 GBytes of disk space.
136 if [ $ENABLE_START_TESTING = "yes" ]
138 ./start-testing <hosts>
141 starts the automated testing. More details on the tests you'll find in the
144 -----------------------------------------------------------------------------
146 This file is RCSID $Id$