Ken Yap <ke...@nl...> writes:
> |You are free to do whatever you want within your initrd
> |image.
>
> Correct. A network loaded initrd is no different from one loaded from
> disk. What it does depends on its internals and the kernel parameters.
>
> |I think that once you exit the shell that is running, it will turn
> |around and run /bin/init. There's good docs in the /Documentation
> |directory for the Linux kernel.
>
> More correctly, linuxrc should exec /sbin/init because there is an
> implicit assumption in Unix that init has pid 1. This init should never
> exit. If you are not execing init, then linuxrc should never exit, or
> run/exec something that "never" exits, e.g. sleep 2^32-1.
If you have an initrd && exists /linuxrc on the initrd && root!=/dev/ram
Then
It is expected that /linuxrc will do some early setup and then exit.
In this case the /linuxrc script will not run with pid 1.
In this case the kernel continues on execs /sbin/init with pid 1.
Eric
|