Sthitaprajna forced the electrons to say:
> Can anyone point out how exactly the install process is?? 

In a typical scenario, the installation process can go like this:

When the kernel on the CD (or the boot floppy, or whatever) boots
up, it runs the init program (specified either via command line, as
linux init=/sbin/init, or hardcoded into the kernel source code). The
normal init that ships with CDs are what you get - the ones that read
/etc/inittab and runs the rc.d scripts etc. But the init programs that
ship with installable media are written for the specific distribution's
installation process.  These inits usually mount() /proc as the first
thing, redirect the kernel, syslog and stdout/stderr messages of programs
to various VTs and look in /proc for disk drives, CD drives, network
cards etc. The places are:

/proc/ide for IDE disks
/proc/scsi for SCSI disks
/proc/net/devices/pci for PCI hardware (display cards, network cards, SCSI
cards etc.)

The appropriate modules are loaded next, and the /dev entry for disk
drives are created (via the mknod() system call). Disk drives are now
partitioned, and software is installed. Usually they spawn the correct
program to partition, format disks (RHL execl()'s fdisk and mke2fs,
eg.). These partitions are then mounted somewhere, so that the disk
root filesystem is somewhere like /distro, and install software into
this new root (either by chroot()'ing there, or in the case of RPM
distros, rpm --root=/distro). It writes a lilo.conf there, and then,
after configuration of the system etc. (which mainly includes writing
configuration files like XF86Config and /etc/inittab), sync()'s,
umount()'s and reboot()'s the system.

Note that the actual bus probing is done by the kernel itself - the
installer's probe essentially is opening the files in /proc and parsing
the kernel supplied data there.

The installation is usually a two step process - the first init just
mounts the CD or whatever, and then spawns a second process. This allows
a very small init, which is usually statically linked, and capable
of fitting into a floppy with the kernel and modules. The second part
can be dynamically linked, with the shared objects on the installation
medium and with the init program setting LD_LIBRARY_PATH for the second
one. Also, The second binary can be on the installation medium.

Hope all that above makes sense.

Binand

PS: Disclaimer: This is my idea of how a linux installation should go,
with lots of input from the source code of anaconda, RHL's installation
program. There is no guarantee that this is what actually happens in
your favourite distribution, and if your distro does something else,
I am not responsible.

-- 
The prompt for all occasions:
export PS1="F:\$(pwd | tr '/[a-z]' '\134\134[A-Z]')> "
--------------- Binand Raj S. ([EMAIL PROTECTED])


-----------------------------------------------------------------------
For more information on the LIH mailing list see:
http://lists.linux-india.org/lists/LIH

Reply via email to