Marcelo E. Magallon | 30 Mar 17:41 2016

[uml-user] Strange behavior when trying to use UML with Yocto


I apologize in advance for the fuzzy details, but I'm hoping someone can 
ask the right questions to provide that missing information.

A couple of people are trying to integrate UML with a Yocto-based 
distribution called OpenSwitch ( The relevant 
change request can be seen here:

The OPS build process builds a full kernel and userspace, and Christian 
did a proof of concept integrating UML with that build process. 
Everything *seems* to be working fine, except that we are seeing strange 
behaviors at runtime.

Christian build the whole thing inside a VM, which has Debian 8 
installed. When he tries to boot the image, everything works fine.

When I try to reproduce Christian's results, I use a computer with 
Debian 8 installed in it (no VM), generate the image and boot. That 
alone seems to work, but several components inside the system exhibit 
strange behavior. OPS uses systemd, and journald starts spewing out 
messages about not being able to write a log entry. There's another 
component (OVSDB) which has a helper program create a database for it at 
boot time, and that component is behaving in a strange manner: it reads 
a file to translate it into a different format, and although strace does 
not reveal any errors, the output file is truncated (filesystem is 
ext4). There's also an issue with OpenSSH generating keys at boot time, 
and those keys are also truncated.
(Continue reading)

Ashwanth kumar | 28 Mar 20:08 2016

[uml-user] Login prompt not seen


I am trying to run UML on linux-4.4.6 with rootfs created by closely following this link except for the inittab part.
I do not see the login prompt when i run it. But i am able to connect to the virtual consoles using screen.

Do not see output file descriptor for con0. Am i missing something in my rootfs?
$ uml_mconsole VoTvJ8 config con0
OK fd:0

Attaching the stdout from running below cmd
$./linux ubd0=../rootfs mem=256M 

Attachment (uml_stdout): application/octet-stream, 15 KiB
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
User-mode-linux-user mailing list
User-mode-linux-user <at>
mr.q | 14 Jan 08:24 2016

[uml-user] reboot guest OS ??? is it possible ?

Hello all,

I recently investigate on UML, and i have a little issue with the way system
reboots. (btw i dont know if this the way to go *really*)

My config is for host: debian jessie out of the box..
for guest OS i try several kernel and filesytstem but both hangs with the same
FS1 : debootstraped fs from Debian jessie
FS2 : filesystem Debian jessie.

Kernel1: 3.16 custom compiled kernel (.config from
Kernel2: linux.uml debian kernel from package user-mode-linux
Kernel3: compiled kernel 3.18

if i launch 1 station and reboot from the guest OS shell, i saw on the host a
uml_watchdog process that seems to kill my guest OS few seconds after...

I cant find any documentation concerning this uml_watchdog, can't figure out how
it spawn from guest OS reboot...

but i am quite sure it is the culprit since copying /bin/true
to /usr/bin/uml_watchdog solve the issue... however i still have defunct process
(ex uml_watchdog).

The source of this uml_watchdog.c i found on internet doesnt make me much sense
since it looks like just looking from input on stdin ?.

Btw UML Watchdog timer is enabled on the guest OS.. not sure it is correctly
running since the quest OS complains about error on device 130 which is

Does anyone have clue about uml_watchdog ???

I definitively think reboot somewhere else from uml_mconsole is a *BAD* idea....

more coming....

Trying to share the same root filesystem on 2 UML:

linux.uml ubda=/tmp/m1.cow,./filesystem mem=256M con0=fd:0,fd:1 con=null
linux.uml ubda=/tmp/m2.cow,./filesystem mem=256M con0=fd:0,fd:1 con=null

if i launch these 2 stations and reboot them from shell at the same time, one
hang, the other reboot fine.

and as usual it looks ok if i do this from uml_mconsole xxx reboot .

The bad news is that i would like to give user the opportunity to rebbot a guest
OS without giving access to the host....

Any help greatly apprciated, since i spend much time trying to debug this issue.
I can still do further investigation...


Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
Ricardo Nunes | 24 Nov 17:30 2015

[uml-user] New IRQ support

I've already made that question a few weeks ago but I couldn't make it work.

So, in order to support new IRQs I understand that we need to follow those steps:

  1. Add the IRQ IDs to /kernel/arch/um/include/asm/irq.h, or at least change LAST_IRQ macro value to the bigger IRQ ID;
  2. Create one file per IRQ: is that a host or UML file? I'm trying to follow random driver example but /dev/random exists in both;
  3. When I need to throw an IRQ I just have to write something on the file and send a SIGIO signal. Which process needs to receive the SIGIO?

In my system I'm using the original driver and using a userspace application to emulate the hardware (communication through netlink sockets). So, the emulator decides when IRQs needs to be launched and, at the moment, communicates that to the kernel driver.

Go from Idea to Many App Stores Faster with Intel(R) XDK
Give your users amazing mobile app experiences with Intel(R) XDK.
Use one codebase in this all-in-one HTML5 development environment.
Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs.
User-mode-linux-user mailing list
User-mode-linux-user <at>
Balaco Baco | 12 Nov 01:15 2015

Re: [uml-user] Website is in need of many small changes and updates?

On Sat, Oct 31, 2015, at 05:46, Richard Weinberger wrote:
> Am 31.10.2015 um 02:12 schrieb Balaco Baco:
> > I do not have a final working step by step from zero until now. One is
> > giving compiling errors. The working UML (unknown origin, I don't know
> > how I made that before) + Debian64 downloaded (and how changed a bit
> > after booting it)... but it has no network, and I don't know why is
> > that. Can you tell? Not even a ping works: "Network is unreachable". The
> > host machine is normal, of course.
> As with any virtual machine you need to connect your VM somehow to your
> host.
> tap is a common way. The website has instructions. Old, but still valid.

I just saw this unread message. And there is a few things to say about
this one. :)

Some old instructions in the website do not work. For example, the
kernel version used there was not practical for me. And you also said
it's too old - although I won't mind that fact alone.

> > Basic question: how to shutdown a running UML? How are we suppose to do
> > it? Running 'shutdown now' from that Debian does not turn it off. Must I
> > open another SSH session to kill it, or just close the session if
> > nothing else is needed?
> What about "poweroff"? As with any Linux.

I have never heard about poweroff. In all the years I have used linux
(more than a decade) I always used shutdown to... to turn off the
computer (I would say "to shutdown"... but that would be too funny

Debian has poweroff too. It worked. :-/ (but I swear I never used it...
and "shutdown now" always worked in real machines, to turn them off...)

> > I'm used as a base to
> > what I have done (although I "updated" the suggested version there, as
> > discussed before). And changed almost nothing in the default config
> > before compiling...
> > 
> > When I have something that works, that source.html page is easy to
> > improve and needs many changes. Output of wget... not useful at all - we
> > surely can assume users will know how to download and extract files,
> > right?
> I assume that an user is able to build a kernel.

Fair enough. But I think that UML should be also aimed at users without
much knowledge in kernel compilation because sometimes we could just
want a virtual and easy, although safe, "root power". The reason why I'm
trying to get UML to work right now is one of these cases.



-- - Same, same, but different...

Balaco Baco | 11 Nov 17:13 2015

[uml-user] Detail with one config warning

There is one details that did not work for me, but it was easy to "fix"
(quotes because I'm not sure it is the best fix). But someone else may
find it useful.

Detailed steps so everyone can compare doing it, if needed:

>  1. get one kernel source package from
>  (I tried these steps with more than one option, searching for the older and more stable
>  version; if the results are different for you, try another one; below I copied my 4.2.6 try; 3.18 does not
have this problem)

>  2. extract it.
$ tar xJf ...
$ cd lin<TAB>

>  3. first step...
$ make defconfig ARCH=um #uml1

*** Default configuration is based on 'x86_64_defconfig'
kernel/time/Kconfig:157:warning: range is invalid
# configuration written to .config

> That warning is strange. I did not like it. So I just edited that file, and changed it! :D hehehe

$ vim kernel/time/Kconfig  # if it spitted a diff for line 157:
-        range 1 NR_CPUS
+       range 1 1

> So, again...
# make defconfig ARCH=um #uml1
*** Default configuration is based on 'x86_64_defconfig'
# configuration written to .config

> So, assume the next steps have no problem, except that I don't know
> how to make my UML access the Internet... this is in another
> discussion, though

> ... ?
$ make menuconfig ARCH=um #uml2

> Build it
$ make ARCH=um #uml3 uml4 uml5

> Run it now... but where is my Internet? :( hehehehe

$ ./vmlinux # the output name changed!? :P



-- - Access your email from home and the web

Balaco Baco | 30 Oct 17:02 2015

[uml-user] Building from source problems and possibilities

I restarted, now I've got another kernel source (, knowing
that it may be old, but it's the "newer old" for 2.6, and I hoped that
it would work.

Steps done:

1. downloaded https://cdn. kernel
2. extract with tar cJf (whatever)
3. A few commands:
    make defconfig ARCH=um          
    # config is saved on a file, to be restarted from a known point
    whenever needed
    make menuconfig ARCH=um
    make mrproper                    # zero start guarantee when
    repeating these steps
    make mrproper ARCH=um   #  "
    make ARCH=uml                   

4. It stops a few seconds after, with a few errors that may be simple to

arch/um/os-Linux/start_up.c: In function 'check_coredump_limit':
arch/um/os-Linux/start_up.c:340:16: error: storage size of 'lim' isn't
  struct rlimit lim;
arch/um/os-Linux/start_up.c:341:2: error: implicit declaration of
function 'getrlimit' [-Werror=implicit-function-declaration]
  int err = getrlimit(RLIMIT_CORE, &lim);
arch/um/os-Linux/start_up.c:341:22: error: 'RLIMIT_CORE' undeclared
(first use in this function)
  int err = getrlimit(RLIMIT_CORE, &lim);
arch/um/os-Linux/start_up.c:341:22: note: each undeclared identifier is
reported only once for each function it appears in
arch/um/os-Linux/start_up.c:349:22: error: 'RLIM_INFINITY' undeclared
(first use in this function)
  if (lim.rlim_cur == RLIM_INFINITY)
arch/um/os-Linux/start_up.c:340:16: warning: unused variable 'lim'
  struct rlimit lim;
cc1: some warnings being treated as errors
make[1]: *** [arch/um/os-Linux/start_up.o] Error 1
make: *** [arch/um/os-Linux] Error 2


Do you know the reason for these two errors? And how I should fix them?



-- - Does exactly what it says on the tin

Richard Weinberger | 29 Oct 14:18 2015

Re: [uml-user] Possible ways to execute

Am 29.10.2015 um 14:14 schrieb Balaco Baco:
> Really!? I wish I had read that somewhere. Well, just retried with
> another option that is there for me. It is one of the cases I detailed
> before that end with error.
> The full execution, right now, is:
> ==========================
> $./linux-2.6.24-x86_64 ubda=Debian-Wheezy-AMD64-root_fs mem=128M

Linux 2.6.24?! SRSLY?


Balaco Baco | 29 Oct 12:28 2015

[uml-user] Possible ways to execute

A few weeks ago, after more struggling than I expected, I was abble to
run UML. I recompiled the linux kernel from source; I did not use the
root fs files available in the website, and found a Debian that seems to
suit my needs.

But yesterday I tried to execute it again, it did not work. The fact
that yesterday I tried it through SSH makes a difference?

Most of the command lines I had in my Bash history (long enough to have
almost everything I did in the previous session with this problem). None
of them worked. Most of them just seg fault in the beginning of
execution. Error related to root fs (surprise for me!). Just two of the
commands I tried did not seg fault immediatelly; but they also give no
output, and I had to start another SSH session, at the same time, to be
able to kill it (since ctrl+c and any other keyboard shortcuts) would be
"processed" my uml. I'm not sure what to do now.

This command line I executed right now:

./linux-2.6.24-x86_64 ubda=Debian-Wheezy-x86-root_fs  mem=128M 

Execute in the folder where the root fs file exists, gives ONLY this
output (almost immediatelly). It is through SSH. Is there a problem
here? I expected an user/password "screen" or anything similar.

The whole output I have for the above command, and I will let it waiting
for several minutes, is:

Core dump limits :
	soft - 0
	hard - NONE
Checking that ptrace can change system call numbers...OK
Checking syscall emulation patch for ptrace...OK
Checking advanced syscall emulation patch for ptrace...OK
Checking for tmpfs mount on /dev/shm...nothing mounted on /dev/shm
Checking PROT_EXEC mmap in /tmp/...OK
Checking for new_mm and switch_mm support in the host:
	/proc/self/mm ... Failed - 
No such file or directory
Checking for the skas3 patch in the host:
  - /proc/mm...not found: No such file or directory
  - PTRACE_FAULTINFO...not found
  - PTRACE_LDT...not found
UML running in SKAS0 mode
Adding 29876224 bytes to physical memory to account for exec-shield gap
Linux version 2.6.24-g91525300-dirty (jdike <at>
(gcc version 4.1.1 20070105 (Red Hat 4.1.1-51)) #1 Mon Jan 28 12:03:41
EST 2008
Built 1 zonelists in Zone order, mobility grouping on.  Total pages:
Kernel command line: ubda=Debian-Wheezy-x86-root_fs mem=128M root=98:0
PID hash table entries: 1024 (order: 10, 8192 bytes)
Dentry cache hash table entries: 32768 (order: 6, 262144 bytes)
Inode-cache hash table entries: 16384 (order: 5, 131072 bytes)
Memory: 122164k available
Mount-cache hash table entries: 256
Checking that host ptys support output SIGIO...Yes
Checking that host ptys support SIGIO on close...No, enabling workaround
net_namespace: 120 bytes
Using 2.6 host AIO
NET: Registered protocol family 16
NET: Registered protocol family 2
Time: itimer clocksource has been installed.
IP route cache hash table entries: 2048 (order: 2, 16384 bytes)
TCP established hash table entries: 8192 (order: 5, 131072 bytes)
TCP bind hash table entries: 8192 (order: 4, 65536 bytes)
TCP: Hash tables configured (established 8192 bind 8192)
TCP reno registered
Checking host MADV_REMOVE support...OK
mconsole (version 2) initialized on
((! the above line was manually changed for this message; and the
working folder is a subfolder in my home folder !))
VFS: Disk quotas dquot_6.5.1
Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
io scheduler noop registered
io scheduler anticipatory registered (default)
io scheduler deadline registered
io scheduler cfq registered
TCP cubic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
Initialized stdio console driver
Console initialized on /dev/tty0
console [tty0] enabled
Initializing software serial port version 1
console [mc-1] enabled
 ubda: unknown partition table
kjournald starting.  Commit interval 5 seconds
EXT3-fs: mounted filesystem with ordered data mode.
VFS: Mounted root (ext3 filesystem) readonly.
request_module: runaway loop modprobe binfmt-464c
request_module: runaway loop modprobe binfmt-464c
request_module: runaway loop modprobe binfmt-464c
request_module: runaway loop modprobe binfmt-464c
request_module: runaway loop modprobe binfmt-464c


What do you suggest to try?



-- - A fast, anti-spam email service.

Ricardo Nunes | 28 Oct 17:36 2015

[uml-user] Any reason for a kernel thread not run after calling schedule()?


I'm making a UML driver to adapt a real driver to UML and hardware emulation.

In this case I have a kernel thread trying to read a register, which is now done through a netlink channel to a userspace application (asynchronous response) but inside a synchronous function (the function that I'm implementing returns the register value). The first attempt was done doing:

Kernel thread
sleeping_task = current; set_current_state(TASK_INTERRUPTIBLE); schedule();

Netlink new message callback


But the kernel thread never runs again, unless I call schedule() in netlink callback function after wake_up_process, which will make that callback being blocked. I also tried using wait_queue but after the same result I saw the functions and realised that they also use schedule for putting the process to sleep.

This worked in a "real" linux module (not with netlink callback, but between 2 kernel threads), I don't understand why shouldn't in UML. Any reason you might remember?

I'm using 4.2.1 Kernel with a Debian Jessie distro.

User-mode-linux-user mailing list
User-mode-linux-user <at>
Ricardo Nunes | 22 Oct 13:29 2015

[uml-user] IRQ support?

I'm trying to use a real hardware driver inside UML and I,ve come to the IRQ suppor part.

Right now it's failing on request_irq call, so my question is if there is any manual on how to support this method calls in UML or if it's supposed to work as it is.

I need to register IRQs and raise them. After a few searches I saw SIGIO module and everything, but it didn't help enough.

What's the best way to support this?

User-mode-linux-user mailing list
User-mode-linux-user <at>