as on man pages of initrd
http://www.netadmintools.com/html/initrd.man.html
What I understood is executable /linuxrc determines what is needed to
(1) mount the normal root file-system (i.e. device type, device
drivers, file system) and (2) the distribution media (e.g. CD-ROM,
network, tape, ...). This can be done by asking the user, by auto-
probing, or by using a hybrid approach.
I want to be able to create an initrd which I can give to my friend
who can start installation from it . by mounting root on cd or dvd
etc. Starting from scratch.
> What I understood is executable /linuxrc determines
>
Well, actually, no. /linuxrc is just the first executable startet in the old
(mountable filesystem) version of initrd.
Newer kernels (don't remember exactly when the transistion was) need an
initramfs (cpio archive) initrd and start /init inside that initrd instead
of /linuxrc. /init usually is a shell script resembling the contents of the
old /linuxrc.
>
> I want to be able to create an initrd which I can give to my friend
> who can start installation from it . by mounting root on cd or dvd
> etc. Starting from scratch.
>
Well, the initrd from the installation DVD achieves exactly that. If you
want to build a similar thing from scratch, why don't you just investigate
it further? If you just want to add own startup code to the initrd, add
a "vendor_init.sh" file to it and make it executable.
If you want to create an initrd from scratch, you need an /init executable
(may be a shell script), a shell if you want to execute any shell script
(of course), kernel modules, the "insmod" executable, and an executable
which does the pivot_root() system call and calls init at the end of
the /init script, this is e.g. bin/run-init from the installation DVD, but
the "pivot_root" command will work, too.
You may put all these components into the base directory of the initrd for
simplicity reasons.
Kind regards
Jan
> If you want to create an initrd from scratch, you need an /init executable
> (may be a shell script), a shell if you want to execute any shell script
> (of course), kernel modules, the "insmod" executable, and an executable
> which does the pivot_root() system call and calls init at the end of
> the /init script, this is e.g. bin/run-init from the installation DVD, but
> the "pivot_root" command will work, too.
>
> You may put all these components into the base directory of the initrd for
> simplicity reasons.
Thanks a lot you again got exactly what I needed. To do this /init
executable do I need a busybox to statically link the executables with
the script.