Nagafix.co.uk UML Resources

Warning: Before reporting problems, please always make sure that you are running an up to date host and guest kernel.

HowTo

In order to run a UML instance, you will need an operating system running the Linux kernel (referred to as the host) and a UML kernel with its own filesystem (the guest).
You can find both UML kernels and filesystems below.
Starting an instance can be as simple as:

./kernel ubd0=./root_fs

Filesystem Images

These images were made as small as possible: no unnecessary services, just dhcp network settings and ssh.
Older releases are available here (no longer supported)

Last updated on the 28-03-2008

These images will be updated regularly so that they can be used safely as-is, without needing too many security updates.
Some recent distributions require TLS support which is only supported in the latest series of kernels.

To our knowledge, publishing these images is allowed in accordance with the licenses under which these operating systems are distributed (mainly, the GPL). We include links to all the packages that we have used to create these images and the source can be found on the same servers.
If you believe this is not the case, please contact us.

Kernels

These kernels have been compiled using GCC 3.4.4 to GCC 4.1.1. (older kernels with 3.4.4, latest kernels with 4.1.1)
They are provided for your convenience only (to get you started), but it is highly recommended that you build your own kernels - it is even mandatory if you want to use certain features (like pcap packet capture). To compile your own kernel based on those above, simply save the relevant config file as '.config' in your kernel source tree and run: 'make ARCH=um oldconfig; make ARCH=um'. The "am1" collection of patches are here. Older versions here
More kernels here (Blaisorblade's kernels)

Basics

The network is configured to use DHCP and the system will start an ssh server so that you can login.
The system should start a login on the console.
The root password has been left blank (ssh does not allow root login).
If you are using the kernels and filesystems from this site, this command should boot straight into the guest system that you have downloaded:

./kernel ubd0=./root_fs

Usage Examples

In order to make the best use of the disk images above and have a network connection to play with, use a command line similar to this one:

./kernel32-2.6 ubd0=./root_fs eth0=tuntap,tap1,fe:f0:00:00:00:01,192.168.1.254 con0=fd:0,fd:1 root=/dev/ubda

This will boot a kernel and provide a virtual ethernet interface attached to the tap device tap1, to create this device you will need to build the tunctl utility (which is part of the uml utilities, available here). The main console (con0) will be attached to the standard input/output of the current terminal the kernel is started from, which will allow you to login to the system.
To ensure that the guest obtains an IP address, you must start a DHCP deamon prior to booting the kernel. ie:

tunctl -t tap1
ifconfig tap1 192.168.0.1
dhcpd tap1
The dhcp configuration file (generally stored in /etc/dhcpd.conf) would look like this:
default-lease-time 6000;
max-lease-time 72000;
option domain-name-servers 192.168.0.1;
option routers 192.168.0.1;
server-name "192.168.0.1"
ddns-update-style none;
subnet  192.168.0.0  netmask  255.255.255.0  {
 range 192.168.0.100 192.168.0.254;
}
Note: you may have to use your DNS IP for the domain-name-servers (which you can grab from the host's /etc/resolv.conf) if the host does not have its own DNS.
Next you need to allow the host to forward packets to and from the guest:

echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -I POSTROUTING -o eth0 -j MASQUERADE
iptables -I FORWARD -i tap1 -j ACCEPT
iptables -I FORWARD -o tap1 -j ACCEPT

Links

Feedback

We welcome feedback and suggestions, either here or on the UML mailing lists.