Welcome to the Linux Foundation Forum!

Single Binary with linux Kernel & filesystem

Options

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

Comments

  • ford
    ford Posts: 24
    Options
    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.

Categories

Upcoming Training