Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
- Join Date
- Mar 2006
How to execute a static program from the kernel.
I am coding on the 2.6.11 linux kernel.
I need to run my program when the kernel is booting up.
I checked in init/main.c
execute_command = "/init" seems to be running
from the initrd image. I checked there is no init in /
If I comment this code and add my own init to /init or /sbin/init
and run it by calling execve("/init") or execve("/sbin/init")
the kernel builds fine, but does not boot up
and issues kernel panic : init not found...pass init= to kernel.
How can we add our own version of init and run it
instead of the kernel loading the init from its initrd image?
Just change the execute_command argument to "/sbin/init" or wherever your custom init is located.