Custom kernels

Asked by Gianluca Guidi

Hello everyone,

I'm having problems with using custom kernels with marionnet.

I wrote a patch for UML and I have defined a couple of new parameters. My final goal is to slightly modify marionnet's code to allow users to graphically set these parameters.
The first step is building and running a regular UML with marionnet, but I'm currently unable to do that.

Whenever I try to run any kernel other than those provided by marionnet, the application crashes.
Could that be caused by my kernels not having the "ghostification" patch?
I read this README about ghostification:
http://www.marionnet.org/download/snapshots/stuff/patch/Linux_Kernel_Ghostification/README.ghostification
But it's not clear to me if this patch is actually required for marionnet to work properly.

I tried to apply that patch to a 2.6.18 debian kernel following this howto: http://www.marionnet.org/wiki/doku.php?id=documentation:howto:howto_custom_kernel , but the when compiling I get an error about a missing header: "arch/um/sys-x86_64/user-offsets.c:15:22: fatal error: asm/user.h: No such file or directory"
That's probably because linux 2.6.18 is very old, but I have not found more recent ghostification patches on the web.

I'm on debian wheezy 7.6 with linux 3.2.0 and I installed marionnet with the "marionnet_from_scratch" script. Everything appears to run fine except for custom kernels.

Thanks for your support

Question information

Language:
English Edit question
Status:
Solved
For:
marionnet Edit question
Assignee:
No assignee Edit question
Solved by:
Jean-Vincent Loddo
Solved:
Last query:
Last reply:
Revision history for this message
Best Jean-Vincent Loddo (loddo) said :
#1

Hi Gianluca,

> The first step is building and running a regular UML with marionnet,
> but I'm currently unable to do that.

In my opinion, the simplest way to do that is to give a look in the
repository to the script for making recent kernels:

uml/pupisto.kernel/pupisto.kernel.sh

The script is short and sufficiently commented to be used as
documentation. You can also find here some machines, built with
pupisto.buildroot/ (guignol) and pupisto.debian, running with new
kernels (3.2.x):

http://www.marionnet.org/download/testing/

The available .config files and ghostification patches used by
pupisto.kernel.sh are in the directory uml/kernel. Note that the script
has been tested only with 3.2.x kernels. The documentation in the wiki
is quite old and also for this reason the wiki still has a few weeks to
live.

> Could that be caused by my kernels not having the "ghostification"
> patch?

I don't believe that. This patch just allows marionnet to hide the
network interface dedicated to X11 related traffic, but it can run
without this setting.

> I wrote a patch for UML and I have defined a couple of new
> parameters.

What's the purpose of the patch you are working on? Don't hesitate to
publish it if you think that it could be interesting for other users. We
could eventually try to integrate it in the project.

J.V. Loddo

On Sat, 02 Aug 2014 15:17:10 -0000, Gianluca Guidi wrote:
> New question #252529 on marionnet:
> https://answers.launchpad.net/marionnet/+question/252529
>
> Hello everyone,
>
> I'm having problems with using custom kernels with marionnet.
>
> I wrote a patch for UML and I have defined a couple of new
> parameters. My final goal is to slightly modify marionnet's code to
> allow users to graphically set these parameters.
> The first step is building and running a regular UML with marionnet,
> but I'm currently unable to do that.
>
> Whenever I try to run any kernel other than those provided by
> marionnet, the application crashes.
> Could that be caused by my kernels not having the "ghostification"
> patch?
> I read this README about ghostification:
>
> http://www.marionnet.org/download/snapshots/stuff/patch/Linux_Kernel_Ghostification/README.ghostification
> But it's not clear to me if this patch is actually required for
> marionnet to work properly.
>
> I tried to apply that patch to a 2.6.18 debian kernel following this
> howto:
>
> http://www.marionnet.org/wiki/doku.php?id=documentation:howto:howto_custom_kernel
> , but the when compiling I get an error about a missing header:
> "arch/um/sys-x86_64/user-offsets.c:15:22: fatal error: asm/user.h: No
> such file or directory"
> That's probably because linux 2.6.18 is very old, but I have not
> found more recent ghostification patches on the web.
>
> I'm on debian wheezy 7.6 with linux 3.2.0 and I installed marionnet
> with the "marionnet_from_scratch" script. Everything appears to run
> fine except for custom kernels.
>
> Thanks for your support

Revision history for this message
Gianluca Guidi (gminded) said :
#2

Hi Jean-Vincent, and thanks for your answer.
In the meantime I found the scripts you mentioned, although that took me a while.
Maybe a little more documentation (or just a link from the main marionnet page) could help users to find these resources.
I was considering doing just that, by editing the wiki. Too bad it's going down!
Anyway your answer to my question could be useful for other users who are looking for new kernels / filesystems.

> What's the purpose of the patch you are working on? Don't hesitate to
> publish it if you think that it could be interesting for other users. We
> could eventually try to integrate it in the project.

The purpose of my patch is to offer the possibility to alter the virtual time so that it runs at different frequency than real time.
This could be useful for testing purposes, because from the point of view of a virtual machine whose time runs slower than normal, processor and network speed appear to be greater. In this way it is possible to emulate resources not yet available in real life, but which may be available in the future. Of the course the other way around is also interesting (low computation and network speed).
I plan to publish it as soon as everything is working. :-)

Just want to add that you created a really nice project, thank you for that!

Revision history for this message
Gianluca Guidi (gminded) said :
#3

Thanks Jean-Vincent Loddo, that solved my question.