/[gentoo]/xml/htdocs/doc/en/uml.xml
Gentoo

Diff of /xml/htdocs/doc/en/uml.xml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.16 Revision 1.17
1<?xml version='1.0' encoding="UTF-8"?> 1<?xml version='1.0' encoding="UTF-8"?>
2<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/uml.xml,v 1.16 2004/04/25 18:33:27 swift Exp $ --> 2<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/uml.xml,v 1.17 2004/07/31 12:19:37 swift Exp $ -->
3 3
4<!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> 4<!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
5 5
6<guide link="/doc/en/uml.xml"> 6<guide link="/doc/en/uml.xml">
7<title>Gentoo Linux Developer's guide to system testing with User-Mode Linux</title> 7<title>Gentoo Linux Developer's guide to system testing with User-Mode Linux</title>
22 user-mode linux for testing potentially system-breaking changes. 22 user-mode linux for testing potentially system-breaking changes.
23</abstract> 23</abstract>
24 24
25<license/> 25<license/>
26 26
27<version>0.5</version> 27<version>0.6</version>
28<date>April 25, 2004</date> 28<date>July 31, 2004</date>
29 29
30<chapter> 30<chapter>
31<title>Obtaining User-Mode Linux</title> 31<title>Obtaining User-Mode Linux</title>
32<section> 32<section>
33<body> 33<body>
255and then the user-mode system routes all of its packets 255and then the user-mode system routes all of its packets
256to the host, which then forwards packets to the net. 256to the host, which then forwards packets to the net.
257Make sure that the host kernel has 257Make sure that the host kernel has
258Networking --> IP: Netfilter Configuration --> IP tables support 258Networking --> IP: Netfilter Configuration --> IP tables support
259--> Full NAT --> MASQUERADE target support and 259--> Full NAT --> MASQUERADE target support and
260Network Device Support --> Ethertap network tap 260Network Device Support --> TUN/TAP Support
261compiled as modules; then do the following on the 261compiled as modules; then do the following on the
262<e>host</e> machine: 262<e>host</e> machine:
263</p> 263</p>
264 264
265<pre caption="Setup networking"> 265<pre caption="Setup networking">
266# <i>modprobe ethertap</i> 266# <i>modprobe tun</i>
267# <i>modprobe iptable_nat</i> 267# <i>modprobe iptable_nat</i>
268# <i>iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE</i> 268# <i>iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE</i>
269# <i>echo 1 > /proc/sys/net/ipv4/ip_forward</i> 269# <i>echo 1 > /proc/sys/net/ipv4/ip_forward</i>
270</pre> 270</pre>
271 271
281Now we bring up the user-mode system and see if networking 281Now we bring up the user-mode system and see if networking
282is functional. 282is functional.
283</p> 283</p>
284 284
285<pre caption="Get UML up and running"> 285<pre caption="Get UML up and running">
286# <i>linux ubd0=root_fs ubd1=swap_fs eth0=ethertap,tap0,,192.168.0.254</i> 286# <i>linux ubd0=root_fs ubd1=swap_fs eth0=tuntap,,,192.168.0.254</i>
287<comment>(login to user-mode system)</comment> 287<comment>(login to user-mode system)</comment>
288# <i>ifconfig eth0 192.168.0.1 up</i> 288# <i>ifconfig eth0 192.168.0.1 up</i>
289# <i>ping -c 2 192.168.0.254</i> 289# <i>ping -c 2 192.168.0.254</i>
290PING 192.168.0.254 (192.168.0.254): 56 octets data 290PING 192.168.0.254 (192.168.0.254): 56 octets data
29164 octets from 192.168.0.254: icmp_seq=0 ttl=255 time=0.8 ms 29164 octets from 192.168.0.254: icmp_seq=0 ttl=255 time=0.8 ms
345<pre caption="Booting the ISO"> 345<pre caption="Booting the ISO">
346# <i>mount -o loop /path/to/install-&lt;TAB&gt;.iso /mnt/loop</i> 346# <i>mount -o loop /path/to/install-&lt;TAB&gt;.iso /mnt/loop</i>
347# <i>cp /mnt/loop/isolinux/gentoo.igz .</i> 347# <i>cp /mnt/loop/isolinux/gentoo.igz .</i>
348# <i>linux load_ramdisk=1 prompt_ramdisk=0 ramdisk_size=22000 \</i> 348# <i>linux load_ramdisk=1 prompt_ramdisk=0 ramdisk_size=22000 \</i>
349&gt; <i>initrd=rescue.gz root=/dev/ram0 ubd0=root_fs ubd1=swap_fs \</i> 349&gt; <i>initrd=rescue.gz root=/dev/ram0 ubd0=root_fs ubd1=swap_fs \</i>
350&gt; <i>ubd2=/dev/cdroms/cdrom0 eth0=ethertap,tap0,,192.168.0.254</i> 350&gt; <i>ubd2=/dev/cdroms/cdrom0 eth0=tuntap,,,192.168.0.254</i>
351</pre> 351</pre>
352 352
353<p> 353<p>
354Now you can follow the Gentoo install doc essentially verbatim, 354Now you can follow the Gentoo install doc essentially verbatim,
355although you'll need to know that the root filesystem will be 355although you'll need to know that the root filesystem will be

Legend:
Removed from v.1.16  
changed lines
  Added in v.1.17

  ViewVC Help
Powered by ViewVC 1.1.20