Which file in
/proc gets read by the kernel during the boot up process? This was a question on my LPIC 101 test that I think I might have answered wrong. I searched on google and some other places but wasn't able to find an answer. Hoping one of you could provide. Thanks!
My question is, which file in /proc gets read by the kernel during the boot up process? This was a question on my LPIC 101 test...
Sounds like a trick question. The files in
/proc aren't real files on disk (this is why they have a size of 0) and the nodes don't exist until the kernel mounts a
procfs file system there and populates it.
Procfs and sysfs files are kernel interfaces. When you read a file in
/proc, you are asking the kernel for information and it will supply it. That information is not stored in that file -- nothing is. When you write to a file in
/proc, you are sending the kernel information, but again, the information will not be stored in that file.
This is possible because the kernel is the gatekeeper to file access generally. All file access involves system calls, i.e., they must pass through the kernel.
So I would say the answer here is that it does not read any files in
/proc at boot or at any other time. This would be like dialing your own phone number.
I think the answer they were looking for is /proc/cmdline
"This file shows the parameters passed to the kernel at the time it is started. A sample /proc/cmdline file looks like the following: ro root=/dev/VolGroup00/LogVol00 rhgb quiet 3 This tells us that the kernel is mounted read-only (signified by (ro)), located on the first logical volume (LogVol00) of the first volume group (/dev/VolGroup00). LogVol00 is the equivalent of a disk partition in a non-LVM system (Logical Volume Management), just as /dev/VolGroup00 is similar in concept to /dev/hda1, but much more extensible. " -redhat