Busybox Init

Rajeev Bansal rajeevb at intoto.com
Wed Dec 5 02:38:00 PST 2007


Hello Walter,

Please see below mentioned text which I extracted from 
"ramfs-rootfs-initramfs.txt"

What is initramfs?
83 <http://www.mjmwired.net/kernel/Documentation/filesystems/ramfs-rootfs-initramfs.txt#83>	------------------
84 <http://www.mjmwired.net/kernel/Documentation/filesystems/ramfs-rootfs-initramfs.txt#84>	
85 <http://www.mjmwired.net/kernel/Documentation/filesystems/ramfs-rootfs-initramfs.txt#85>	All 2.6 Linux kernels contain a gzipped "cpio" format archive, which is
86 <http://www.mjmwired.net/kernel/Documentation/filesystems/ramfs-rootfs-initramfs.txt#86>	extracted into rootfs when the kernel boots up.  After extracting, the kernel
87 <http://www.mjmwired.net/kernel/Documentation/filesystems/ramfs-rootfs-initramfs.txt#87>	checks to see if rootfs contains a file "init", and if so it executes it as PID
88 <http://www.mjmwired.net/kernel/Documentation/filesystems/ramfs-rootfs-initramfs.txt#88>	1.  _*If found, this init process is responsible for bringing the system the
89 <http://www.mjmwired.net/kernel/Documentation/filesystems/ramfs-rootfs-initramfs.txt#89>	rest of the way up, including locating and mounting the real root device (if
90 <http://www.mjmwired.net/kernel/Documentation/filesystems/ramfs-rootfs-initramfs.txt#90>	any).*_  If rootfs does not contain an init program after the embedded cpio
91 <http://www.mjmwired.net/kernel/Documentation/filesystems/ramfs-rootfs-initramfs.txt#91>	archive is extracted into it, the kernel will fall through to the older code
92 <http://www.mjmwired.net/kernel/Documentation/filesystems/ramfs-rootfs-initramfs.txt#92>	to locate and mount a root partition, then exec some variant of /sbin/init
93 <http://www.mjmwired.net/kernel/Documentation/filesystems/ramfs-rootfs-initramfs.txt#93>	out of that.


So according to them , its init responsibility to mount the real root 
device, I think VI init works in that way, but not sure about the 
busybox Init. Can anyone clarify me that?

I have post my question to LFS also.

Thanks
Rajeev Bansal.

walter harms wrote:
> Rajeev Bansal wrote:
>   
>> Hi Mike,
>>
>> Thanks for replying the query.
>>
>> I am not sure about this but don't you think when you run the command 
>> switchroot in init script, then its Init's job to remount the previous 
>> mounted root with read-write options.
>>
>> Thanks
>> -Rajeev
>>
>>     
>
>
> hi Rajeev,
> from 'man init'
>        Init  is  the  parent  of all processes.  Its primary role is to create
>        processes from a script stored in  the  file  /etc/inittab  (see  init-
>        tab(5)).   This file usually has entries which cause init to spawn get-
>        tys on each line that users can log in.  It  also  controls  autonomous
>        processes required by any particular system.
>
> obviously it is NOT the job of init to mount anything or even to know about mounting.
> he is starting and supervising processes nothing more. doing a UNIX from scratch is
> a huge undertaking. People from "linux from scratch" are much more prepared (and
> capable) than the busybox ml to explain details of a system start-up.
> see: http://www.linuxfromscratch.org/
>
> re,
>  wh
>
>
>   



********************************************************************************
This email message (including any attachments) is for the sole use of the intended recipient(s) 
and may contain confidential, proprietary and privileged information. Any unauthorized review, 
use, disclosure or distribution is prohibited. If you are not the intended recipient, 
please immediately notify the sender by reply email and destroy all copies of the original message. 
Thank you.
 
Intoto Inc. 



More information about the busybox mailing list