Doubts regarding /initrd and /linuxrc



I am using Debian GNU/Linux Sarge.

The output of the "uname -a" command is as follows

Linux hostname 2.6.8-2-386 #1 Tue Aug 16 12:46:35 UTC 2005 i686 GNU/Linux

The output of the "ls /" command is as follows:

user@hostname:~$ ls /
bin cdrom etc initrd lib media opt root srv tmp var
boot dev home initrd.img lost+found mnt proc sbin sys usr
vmlinuz

When i refer to the initrd manual using the "man initrd" command, I get the
following portion under the "BOOT-UP OPERATION" section.

"5. If the executable file /linuxrc is present in the initial root
file-system, /linuxrc is executed with uid 0." (The file /linuxrc must have
executable permission. The file /linuxrc can be any valid executable,
including a shell script.)


When I tried to find out the location of the executable file /linuxrc, I get
the following message.

hostname:/home/user# find / -name linuxrc
/usr/share/initrd-tools/linuxrc
/usr/share/discover/linuxrc
hostname:/home/user#

When i do a "ls -l -a" on /usr/share/initrd-tools/linuxrc and
/usr/share/initrd-tools/linuxrc, I get the following output.


hostname:/home/user# ls -l -a /usr/share/initrd-tools/linuxrc
-rw-r--r-- 1 root root 279 2005-05-26 19:44 /usr/share/initrd-tools/linuxrc
hostname:/home/user# ls -l -a /usr/share/discover/linuxrc
-rwxr-xr-x 1 root root 289 2005-02-03 19:24 /usr/share/discover/linuxrc
hostname:/home/user#

Here the /usr/share/initrd-tools/linuxrc file is not set as executable.

Later in the initrd manual under the "BOOT-UP OPERATION" section it says,

"7. If the normal root file has directory /initrd, device /dev/ram0 is moved
from / to /initrd. Otherwise if directory /initrd does not exist device
/dev/ram0 is unmounted. (When moved from / to /initrd, /dev/ram0 is not
unmounted and therefore processes can remain running from /dev/ram0. If
directory /initrd does not exist on the normal root file-system and any
processes remain running from /dev/ram0 when /linuxrc exits, the behavior
of the kernel is UNSPECIFIED. See the NOTES section for the current kernel
behavior.)"

Now here are my doubts,

Can some one provide me with pointers to the funtion of the /initrd
directory in Debian ?

Can some one provide me with an explanation of the exact funtion of the
/linuxrc executable in Debian ?

Can some one explain why the /usr/share/initrd-tools/linuxrc file does not
have the executable flag set on my system ?

Are /initrd and /linuxrc mutually exclusive ? (The presence of one causes
the other not to be present)


Thanks in advance.

--
Vivek Varghese Cherian


Relevant Pages

  • New Debian31r1 Install - help me optimize - TNT2 - sudo - KDE - Xwindows
    ... of futzin with a new debian ... install, which was needed after a munged KNOPPIX install (I know, I ... the command 'dpkg-reconfigure xserver-xfree86' (which allowed me to ... trying to get the SOUND working yet..there's what seems to be a PCI ...
    (comp.os.linux.misc)
  • Re: Command line reference
    ... Many linux books have discussions of rpm related stuff, ... Right now, I'm a Debian guy. ... know the command to start with. ... one of the many purposes of the lists is to act as a very ...
    (Debian-User)
  • Re: Alt-F2 then Synaptic launches firefox
    ... Debian Sid machine, running linux 2.6.10-1-386 and KDE 3.3.2. ... then I get firefox launching the page as mentioned. ... This seems to happen, exactly the same, when any command that is not ... > able to reproduce the problem. ...
    (Debian-User)
  • Re: So is this a kernel bug?
    ... From the Debian box, I've tried the ... > command from a terminal window in KDE, ... > command from the console, and again, the machine froze solid. ... > Is this a bug that should be reported to the kernel folks, ...
    (Debian-User)
  • Re: Goodbye Redhat?
    ... addded a 'service' command to Debian. ... is a command-line interface to execute System V style init script ... Please report any bugs using the Debian bug tracking system, ...
    (comp.os.linux.misc)