User mode Linux on Debian

From MalaWiki

Jump to: navigation, search

This page is still a draft.

Contents


[edit] The usermode kernel

[edit] Binary packages

Debian is shipping a pre-built usermode linux kernel that is compiled using the official linux-source-2.6 packages and can be installed simply issuing:

aptitude install user-mode-linux

Here you go, now read the linux(1) manpage and get a root filesystem either by building your own or getting one on-line.

[edit] Building from source

You have 3 main options:

  • re-build the user-mode-linux package from source
  • build a linux-uml package using make-kpkg
  • build an unpackaged kernel either from kernel.org or from Debian sources

[edit] build user-mode-linux from source

Get the source and build dependencies:

apt-get source user-mode-linux
apt-get build-dep user-mode-linux

Current (> 2.6.20-1um-1) packages contain a debian/rules make script with useful targets to customize the user-mode kernel configuration, run

./debian/rules menuconfig

to fire up the kernel configuration tool (NCURSES based), add/remove options and exit normally, the script will update the internal configuration file used to build the package. Now run

dpkg-buildpackage -uc -us -b -rfakeroot

or, if you want to avoid cleaning the build directory and decompressing the kernel's tarball again,

fakeroot ./debian/rules binary

[edit] make-kpkg --arch um

make-kpkg (from kernel-package) is the Debian tool to build Linux kernel .deb packages.

[edit] build a kernel.org kernel

I will focus on vanilla kernels as the procedure is the same for Debian kernels.

[edit] The root filesystem

To boot your user mode kernel you will also need a proper filesystem with at least the basic Operating System tools and utilities.

[edit] Using rootstrap

[edit] Manually

[edit] Additional resources

Personal tools