Usermodelinux

From Void Linux Wiki
Jump to: navigation, search
NOTE: The relevant packages have been removed, this page is for historic reference only.

VoidLinux on UserModeLinux (UML)

First of all you'll need to install uml tools

$ sudo xbps-install -Sy kernel-uml uml-utilities

Then we will need to create the disk image and install the base system

$ dd if=/dev/zero of=disk.img bs=1M count=512
$ mkfs.ext4 disk.img
$ sudo mount disk.img /mnt
$ sudo xbps-install -Syr /mnt base-system

Set the password for root:

$ sudo passwd -R /mnt

Let's boot!

$ linux root=6200 ubd0=disk.img rw

Killing terminals

$ kill -9 `ps auxw| grep xterm | grep uml| awk '{print $2}'`
$ pkill linux

Final notes:

Looks like there are some bugs in uml that will abort the system startup or fail on login. You may like to install base-system-busybox or just use init=/bin/sh to get a quick shell to run your services from inside the UML session.