Simon Wood writes:
>
> I posted this earlier this morning but it hasn't appeared - so I'm trying
> again.
>
> Well I had another play last night and didn't find the solution as to why
> init isn't completing the login sequence.
> The last message is 'Loading Init' and then it gets stuck in a loop....
>
> Here's the system call log, can anyone see the problem?
It looks as though the child of init created by the fork is exiting after
it calls execve(), which appears to be failing without making a system
call. This could happen at this point in libc/syscall/exec.c:
if( argv_len < 0 || envp_len < 0 || stack_bytes <= 0
|| (int)(stk_ptr = (char*)sbrk(stack_bytes)) == -1)
{
errno = ENOMEM;
return -1;
}
and this appears to be the only place.
I had most success with SIBO ELKS when I forgot about init, and just got
the kernel to boot a shell directly. Once we have exec working reliably,
then try and boot the system the complex way.
init needs to be modified so it can be compiled not to use the UTMP file,
and I will sort this out before the next release. You could try hacking it
for now. Also try #define DEBUG so init will report its status, and why
exec fails.
Al