[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: initrd.gz generate



On Mon, May 26, 2008 at 06:38:37PM +0200, Anthony wrote:
> I try to understand how does the boot process is executed...
> 
> I suppose a special initrd.gz is created to execute the debian-installer 
> stuff,

Correct.

> But when and how does the initrd.gz is created.?
> (debian-cd scripts? debian-installer?)

It's created by the build process of the debian-installer source
package. This is a normal (well, normalish) Debian source package, so
you can look up elsewhere how those get built.

> which script lanch which executable...?
> 
> syslinux... => vmlinuz/initrd.gz => debian-installer => anna 
> scripts...... ????

syslinux launches the kernel with initrd.gz as a parameter. The kernel
unpacks the initrd into memory and calls /init (in the rootskel source
package). This does a few basic early setup tasks and then chains to
busybox init, which is configured to call /sbin/debian-installer-startup
in place of rcS and /sbin/debian-installer in place of rc. The initrd
contains the core components of the installer, enough to fetch more of
itself from the installation source; so anna eventually gets called some
way into the installer to fetch everything it needs to complete the
installation.

You can trace through most of the interesting userspace bits in the
rootskel source package.

Cheers,

-- 
Colin Watson                                       [cjwatson@debian.org]


Reply to: