Linux.com

Home Linux Community Forums Programming and Development Kernel Development Single Binary with linux Kernel & filesystem

Single Binary with linux Kernel & filesystem

Link to this post 02 Jul 09

Hi guys,

I would like to get suggestions on how to create a single binary with linux kernel & filesystem.
Currently i have linux kernel & filesystem as two separate binaries running on mips platform. I intend to have a single binary which should contain both kernel & filesystem. Can somebody guide me on this? Is there a tool available to combine both kernel & filesystem in to one?

This is my first post in this forum. I hope to get valuable suggestions from experts.

Regards,
Joe

Link to this post 14 Aug 09

The Linux kernel is not setup to be run that way. The kernel separates memory into kernel space and user space. You can hack the kernel and have things built into it, but the kernel will look for the filesystem externally from itself in user space... if that makes any sense... I suck at wording things.

So, in a short form. not possible.

However, you could have a single file... just not an executable. You could make something like rootfs.ext2 which would be a single file with a file system inside of it, and a kernel inside of that, but you would have to loop mount the file somehow.

I could be wrong, but as far as I am aware you cannot merge the kernel and filesystem into a single executable.

Who we are ?

The Linux Foundation is a non-profit consortium dedicated to the growth of Linux.

More About the foundation...

Frequent Questions

Join / Linux Training / Board