Results 1 to 2 of 2
Hi,
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
run_init_process(execute_command) where
execute_command = "/init" ...
- 03-09-2006 #1Just Joined!
- Join Date
- Mar 2006
- Posts
- 3
How to execute a static program from the kernel.
Hi,
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
run_init_process(execute_command) where
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?
Please help.
- 03-09-2006 #2
Just change the execute_command argument to "/sbin/init" or wherever your custom init is located.


Reply With Quote
