ProjectsNewsDownloadDocumentationDeveloper toolsContact
Imagen izquierda
You are in: Main > WebDocumentation > EdgyInUML Edit - Attach

Running Ubuntu 6.10 Edgy inside Debian Etch using User Mode Linux

Prerequisites

Install the following packages in your debian:

  • usermodelinux
  • slirp

You'll also need to install ubuntu edgy debootstrap package. You can get the latest here: http://archive.ubuntu.com/ubuntu/pool/main/d/debootstrap/

Preparing bootstrap

First, you should create the file which will hold the filesystem image. I will create it using dd, with a size of 1GB.

# dd if=/dev/zero of=/opt/uml/ubuntu-root bs=1M count=1 seek=1000

Then, I formatted it with ext3:

# mkfs.ext3 /opt/uml/ubuntu-root

Then you should mount the filesystem for debootstraping it:

# mkdir /mnt/ubuntu
# mount -o loop /opt/uml/ubuntu-root /mnt/ubuntu

Now, it's time to bootstrap the ubuntu edgy:

# debootstrap --arch i386 edgy /mnt/ubuntu http://archive.ubuntulinux.org/ubuntu

With this you'll get a proper ubuntu edgy bootstrap. Now it will require some configuration.

Configuring ubuntu edgy bootstrap

First, I've filled the fstab (/mnt/ubuntu/etc/fstab).

/dev/ubd0   /   ext3   defaults   0 1
proc      /proc   proc   defaults   0 0

Then I've changed the hostname:

# echo "uml-ubuntu" > /mnt/ubuntu/etc/hostname

The /etc/hosts... (/mnt/ubuntu/etc/hosts):

127.0.0.1 localhost

The network interfaces /etc/network/interfaces (/mnt/ubuntu/etc/network/interfaces). I've defined this to use the slirp network mode.

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
   address 10.2.0.15
   netmask 255.0.0.0
   up    route add default dev eth0
   down  route del default dev eth0

Modification of securetty configuration:

#echo "tty0" >> /mnt/ubuntu/etc/securetty
#echo "ttys/0" >> /mnt/ubuntu/etc/securetty

I've also needed to add the user mode linux block device:

# cd /mnt/ubuntu/dev
# mknod --mode=660 ubd0 b 98 0

Finally I added a uml user to my uml installation:

# chroot /mnt/ubuntu
# adduser uml
  .... answer questions
# exit

Before trying to run the uml image, you should unmount it:

# umount /mnt/ubuntu

Running Ubuntu edgy and installing desktop

Now it's time to try the system you've installed. You should simply run:

# linux ubd0=/opt/uml/ubuntu-root eth0=slirp,,/usr/bin/slirp-fullbolt mem=256M

The fullbolt option enables slirp to run faster than a 115200 baud modem. I've also provided some memory to the UML, as the installation requires it.

I'm running Debian Gnome, and this starts the ubuntu, with one gnome-terminal per window. The root doesn't have any password, so I log in as root, and write:

(inside uml)
# apt-get update
# apt-get install ubuntu-desktop

This will download and install all the packages required for the gnome desktop.

References

-- JoseDapenaPaz - 21 Dec 2006

div class="twikiTopicInfo twikiRevInfo twikiGrayText twikiMoved"<&/div>-->

Igalia, S.L. © A Coruña-Pontevedra (Galicia), 2001-2007 - Aviso Legal - Política de privacidad
Igalia™ is a registered trademark of Igalia, S.L. Powered by TWiki