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.26.tar.bz2
58 * The Linux kernel 2.6.26 requires the following patch for the uml guest kernel
59 to successfully start up:
61 http://download.strongswan.org/uml/uml-2.6.26.patch.bz2
63 * The matching .config file required to compile the UML kernel:
65 http://download.strongswan.org/uml/.config-2.6.26
67 * A gentoo-based UML file system (compressed size 130 MBytes) found at
69 http://download.strongswan.org/uml/gentoo-fs-20080407.tar.bz2
71 * The latest strongSwan distribution
73 http://download.strongswan.org/strongswan-4.2.6.tar.bz2
76 3. Creating the environment
77 ------------------------
79 Now change into the testing subdirectory
81 cd ~/strongswan-testing/testing
83 and make the UML testing environment:
85 ./make-testing <hosts>
87 The "make-testing" script calls a series of subscripts which can be
88 enabled or disabled individually by setting the corresponding flags
91 if [ $ENABLE_BUILD_UMLKERNEL = "yes" ]
93 scripts/build-umlkernel
96 builds an UML kernel out of the vanilla Linux kernel and the corresponding
99 if [ $ENABLE_BUILD_HOSTCONFIG = "yes" ]
101 scripts/build-hostconfig
104 generates the default configurations for the UML hosts alice, venus, moon,
105 carol, winnetou, dave, sun, and bob by replacing the wildcards PH_IP_ALICE,
106 etc. by the actual IP addresses defined in "testing.conf".
108 if [ $ENABLE_BUILD_UMLROOTFS = "yes" ]
110 scripts/build-umlrootfs
113 takes the gentoo-based UML file system and compiles the latest strongSwan
114 distribution into it.
116 if [ $ENABLE_BUILD_SSHKEYS = "yes" ]
118 scripts/build-sshkeys
121 adds the common RSA public key of the UML instances to your ~/.ssh/known_hosts
122 directory so that you can log onto the UML instances using ssh without typing
123 in a password. The "scripts/build-sshkeys" script should only be run once.
125 if [ $ENABLE_BUILD_UMLHOSTFS = "yes" ]
127 scripts/build-umlhostfs <hosts>
130 creates the customized UML file systems for the instances given as command line
131 arguments by adding the default host configurations to the UML root file system.
132 If the "make-starting" scripts is called without any arguments then by default
133 the UML file systems are created for the hosts alice, venus, moon, carol,
134 winnetou, dave, sun, and bob. Each UML root file system has as size defined by
135 the ROOTFSSIZE in testing.conf which by default is 544 MBytes. Thus all 8 UML
136 hosts plus the master copy will require a total of 5 GBytes of disk space.
138 if [ $ENABLE_START_TESTING = "yes" ]
140 ./start-testing <hosts>
143 starts the automated testing. More details on the tests you'll find in the
146 -----------------------------------------------------------------------------
148 This file is RCSID $Id$