[Top][All Lists]

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

kernel command line

From: Marcus Brinkmann
Subject: kernel command line
Date: Fri, 4 May 2001 22:26:18 +0200
User-agent: Mutt/1.3.15i


I was wondering about host_get_boot_info and if it could be used to provide
/proc/cmdline in Neals procfs.  I don't know about any standard interface to
get a kernel command line.

Well, Mach simply returns an empty string on that call (see kern/machine.c).
I don't know if it should return the kernel command line, as it is a
multiboot command line and passed to the module, but as the kernel does some
parsing on that on its own ("-d" for kernel debugger), it seems it should.

Anyway, direct Mach access is not preferred anyway, it would be good to have
it in the Hurd layer.  It almost is since Roland implemented to pass the
MULTIBOOT_CMDLINE environment variable in kern/bootstrap.c.

This can be pasted into the bootscript via ${kernel-command-line}, and
passed to init via -K.  I think it can be passed to init by adding this to
--bootflags of the root filesystem. Can someone confirm this?

/hurd/ext2fs.static --bootflags="${boot-args} ${kernel-command-line" ...

But this quotes look bad. We don't have a shell yet. Note that
kernel-command-line can contain spaces, so multiple --bootflags
are a nice idea but won't cut it, unless serverboot splits argv at spaces
before replacing the variables (haven't checked).

This would actually make it possible to pass the kernel command line down to
init.  init does currently pass this to proc for the command line to appear
in the output of ps etc.  Is this interface sufficient, or should proc
provide the kernel command line directly via an RPC similar to

Is my analysis somewhere wrong? We should add kernel-command-line to the
default boot script.


`Rhubarb is no Egyptian god.' Debian http://www.debian.org brinkmd@debian.org
Marcus Brinkmann              GNU    http://www.gnu.org    marcus@gnu.org

reply via email to

[Prev in Thread] Current Thread [Next in Thread]