adding linuxrc to initrd - Suse

This is a discussion on adding linuxrc to initrd - Suse ; I need some help in modifying the initrd on installation DVD of one of the distributions it does not have the linuxrc script by the same name rather it has linuxrc.conf file and an init script which I guess is ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: adding linuxrc to initrd

  1. adding linuxrc to initrd

    I need some help in modifying the initrd on installation DVD of one of
    the distributions it does not have the linuxrc script by the same name
    rather it has linuxrc.conf file
    and an init script which I guess is the same as the linuxrc because
    without it I can not start installation ,I would like to know how to
    create a initrd file that has linuxrc also if some one can point to
    sample linuxrc
    and any documentation for making initrd from scratch (ex busybox etc)
    not from the mkinitrd script that works that would be great.


    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.


  2. Re: adding linuxrc to initrd

    Velocity schrieb:

    > 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

  3. Re: adding linuxrc to initrd



    > 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.


+ Reply to Thread