linux-um archives
 help / color / mirror / Atom feed
* [uml-devel] ANSWER: Basics of compiling and running UML 2.6.[1,2]
@ 2004-02-07 14:51 Dan Shearer
  2004-02-07 15:55 ` BlaisorBlade
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Shearer @ 2004-02-07 14:51 UTC (permalink / raw)
  To: user-mode-linux-user, user-mode-linux-devel

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [uml-devel] ANSWER: Basics of compiling and running UML 2.6.[1,2]
  2004-02-07 14:51 [uml-devel] ANSWER: Basics of compiling and running UML 2.6.[1,2] Dan Shearer
@ 2004-02-07 15:55 ` BlaisorBlade
  0 siblings, 0 replies; 2+ messages in thread
From: BlaisorBlade @ 2004-02-07 15:55 UTC (permalink / raw)
  To: user-mode-linux-devel

Alle 15:51, sabato 7 febbraio 2004, Dan Shearer ha scritto:
> 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
Yes, for now it's so.

> 	c) Loadable modules support / Enable loadable module support

> 	d) Security options / Enable different security models

For this two, instead, in my patches 
(http://web.tiscali.it/blaisorblade/index.html, as you quote) there are the 
fixes. However disable CONFIG_MODVERSIONS (that should work, but I don't test 
it heavily + it's useless).

> 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:

Wouldn't be better to suggest renaming /lib/tls to /lib/tls.off, as I've heard 
many times?
Also: check this site: http://uml.harlowhill.com/
that's a Wiki, i.e. anyone can edit it (no HTML-much simpler syntax). If you 
can put this guide in that site, people will probably use it very soon.

Bye
-- 
Paolo Giarrusso, aka Blaisorblade
Linux registered user n. 292729



-------------------------------------------------------
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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-02-07 15:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-07 14:51 [uml-devel] ANSWER: Basics of compiling and running UML 2.6.[1,2] Dan Shearer
2004-02-07 15:55 ` BlaisorBlade

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox