Gentoo Archives: gentoo-doc-cvs

From: swift <swift@×××××××××××.org>
To: gentoo-doc-cvs@l.g.o
Subject: [gentoo-doc-cvs] cvs commit: uml.xml
Date: Thu, 17 Nov 2005 17:20:09
Message-Id: 200511171719.jAHHJuvu027844@robin.gentoo.org
1 swift 05/11/17 17:19:55
2
3 Modified: xml/htdocs/doc/en uml.xml
4 Log:
5 #103026 and #110695 - Fix ubd, place sources elsewhere, plus additional information on networking
6
7 Revision Changes Path
8 1.24 +70 -14 xml/htdocs/doc/en/uml.xml
9
10 file : http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/doc/en/uml.xml?rev=1.24&content-type=text/x-cvsweb-markup&cvsroot=gentoo
11 plain: http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/doc/en/uml.xml?rev=1.24&content-type=text/plain&cvsroot=gentoo
12 diff : http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/doc/en/uml.xml.diff?r1=1.23&r2=1.24&cvsroot=gentoo
13
14 Index: uml.xml
15 ===================================================================
16 RCS file: /var/cvsroot/gentoo/xml/htdocs/doc/en/uml.xml,v
17 retrieving revision 1.23
18 retrieving revision 1.24
19 diff -u -r1.23 -r1.24
20 --- uml.xml 3 Oct 2005 22:53:50 -0000 1.23
21 +++ uml.xml 17 Nov 2005 17:19:55 -0000 1.24
22 @@ -1,5 +1,5 @@
23 <?xml version='1.0' encoding="UTF-8"?>
24 -<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/uml.xml,v 1.23 2005/10/03 22:53:50 rane Exp $ -->
25 +<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/uml.xml,v 1.24 2005/11/17 17:19:55 swift Exp $ -->
26
27 <!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
28
29 @@ -28,8 +28,8 @@
30 <!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
31 <license/>
32
33 -<version>0.11</version>
34 -<date>2005-02-05</date>
35 +<version>0.12</version>
36 +<date>2005-11-17</date>
37
38 <chapter>
39 <title>Obtaining User-Mode Linux</title>
40 @@ -50,17 +50,27 @@
41 </p>
42
43 <p>
44 -Installing user-mode linux is essentially identical to a normal kernel
45 -install. First install the kernel sources (appropriately patched for
46 -user-mode linux), and then configure the user-mode linux kernel in the
47 -usual fashion. Since kernel 2.6.9, UML has been integrated in the vanilla
48 -kernel.
49 +Most 2.6 kernels have UML support. Although you can use your current kernel
50 +sources, it might be wiser to keep the UML kernel tree(s) separate. After all,
51 +you'll be building a new kernel with a different configuration and you might
52 +want to have heterogenous systems on your main Linux system (several different
53 +UML kernels).
54 </p>
55
56 -<pre caption="Installing UML kernel sources">
57 -<comment>(We'll install the vanilla 2.6 kernel, you can also use the usermode-sources)</comment>
58 -# <i>emerge sys-kernel/development-sources</i>
59 -# <i>cd /usr/src/linux</i>
60 +<p>
61 +So download a nice kernel tree (like the vanilla one from <uri
62 +link="http://www.kernel.org">kernel.org</uri>) and extract it to some local
63 +development location.
64 +</p>
65 +
66 +<p>
67 +Next, configure this UML kernel as you would do for any other system, but append
68 +<e>ARCH=um</e> so that the kernel build software knows that the kernel
69 +is meant to run as a guest process on the main system.
70 +</p>
71 +
72 +<pre caption="Building the UML kernel">
73 +# <i>cd /srv/aegis/src/uml-linux</i>
74 # <i>make menuconfig <comment>ARCH=um</comment></i>
75 # <i>make linux <comment>ARCH=um</comment></i>
76 # <i>cp linux /usr/local/bin/linux</i>
77 @@ -168,9 +178,9 @@
78 <p>
79 Add any additional packages you desire. Feel free to give your virtual
80 Gentoo system a hostname, if you so desire. In <path>/etc/fstab</path>
81 -you will want <path>/dev/ROOT</path> to be <path>/dev/ubd/0</path>, with
82 +you will want <path>/dev/ROOT</path> to be <path>/dev/ubda</path>, with
83 a fs type of either ext2, ext3, or reiserfs. Set <path>/dev/SWAP</path>
84 -to be <path>/dev/ubd/1</path>, and comment out <path>/dev/BOOT</path>.
85 +to be <path>/dev/ubdb</path>, and comment out <path>/dev/BOOT</path>.
86 </p>
87
88 <p>
89 @@ -261,6 +271,7 @@
90 <chapter>
91 <title>Networking</title>
92 <section>
93 +<title>Using an Existing Network</title>
94 <body>
95
96 <p>
97 @@ -346,6 +357,51 @@
98
99 </body>
100 </section>
101 +<section>
102 +<title>Using a Virtual Network</title>
103 +<body>
104 +
105 +<p>
106 +Before you get all too excited, this is not a virtual private network. It is a
107 +network that is only accessible by the UML instances. The
108 +<c>usermode-utilities</c> package provides a tool called <c>uml_switch</c> which
109 +defines the end points of the switch.
110 +</p>
111 +
112 +<pre caption="Activating end points of a UML switch">
113 +<comment>(If the switch information should stay in the foreground:)</comment>
114 +$ <i>uml_switch -unix ~/tmp/switch.sock</i>
115 +
116 +<comment>(If it should be backgrounded:)</comment>
117 +$ <i>uml_switch -unix ~/tmp/switch.sock &amp;&gt; ~/tmp/switch.log &amp;</i>
118 +</pre>
119 +
120 +<p>
121 +To start the UML instances on the switch, run the next command. Your
122 +(virtual) network interface will be connected to the <c>uml_switch</c> process
123 +and will be using the given MAC address.
124 +</p>
125 +
126 +<pre caption="Running first UML instance">
127 +$ <i>linux ubd0=first_rootfs ubd1=first_swapfs eth0=daemon,10:00:01:02:00:00,,~/tmp/switch.sock</i>
128 +</pre>
129 +
130 +<p>
131 +You can still connect the system to the existing network, or have a second
132 +process attached to both the virtual one and the existing one:
133 +</p>
134 +
135 +<pre caption="Running second UML instance">
136 +$ <i>linux ubd0=second_rootfs ubd1=second_swapfs eth0=daemon,10:00:01:02:00:01,,~/tmp/switch.sock \
137 + eth1=tuntap,,,192.168.1.43</i>
138 +</pre>
139 +
140 +<p>
141 +More information about the tuntap setting can be found in the previous section.
142 +</p>
143 +
144 +</body>
145 +</section>
146 </chapter>
147 <chapter>
148 <title>Testing the .iso</title>
149
150
151
152 --
153 gentoo-doc-cvs@g.o mailing list