[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

b-f testing and development with user-mode linux



I just recently packaged User-mode Linux for Debian
(http://user-mode-linux.sourceforge.net/).  During that time, it struck me
as being incredibly useful for several Debian-related tasks.  One of these
was development and testing of boot-floppies/debian-installer.

For those unfamiliar with the project, User-mode Linux is a port of the
Linux kernel to Linux userland.  It allows you to run a Linux kernel as a
user process under a normal Linux kernel.  I have done a complete
installation under UML using root.bin from boot-floppies 3.0.17-2001-11-18
and a UML kernel[0].

I think that this could prove useful to many of you in your debugging
efforts, as it makes it possible to, e.g., run gdb, easily copy files back
and forth to the host system using hostfs, and have access to tools like
strace and gdb without installing them on a separate partition or cramming
them onto installation media.  You can do all of this with only one system,
and without requiring root access.

Here's a screenshot to demonstrate:

http://people.debian.org/~mdz/uml-bootfloppies.jpeg

The package is called user-mode-linux, and it's now in unstable.  It
currently only works on i386, but it is theoretically possible to port it to
certain other architectures, and upstream is very interested in finding
people who have the necessary arch-specific knowledge and can do the work.
Some work has already been done on PowerPC, but it is currently stalled.

Naturally, it can't test all aspects of the installation process, but I
imagine that the more generic bits can be tested more easily this way.  Let
me know what you think.

[0] Well, it almost completely works.  There are a couple of caveats:

    1. The HD autodetection doesn't find the virtual disks, which use the
       ubd device.  This is easy to work around by mounting the device by
       hand and running MAKEDEV ubd in /target/dev before rebooting.  UML
       has a mechanism whereby the ubd devices can be accessed via major
       device 3 to look like IDE disks, but processes which try to access
       these devices hang indefinitely.  This is probably a UML bug, and it
       would be great to find it and fix it.

    2. /sbin/probe from pcmcia-cs seems to hang the system.  This can be
       worked around by disabling the PCMCIA controller in dbootstrap.  This
       is also probably a UML bug, and it would also be great to find it and
       fix it.

-- 
 - mdz



Reply to: