[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: understanding /proc/cmdline
On Sat, 2 Oct 2004 23:05:26 +0900, aq <aquynh@xxxxxxxxx> wrote:
> Anybody please tell me which file in kernel source code to generate
> /proc/cmdline file?
jcm@perihelion:~/ppc64/linux-2.6.8.1/fs/proc$ grep -r cmd .
./proc_misc.c:static int cmdline_read_proc(char *page, char **start, off_t off,
./proc_misc.c: {"cmdline", cmdline_read_proc},
<and some other stuff>
In proc_misc.c we have a read function registered for that proc entry
called cmdline_read_proc which, as you can see, uses
saved_command_line.
saved_command_line is setup during kernel entry in head.S and setup.c,
although this varies according to the architecture you are using.
> And this is the content of my /proc/cmdline
>
> ~$ cat /proc/cmdline
> auto BOOT_IMAGE=Linux2681 ro root=303
> Please tell me what "root=303" means?
It's a device upon which your root filesystem resides - e.g. hda3 (see
the device entry numbers in /dev where you can see the 303 represents
a combination of major and minor number of the device).
Jon.
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive: http://mail.nl.linux.org/kernelnewbies/
FAQ: http://kernelnewbies.org/faq/