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.
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
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)
> Vivek Varghese Cherian wrote:
> Can some one provide me with pointers to the funtion of the /initrd
> directory in Debian ?
/initrd as with all other distro is used by the initrd.img file during
its bootup ( loading of modules ) during the kernel boot process
- in lilo/grub, if initrd=blah.img is not specified, than /initrd is not needed
> Can some one provide me with an explanation of the exact funtion of the
> /linuxrc executable in Debian ?
/linuxrc is required inside any blah.img ramdisk file to tell the boot kernel
what to do ...
usually: modprobe e1000
or more complicated things to load besides one module
> Can some one explain why the /usr/share/initrd-tools/linuxrc file does not
> have the executable flag set on my system ?
/usr/share/initrd-tools is like the man pages and reference only
and is never used
as you note /linuxrc should be root owned and executable
> Are /initrd and /linuxrc mutually exclusive ? (The presence of one causes
> the other not to be present)
no ... they are concurrcently required... if one initrd.img is used,
than both /initrd and /linuxrc is required
note, that /linuxrc is inside initrd.img
and that /linuxrc is NOT part of the normal system