Commit 12ed937e authored by Ritesh Sarraf's avatar Ritesh Sarraf

Imported Upstream version 20060501

parents
This diff is collapsed.
All documentation in this tree is Copyright (c) 2002 Jeff Dike.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.1
or any later version published by the Free Software Foundation;
with the no invariant sections, with no Front-Cover Texts, and with the no
Back-Cover Texts.
A copy of the license is included in the file FDL in this directory.
This diff is collapsed.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<META NAME="GENERATOR" CONTENT="LinuxDoc-Tools 0.9.21">
<TITLE>User Mode Linux HOWTO : Introduction</TITLE>
<LINK HREF="UserModeLinux-HOWTO-2.html" REL=next>
<LINK HREF="UserModeLinux-HOWTO.html#toc1" REL=contents>
</HEAD>
<BODY>
<A HREF="UserModeLinux-HOWTO-2.html">Next</A>
Previous
<A HREF="UserModeLinux-HOWTO.html#toc1">Contents</A>
<HR>
<H2><A NAME="intro"></A> <A NAME="s1">1.</A> <A HREF="UserModeLinux-HOWTO.html#toc1">Introduction</A></H2>
<P>Welcome to User Mode Linux. It's going to be fun.</P>
<H2><A NAME="ss1.1">1.1</A> <A HREF="UserModeLinux-HOWTO.html#toc1.1">What is User Mode Linux?</A>
</H2>
<P>User Mode Linux lets you run Linux inside itself! With that comes the
power to do all sorts of new things. It virtualises (or simulates, as
some people call it) Linux so that you can run an entire Linux where
once you would have only run a program.</P>
<P>You might have heard of functionality like this before. There are
quite a few projects whose goal is to nest operating systems in one
way or another: Linux on Linux, Windows on Linux, Linux on Windows,
Linux/s390 on Linux/anythingelse, and so on. Or even just x86 on
anything, where the 'x86' program can boot operating systems including
Linux.</P>
<P>Where x86 is involved there is the greatest concentration of
efforts. At the end of this HOWTO you'll find a list of alternative
projects. If all you want to do is run a copy of x86 Linux on another
copy of x86 Linux as fast as possible with little control then quite
possibly one of these other projects will so better than UML.</P>
<H2><A NAME="ss1.2">1.2</A> <A HREF="UserModeLinux-HOWTO.html#toc1.2">How is User Mode Linux Different?</A>
</H2>
<P>User Mode Linux (UML) is rather different from every other Linux
virtualisation project, either free or commercial. UML
strives to present itself as an ordinary program as much as
possible. Here are some of the outcomes of that philosophy:</P>
<P>
<OL>
<LI> Good speed with few compromises. UML compiles to
native machine code that runs just like any other compiled application
on the host. This makes it very much faster than portable
virtualisation schemes that implement an entire hardware architecture
in software. On the other hand, UML does not suffer from
the extreme hardware specificity of virtualisation systems that rely
on particular CPU features. UML runs applications inside
itself with normally at worst a 20% slowdown compared to the host
system, which modern hardware and clever system design can render
negligable in real terms.
</LI>
<LI> Futureproof. Every time Linux gets improved so it can do
something new and clever that benefits the programs it runs, UML
automatically gets that facility. Software suspend,
fine-grained security control such as SE Linux, new filesystem
features, support for bigger/faster hardware... the same is not true
with those virtualisation systems that require major changes on the host
computer.
</LI>
<LI> Flexible code. Normally an OS kernel is just that... a
kernel. It talks to hardware or maybe some virtualised hardware. But
UML can be viewed in many other ways. It would be possible
to turn it into a shared library, for example, so that other programs
could link to it to take advantage of things that Linux does very
well. It can be started as a subshell of an existing application. It
can use stin/stdout like any other program.
</LI>
<LI> Portable. Really portable. UML has only just
started to be exploited for its portability, but there is promising
evidence that ports to x86 Windows, PowerPC Linux, x86 BSD and other
systems are very practical.
</LI>
<LI> Mature. UML has been in development since 1999. One
indication of its robustness is that UML can be compiled to run within
UML, making it 'self-hosting'. Production systems are running on UML.
</LI>
<LI> Free Software. UML is under the GPL (as it must be, being
part of the Linux kernel.)
</LI>
</OL>
</P>
<H2><A NAME="ss1.3">1.3</A> <A HREF="UserModeLinux-HOWTO.html#toc1.3">How does UML Work?</A>
</H2>
<P>Normally, the Linux Kernel talks straight to your hardware (video
card, keyboard, hard drives, etc), and any programs which run ask the
kernel to operate the hardware, like so:</P>
<P>
<BLOCKQUOTE><CODE>
<PRE>
+-----------+-----------+----+
| Process 1 | Process 2 | ...|
+-----------+-----------+----+
| Linux Kernel |
+----------------------------+
| Hardware |
+----------------------------+
</PRE>
</CODE></BLOCKQUOTE>
</P>
<P>The UML Kernel is different; instead of talking to the
hardware, it talks to a `real' Linux kernel (called the `host kernel'
from now on), like any other program. Programs can then run inside
User-Mode Linux as if they were running under a normal kernel, like
so:</P>
<P>
<BLOCKQUOTE><CODE>
<PRE>
+----------------+
| Process 2 | ...|
+-----------+----------------+
| Process 1 | User-Mode Linux|
+----------------------------+
| Linux Kernel |
+----------------------------+
| Hardware |
+----------------------------+
</PRE>
</CODE></BLOCKQUOTE>
</P>
<H2><A NAME="ss1.4">1.4</A> <A HREF="UserModeLinux-HOWTO.html#toc1.4">Why Would I Want UML?</A>
</H2>
<P>
<OL>
<LI> If UML crashes, your host kernel is still fine.</LI>
<LI> You can run a usermode kernel as a non-root user.</LI>
<LI> You can debug the UML like any normal process.</LI>
<LI> You can run gprof (profiling) and gcov (coverage testing).</LI>
<LI> You can play with your kernel without breaking things.</LI>
<LI> You can use it as a sandbox for testing new apps.</LI>
<LI> You can try new development kernels safely.</LI>
<LI> You can run different distributions simultaneously.</LI>
<LI> It's extremely fun.</LI>
</OL>
</P>
<HR>
<A HREF="UserModeLinux-HOWTO-2.html">Next</A>
Previous
<A HREF="UserModeLinux-HOWTO.html#toc1">Contents</A>
</BODY>
</HTML>
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<META NAME="GENERATOR" CONTENT="LinuxDoc-Tools 0.9.21">
<TITLE>User Mode Linux HOWTO : Diagnosing Problems</TITLE>
<LINK HREF="UserModeLinux-HOWTO-15.html" REL=next>
<LINK HREF="UserModeLinux-HOWTO-13.html" REL=previous>
<LINK HREF="UserModeLinux-HOWTO.html#toc14" REL=contents>
</HEAD>
<BODY>
<A HREF="UserModeLinux-HOWTO-15.html">Next</A>
<A HREF="UserModeLinux-HOWTO-13.html">Previous</A>
<A HREF="UserModeLinux-HOWTO.html#toc14">Contents</A>
<HR>
<H2><A NAME="trouble"></A> <A NAME="s14">14.</A> <A HREF="UserModeLinux-HOWTO.html#toc14">Diagnosing Problems</A></H2>
<P>
If you get UML to crash, hang, or otherwise misbehave, you should
report this on one of the project mailing lists, either the
developer list - user-mode-linux-devel at lists dot sourceforge dot
net (subscription info) or the user list -
user-mode-linux-user at lists dot sourceforge dot net
(subscription info). When you do, it is
likely that I will want more information. So, it would be helpful to
read the stuff below, do whatever is applicable in your case, and
report the results to the list.</P>
<P>
For any diagnosis, you're going to need to build a debugging kernel.
The binaries from this site aren't debuggable. If you haven't done
this before, read about
<A HREF="UserModeLinux-HOWTO-2.html#compile">Compiling the kernel and modules</A> and
<A HREF="UserModeLinux-HOWTO-11.html#debugging">Kernel debugging</A> UML first. </P>
<H2><A NAME="ss14.1">14.1</A> <A HREF="UserModeLinux-HOWTO.html#toc14.1">Case 1 : Normal kernel panics</A>
</H2>
<P>The most common case is for a normal thread to panic. To debug this,
you will need to run it under the debugger (add 'debug' to the command
line). An xterm will start up with gdb running inside it. Continue
it when it stops in start_kernel and make it crash. Now ^C gdb and
'bt'. I'm going to want to see the resulting stack trace. </P>
<P>
If the panic was a &quot;Kernel mode fault&quot;, then there will be a segv
frame on the stack and I'm going to want some more information. The
stack might look something like this:
<BLOCKQUOTE><CODE>
<PRE>
(UML gdb) backtrace
#0 0x1009bf76 in __sigprocmask (how=1, set=0x5f347940, oset=0x0)
at ../sysdeps/unix/sysv/linux/sigprocmask.c:49
#1 0x10091411 in change_sig (signal=10, on=1) at process.c:218
#2 0x10094785 in timer_handler (sig=26) at time_kern.c:32
#3 0x1009bf38 in __restore ()
at ../sysdeps/unix/sysv/linux/i386/sigaction.c:125
#4 0x1009534c in segv (address=8, ip=268849158, is_write=2, is_user=0)
at trap_kern.c:66
#5 0x10095c04 in segv_handler (sig=11) at trap_user.c:285
#6 0x1009bf38 in __restore ()
</PRE>
</CODE></BLOCKQUOTE>
I'm going to want to see the symbol and line information for the value
of ip in the segv frame. In this case, you would do the following:
<BLOCKQUOTE><CODE>
<PRE>
(UML gdb) i sym 268849158
</PRE>
</CODE></BLOCKQUOTE>
and
<BLOCKQUOTE><CODE>
<PRE>
(UML gdb) i line *268849158
</PRE>
</CODE></BLOCKQUOTE>
The reason for this is the __restore frame right above the
segv_handler frame is hiding the frame that actually segfaulted. So,
I have to get that information from the faulting ip.</P>
<H2><A NAME="ss14.2">14.2</A> <A HREF="UserModeLinux-HOWTO.html#toc14.2">Case 2 : Tracing thread panics</A>
</H2>
<P>The less common and more painful case is when the tracing thread
panics. In this case, the kernel debugger will be useless because it
needs a healthy tracing thread in order to work. The first thing to
do is get a backtrace from the tracing thread. This is done by
figuring out what its pid is, firing up gdb, and attaching it to that
pid. You can figure out the tracing thread pid by looking at the
first line of the console output, which will look like this:
<BLOCKQUOTE><CODE>
<PRE>
tracing thread pid = 15851
</PRE>
</CODE></BLOCKQUOTE>
or by running ps on the host and finding the line that looks like
this:
<BLOCKQUOTE><CODE>
<PRE>
jdike 15851 4.5 0.4 132568 1104 pts/0 S 21:34 0:05 ./linux [(tracing thread)]
</PRE>
</CODE></BLOCKQUOTE>
If the panic was 'segfault in signals', then follow the instructions
above for collecting information about the location of the seg fault.</P>
<P>
If the tracing thread flaked out all by itself, then send that
backtrace in and wait for our crack debugging team to fix the
problem. </P>
<H2><A NAME="ss14.3">14.3</A> <A HREF="UserModeLinux-HOWTO.html#toc14.3">Case 3 : Tracing thread panics caused by other threads</A>
</H2>
<P>However, there are cases where the misbehavior of another
thread caused the problem. The most common panic of this type is:
<BLOCKQUOTE><CODE>
<PRE>
wait_for_stop failed to wait for &lt;pid> to stop with &lt;signal number>
</PRE>
</CODE></BLOCKQUOTE>
In this case, you'll need to get a backtrace from the process
mentioned in the panic, which is complicated by the fact that the
kernel debugger is defunct and without some fancy footwork, another
gdb can't attach to it. So, this is how the fancy footwork goes:</P>
<P>In a shell:
<BLOCKQUOTE><CODE>
<PRE>
host% kill -STOP pid
</PRE>
</CODE></BLOCKQUOTE>
Run gdb on the tracing thread as described in case 2 and do:
<BLOCKQUOTE><CODE>
<PRE>
(host gdb) call detach(pid)
</PRE>
</CODE></BLOCKQUOTE>
If you get a segfault, do it again. It always works the second
time.</P>
<P>Detach from the tracing thread and attach to that other thread:
<BLOCKQUOTE><CODE>
<PRE>
(host gdb) detach
</PRE>
</CODE></BLOCKQUOTE>
<BLOCKQUOTE><CODE>
<PRE>
(host gdb) attach pid
</PRE>
</CODE></BLOCKQUOTE>
If gdb hangs when attaching to that process, go back to a shell and
do:
<BLOCKQUOTE><CODE>
<PRE>
host%
kill -CONT pid
</PRE>
</CODE></BLOCKQUOTE>
And then get the backtrace:
<BLOCKQUOTE><CODE>
<PRE>
(host gdb) backtrace
</PRE>
</CODE></BLOCKQUOTE>
</P>
<H2><A NAME="ss14.4">14.4</A> <A HREF="UserModeLinux-HOWTO.html#toc14.4">Case 4 : Hangs</A>
</H2>
<P>Hangs seem to be fairly rare, but they sometimes happen. When a hang
happens, we need a backtrace from the offending process. Run the
kernel debugger as described in case 1 and get a backtrace. If the
current process is not the idle thread, then send in the backtrace.
You can tell that it's the idle thread if the stack looks like this:
<BLOCKQUOTE><CODE>
<PRE>
#0 0x100b1401 in __libc_nanosleep ()
#1 0x100a2885 in idle_sleep (secs=10) at time.c:122
#2 0x100a546f in do_idle () at process_kern.c:445
#3 0x100a5508 in cpu_idle () at process_kern.c:471
#4 0x100ec18f in start_kernel () at init/main.c:592
#5 0x100a3e10 in start_kernel_proc (unused=0x0) at um_arch.c:71
#6 0x100a383f in signal_tramp (arg=0x100a3dd8) at trap_user.c:50
</PRE>
</CODE></BLOCKQUOTE>
If this is the case, then some other process is at fault, and went to
sleep when it shouldn't have. Run ps on the host and figure out which
process should not have gone to sleep and stayed asleep. Then attach
to it with gdb and get a backtrace as described in case 3.</P>
<HR>
<A HREF="UserModeLinux-HOWTO-15.html">Next</A>
<A HREF="UserModeLinux-HOWTO-13.html">Previous</A>
<A HREF="UserModeLinux-HOWTO.html#toc14">Contents</A>
</BODY>
</HTML>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<META NAME="GENERATOR" CONTENT="LinuxDoc-Tools 0.9.21">
<TITLE>User Mode Linux HOWTO : Thanks</TITLE>
<LINK HREF="UserModeLinux-HOWTO-14.html" REL=previous>
<LINK HREF="UserModeLinux-HOWTO.html#toc15" REL=contents>
</HEAD>
<BODY>
Next
<A HREF="UserModeLinux-HOWTO-14.html">Previous</A>
<A HREF="UserModeLinux-HOWTO.html#toc15">Contents</A>
<HR>
<H2><A NAME="thanks"></A> <A NAME="s15">15.</A> <A HREF="UserModeLinux-HOWTO.html#toc15">Thanks</A></H2>
<P>
A number of people have helped this project in various ways, and this page
gives recognition where recognition is due.</P>
<P>
If you're listed here and you would prefer a real link on your name,
or no link at all, instead of the despammed email address pseudo-link,
let me know.</P>
<P>
If you're not listed here and you think maybe you should be, please let
me know that as well. I try to get everyone, but sometimes my bookkeeping
lapses and I forget about contributions.</P>
<H2><A NAME="ss15.1">15.1</A> <A HREF="UserModeLinux-HOWTO.html#toc15.1">Code and Documentation</A>
</H2>
<P>
<A HREF="rusty at linuxcare.com.au">Rusty Russell</A> -
<UL>
<LI>wrote the
<A HREF="http://user-mode-linux.sourceforge.net/UserModeLinux-HOWTO.html">HOWTO</A> </LI>
<LI> prodded me into making this project official and putting it on
SourceForge</LI>
<LI>came up with the way cool
<A HREF="http://user-mode-linux.sourceforge.net/uml-small.png">UML logo</A> </LI>
<LI>redid the config process</LI>
</UL>
</P>
<P>
<A HREF="reiter at netspace.net.au">Peter Moulder</A> -
Fixed my config and build processes, and added some useful code to the
block driver</P>
<P>
<A HREF="wstearns at pobox.com">Bill Stearns</A> -
<UL>
<LI>HOWTO updates
</LI>
<LI>lots of bug reports
</LI>
<LI>lots of testing
</LI>
<LI>dedicated a box (uml.ists.dartmouth.edu) to support UML development
</LI>
<LI>wrote the mkrootfs script, which allows bootable filesystems of RPM-based
distributions to be cranked out
</LI>
<LI>cranked out a large number of filesystems with said script
</LI>
</UL>
</P>
<P>
<A HREF="jleu at mindspring.com">Jim Leu</A> - Wrote the virtual
ethernet driver and associated usermode tools</P>
<P>
<A HREF="http://lars.nocrew.org/">Lars Brinkhoff</A> - Contributed
the ptrace proxy from his own
<A HREF="http://a386.nocrew.org/">project</A>
to allow easier kernel debugging</P>
<P>
<A HREF="andrea at suse.de">Andrea Arcangeli</A> - Redid
some of the early boot code so that it would work on machines with
Large File Support</P>
<P>
<A HREF="http://www.chiark.greenend.org.uk/~cemerson/"> Chris Emerson</A> - Did the first UML port to Linux/ppc</P>
<P>
<A HREF="laforge at gnumonks.org">Harald Welte</A> -
Wrote the multicast transport for the network driver</P>
<P>
Jorgen Cederlof - Added special file support to hostfs</P>
<P>
<A HREF="glonnon at ridgerun dot com">Greg Lonnon </A> - Changed the ubd driver to allow it to layer a COW file on a
shared read-only filesystem and wrote the iomem emulation support</P>
<P>
<A HREF="http://hem.passagen.se/hno/"> Henrik Nordstrom</A> - Provided a variety of patches, fixes, and
clues</P>
<P>
Lennert Buytenhek - Contributed various patches, a rewrite of the
network driver, the first implementation of the mconsole driver, and
did the bulk of the work needed to get SMP working again.</P>
<P>
Yon Uriarte - Fixed the TUN/TAP network backend while I slept.</P>
<P>
Adam Heath - Made a bunch of nice cleanups to the initialization code,
plus various other small patches.</P>
<P>
Matt Zimmerman - Matt volunteered to be the UML Debian maintainer
and is doing a real nice job of it. He also noticed and fixed a
number of actually and potentially exploitable security holes in
uml_net. Plus the occasional patch. I like patches.</P>
<P>
James McMechan - James seems to have taken over maintenance of the ubd
driver and is doing a nice job of it.</P>
<P>
Chandan Kudige - wrote the umlgdb script which automates the reloading
of module symbols.</P>
<P>
Steve Schmidtke - wrote the UML slirp transport and hostaudio drivers,
enabling UML processes to access audio devices on the host. He also
submitted patches for the slip transport and lots of other things.</P>
<P>
<A HREF="http://davidcoulson.net">David Coulson</A> -
<UL>
<LI>Set up the
<A HREF="http://usermodelinux.org">usermodelinux.org</A> site,
which is a great way of keeping the UML user community on top of UML
goings-on.
</LI>
<LI>Site documentation and updates
</LI>
<LI>Nifty little UML management daemon
<A HREF="http://uml.openconsultancy.com/umld/">UMLd</A>
</LI>
<LI>Lots of testing and bug reports
</LI>
</UL>
</P>
<H2><A NAME="ss15.2">15.2</A> <A HREF="UserModeLinux-HOWTO.html#toc15.2">Flushing out bugs</A>
</H2>
<P>
<UL>
<LI>Yuri Pudgorodsky</LI>
<LI>Gerald Britton</LI>
<LI>Ian Wehrman</LI>
<LI>Gord Lamb</LI>
<LI>Eugene Koontz</LI>
<LI>John H. Hartman</LI>
<LI>Anders Karlsson</LI>
<LI>Daniel Phillips</LI>
<LI>John Fremlin</LI>
<LI>Rainer Burgstaller</LI>
<LI>James Stevenson</LI>
<LI>Matt Clay</LI>
<LI>Cliff Jefferies</LI>
<LI>Geoff Hoff</LI>
<LI>Lennert Buytenhek</LI>
<LI>Al Viro</LI>
<LI>Frank Klingenhoefer</LI>
<LI>Livio Baldini Soares</LI>
<LI>Jon Burgess</LI>
<LI>Petru Paler</LI>
<LI>Paul</LI>
<LI>Chris Reahard</LI>
<LI>Sverker Nilsson</LI>
<LI>Gong Su</LI>
<LI>johan verrept</LI>
<LI>Bjorn Eriksson</LI>
<LI>Lorenzo Allegrucci</LI>
<LI>Muli Ben-Yehuda</LI>
<LI>David Mansfield</LI>
<LI>Howard Goff</LI>
<LI>Mike Anderson</LI>
<LI>John Byrne</LI>
<LI>Sapan J. Batia</LI>
<LI>Iris Huang</LI>
<LI>Jan Hudec</LI>
<LI>Voluspa</LI>
</UL>
</P>
<H2><A NAME="ss15.3">15.3</A> <A HREF="UserModeLinux-HOWTO.html#toc15.3">Buglets and clean-ups</A>
</H2>
<P>
<UL>
<LI>Dave Zarzycki</LI>
<LI>Adam Lazur</LI>
<LI>Boria Feigin</LI>
<LI>Brian J. Murrell</LI>
<LI>JS</LI>
<LI>Roman Zippel</LI>
<LI>Wil Cooley</LI>
<LI>Ayelet Shemesh</LI>
<LI>Will Dyson</LI>
<LI>Sverker Nilsson</LI>
<LI>dvorak</LI>
<LI>v.naga srinivas</LI>
<LI>Shlomi Fish</LI>
<LI>Roger Binns</LI>
<LI>johan verrept</LI>
<LI>MrChuoi</LI>
<LI>Peter Cleve</LI>
<LI>Vincent Guffens</LI>
<LI>Nathan Scott</LI>
<LI>Patrick Caulfield</LI>
<LI>jbearce</LI>
<LI>Catalin Marinas</LI>
<LI>Shane Spencer</LI>
<LI>Zou Min</LI>
<LI>Ryan Boder</LI>
<LI>Lorenzo Colitti</LI>
<LI>Gwendal Grignou</LI>
<LI>Andre' Breiler</LI>
<LI>Tsutomu Yasuda</LI>
</UL>
</P>
<H2><A NAME="ss15.4">15.4</A> <A HREF="UserModeLinux-HOWTO.html#toc15.4">Case Studies</A>
</H2>
<P>
<UL>
<LI>Jon Wright</LI>
<LI>William McEwan</LI>
<LI>Michael Richardson</LI>
</UL>
</P>
<H2><A NAME="ss15.5">15.5</A> <A HREF="UserModeLinux-HOWTO.html#toc15.5">Other contributions</A>
</H2>
<P>
<A HREF="Bill.Carr at compaq.com">Bill Carr</A> made the Red Hat
mkrootfs script work with RH 6.2.</P>
<P>
<A HREF="mikejen at hevanet.com">Michael Jennings</A> sent in
some material which is now gracing the top of the
<A HREF="http://user-mode-linux.sourceforge.net/index.html">index page</A> of this site.</P>
<P>
<A HREF="http://www.sgi.com">SGI</A> (and more specifically
<A HREF="ralf at uni-koblenz.de">Ralf Baechle</A> ) gave me an account on
<A HREF="http://www.oss.sgi.com"> oss.sgi.com</A> . The bandwidth
there made it possible to produce most of the filesystems available on
the project
download page.</P>
<P>
<A HREF="Laurent.Bonnaud at inpg.fr">Laurent Bonnaud</A> took the old grotty
Debian filesystem that I've been distributing and updated it to 2.2.
It is now available by itself here.</P>
<P> Rik van Riel gave me some ftp space on ftp.nl.linux.org so I can
make releases even when Sourceforge is broken.</P>
<P> Rodrigo de Castro looked at my broken pte code and told me what
was wrong with it, letting me fix a long-standing (several weeks) and
serious set of bugs.</P>
<P> Chris Reahard built a specialized root filesystem for running a
DNS server jailed inside UML. It's available from the
<A HREF="http://user-mode-linux.sourceforge.net/dl-sf.html">download</A> page in the
Jail Filesysems section.</P>
<HR>
Next
<A HREF="UserModeLinux-HOWTO-14.html">Previous</A>
<A HREF="UserModeLinux-HOWTO.html#toc15">Contents</A>
</BODY>
</HTML>
This diff is collapsed.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<META NAME="GENERATOR" CONTENT="LinuxDoc-Tools 0.9.21">
<TITLE>User Mode Linux HOWTO : Running UML and logging in</TITLE>
<LINK HREF="UserModeLinux-HOWTO-4.html" REL=next>
<LINK HREF="UserModeLinux-HOWTO-2.html" REL=previous>
<LINK HREF="UserModeLinux-HOWTO.html#toc3" REL=contents>
</HEAD>
<BODY>
<A HREF="UserModeLinux-HOWTO-4.html">Next</A>
<A HREF="UserModeLinux-HOWTO-2.html">Previous</A>
<A HREF="UserModeLinux-HOWTO.html#toc3">Contents</A>
<HR>
<H2><A NAME="run"></A> <A NAME="s3">3.</A> <A HREF="UserModeLinux-HOWTO.html#toc3">Running UML and logging in</A></H2>
<P> </P>
<H2><A NAME="ss3.1">3.1</A> <A HREF="UserModeLinux-HOWTO.html#toc3.1">Running UML</A>
</H2>
<P>It runs on 2.2.15 or later, and all 2.4 and 2.6 kernels.</P>
<P>
Booting UML is straightforward. Simply run 'linux': it will try to
mount the file `root_fs' in the current directory. You do not need to
run it as root. If your root filesystem is not named `root_fs', then
you need to put a `ubd0=root_fs_whatever' switch on the linux command
line.</P>
<P>
You will need a filesystem to boot UML from. There are a number
available for download from
<A HREF="http://user-mode-linux.sourceforge.net/dl-sf.html">here </A> . There are also
<A HREF="http://user-mode-linux.sourceforge.net/fs_making.html">several tools</A> which can be used to generate UML-compatible filesystem
images from media.</P>
<P>
The kernel will boot up and present you with a login prompt.</P>
<P>
Note: If the host is configured with a 2G/2G address space split
rather than the usual 3G/1G split, then the packaged UML binaries will
not run. They will immediately segfault. See
<A HREF="UserModeLinux-HOWTO-4.html#2G-2G">UML on 2G/2G hosts</A> for the scoop on
running UML on your system.</P>
<H2><A NAME="ss3.2">3.2</A> <A HREF="UserModeLinux-HOWTO.html#toc3.2">Logging in</A>
</H2>
<P> The prepackaged filesystems have a root account with
password 'root' and a user account with password 'user'. The
login banner will generally tell you how to log in. So, you log in
and you will find yourself inside a little virtual machine. Our
filesystems have a variety of commands and utilities installed (and it
is fairly easy to add more), so you will have a lot of tools with
which to poke around the system. </P>
<P> There are a couple of other ways to log in:
<UL>
<LI>On a virtual console
<P>
Each virtual console that is configured (i.e. the
device exists in /dev and /etc/inittab runs a getty on it) will come up
in its own xterm. If you get tired of the xterms, read
<A HREF="UserModeLinux-HOWTO-5.html#input">Setting up serial lines and consoles</A> to see how to
attach the consoles to something else, like host ptys.</P>
</LI>
<LI>Over the serial line