1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116
|
<!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 the kernel 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 the kernel 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 kernels.</P>
<P> Booting the kernel 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>
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
<P>
In the boot output, find a line that looks like:</P>
<P>
<BLOCKQUOTE><CODE>
<PRE>
serial line 0 assigned pty /dev/ptyp1
</PRE>
</CODE></BLOCKQUOTE>
</P>
<P>Attach your favorite terminal program to the corresponding
tty. I.e. for minicom, the command would be
<BLOCKQUOTE><CODE>
<PRE>
minicom -o -p /dev/ttyp1
</PRE>
</CODE></BLOCKQUOTE>
</P>
</LI>
<LI>Over the net
<P>
If the network is running, then you can telnet to the virtual machine
and log in to it. See
<A HREF="UserModeLinux-HOWTO-6.html#networking">Setting up the network</A> to learn about setting up a virtual network.</P>
</LI>
</UL>
</P>
<P>When you're done using it, run halt, and the kernel
will bring itself down and the process will exit.</P>
<H2><A NAME="ss3.3">3.3</A> <A HREF="UserModeLinux-HOWTO.html#toc3.3">Examples</A>
</H2>
<P>Here are some examples of the kernel in action:
<UL>
<LI>
<A HREF="http://user-mode-linux.sourceforge.net/login.html">A login session</A> </LI>
<LI>
<A HREF="http://user-mode-linux.sourceforge.net/net.html">A virtual network</A> </LI>
</UL>
</P>
<HR>
<A HREF="UserModeLinux-HOWTO-4.html">Next</A>
<A HREF="UserModeLinux-HOWTO-2.html">Previous</A>
<A HREF="UserModeLinux-HOWTO.html#toc3">Contents</A>
</BODY>
</HTML>
|