linux-um archives
 help / color / mirror / Atom feed
From: Dan Shearer <dan@shearer.org>
To: user-mode-linux-user@lists.sourceforge.net,
	user-mode-linux-devel@lists.sourceforge.net
Subject: [uml-devel] ANSWER: Basics of compiling and running UML 2.6.[1,2]
Date: Sun, 8 Feb 2004 01:21:49 +1030	[thread overview]
Message-ID: <20040207145149.GK4203@erizo.shearer.org> (raw)

There's been a few questions on and off-list about this, hopefully this
will help until there's some tidying up done. The short version is that
UML on 2.6.[1,2] works quite well, even before Jeff's done a stable
release. I've probably missed things, please let me know.

These instructions are for those new to UML, not new to kernels and
distributions. The following might make your system unusable if you
don't know what you're doingi to a basic level. But enough detail is
given that if you *are* new to all this you aren't excluded from
destroying your system in the process of learning.

First, make sure you can compile a standard 2.6.x kernel without any UML
at all. You may need to upgrade your binutils. gcc 3.2.3 and 3.3.0 is
known to work.

You can get assorted patch sets for UML 2.6.[1,2] from
http://user-mode-linux.sourceforge.net/dl-uml-org.html and some a bit
more recent from http://web.tiscali.it/blaisorblade/index.html. These
don't quite compile for most people, but with the following twiddles it
should work:

1. The default config for um isn't set up correctly. Do 'make menuconfig
ARCH=um' and uncheck the following, all of which will prevent
compilation or linking:

	a) SCSI support / SCSI support

	b) UML-specific options / Highmem support

	c) Loadable modules support / Enable loadable module support

	d) Security options / Enable different security models

and add the following, without which UML is useless to most people:

	d) Block devices / virtual block device

There's some other slightly surprising omissions in the default as well,
so look carefully to see what you need. The Management Console is a good
idea to help with testing your new 2.6 UML kernel for example.

2. make linux ARCH=um should now work and give you a ~3Mb binary called
'linux' in the top-level directory. Don't get worried if it is massively
larger (debugging symbols, see the HOWTO) but that should not happen
with a normal 2.6 build system for UML used as described.

3. If you are running a 2.6.x host kernel and your new 2.6.x UML kernel
appears to hang just after initialising the console driver (eg by all
measures including commands such as 'uml_mconsole config con0' hanging
it seems to have stopped) then check to see if you have a NPTL-enabled
glibc. On RedHat or Debian systems running the 2.6 kernel you probably
have, and if this is the case UML will not work under any circumstances
(UML does not use the Native Posix Threading Library but glibc thinks
it should... see the archives for a sparse description of the problem.)

But never fear! Just recompile your own glibc without NPTL. Under Debian
this is done by:

-a) installing gcc 3.3 if you don't have it already

a) mkdir something; cd something; apt-get source glibc; cd
something/glibc-2.3.2.ds1/

b) export LINUX_SOURCE="/usr/src/tree-corresponding-to-2.6-host-kernel"
It might be nice if this kernel tree didn't vanish in the future too.

c) edit the file something/glibc-2.3.2.ds1/debian/sysdeps

	remove ntpl from the line "i686_add-ons"
	remove "__threads" from the line "i686_extra_config_options"

d) in the something directory type "dpkg-buildpackage" and wait for an
hour or two. Install the resulting .deb with "dpkg -i". No need to
remove /lib/tls as some have suggested, as far as I know.

-- 
Dan Shearer
dan@shearer.org


-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

             reply	other threads:[~2004-02-07 14:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-07 14:51 Dan Shearer [this message]
2004-02-07 15:55 ` [uml-devel] ANSWER: Basics of compiling and running UML 2.6.[1,2] BlaisorBlade

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040207145149.GK4203@erizo.shearer.org \
    --to=dan@shearer.org \
    --cc=user-mode-linux-devel@lists.sourceforge.net \
    --cc=user-mode-linux-user@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox