[klibc] Query on Initramfs' and Initrd's coexistence

Milton Miller miltonm at bga.com
Wed Apr 6 08:19:45 PDT 2005

On Wed Apr 6 03:46:28 PDT 2005 Rachita Kothiyal wrote:
> 2. This issue is irrespective of issue 1. I was wondering how I would 
> be
> spawning the real init after the real_root_dev has been mounted....
> In the normal booting case(i.e. without initramfs) prepare_namespace()
> returns and /sbin/init is executed
> in init/main.c:init(). But, in the initramfs case, since 
> prepare_namespace
> is not called, this needs to be done in my init application on 
> initramfs.
> Klibc does not support threads. Am i right here? So when I 'exec' 
> linuxrc
> after mounting initrd, it will never return to the calling function, 
> and
> all that linuxrc does is to pivot_root to the real_root_dev. How do I
> execute the real init in this case?
> Please tell me if I am missing something.

If you look closer you will notice that do_linuxrc is run in a seperate
process.  You should fork before execing linuxrc.


More information about the klibc mailing list