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

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
Reply to: