GNU, linux based systems, free software and other computer related things...

Trying User-Mode Linux

User-Mode Linux (UML) runs as an application process in user space. It provides Linux kernel emulation in user mode. It is a secure way of running Linux processes in a Linux host.

It can run mismatching linux kernel versions in the host and guest systems. Virtual resources in guest machine may be even greater than yhe actual physical computer ones.

The User-mode Linux Kernel Home Page.


We give a try to User-Mode Linux following the instructions in User-mode Linux Kernel Home page:

$mkdir User_Mode_Linux && cd User_Mode_Linux

Within this web page we can download an updated user mode linux kernel:
http://uml.devloop.org.uk

We download 2.6.31 version (latest one when this article was written):
$wget http://uml.devloop.org.uk/kernels/kernel32-2.6.31.bz2

We uncompress it an give execution permissions:
$bunzip2 kernel32-2.6.31.bz2
$chmod a+x kernel32-2.6.31

The linux kernel only is not enough to have a whole GNU/Linux system. We need also a filesystem with preinstalled applications and libraries:
http://fs.devloop.org.uk

There are several preinstalled filesystem to choose. I select a Debian 4.0 one:
$wget http://fs.devloop.org.uk/filesystems/Debian-4.0/Debian-4.0-x86-root_fs.bz2

We uncompress it:
$bunzip2 Debian-4.0-x86-root_fs.bz2


Now we can execute user mode linux executable:
ubda parameter is set to the filesystem we have just downloaded.
mem argument sets the memory we assign to user mode linux.
$./kernel32-2.6.31 ubda=Debian-4.0-x86-root_fs mem=500M

There is no root password set in the filesystem, we just type root and press enter:
login: root # no password needed.

When we want to shutdown user mode linux, we can execute:
#halt
or
#shutdown -h 0

You can freely copy, change or create derivative works from this page contents, only requisite is adding a link to this web page.