From: ebiederm@xmission.com (Eric W. Biederman)
To: Russell King <rmk@arm.linux.org.uk>
Cc: Bogdan Costescu <bogdan.costescu@iwr.uni-heidelberg.de>,
Chris Dukes <pakrat@www.uk.linux.org>,
Alan Cox <alan@lxorguk.ukuu.org.uk>,
Jeff Garzik <jgarzik@pobox.com>, Robin Holt <holt@sgi.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
netdev@oss.sgi.com
Subject: Re: Make ipconfig.c work as a loadable module.
Date: 08 Mar 2003 11:01:05 -0700 [thread overview]
Message-ID: <m1r89hkaam.fsf@frodo.biederman.org> (raw)
In-Reply-To: <20030308170532.D1896@flint.arm.linux.org.uk>
Russell King <rmk@arm.linux.org.uk> writes:
> On Sat, Mar 08, 2003 at 09:48:16AM -0700, Eric W. Biederman wrote:
> > I can change the contents of my ramdisk as easily as I can change
> > the kernel command line. For the complex setups just placing
> > a configuration file in the ramdisk is what seems to work the best
> > in practice.
>
> You'll forgive me if I don't think that "change the contents of ramdisk"
> is as easy as changing the kernel command line.
>
> Last time I checked, to change the contents of a ramdisk image, you needed
> to ungzip it, mount it, make some changes, unmount it, re-gzip it, and
> re-install the thing. Or, in the case of initramfs, you need to rebuild
> the kernel image. Compare this to changing the kernel command line from
> "root=/dev/hda1" to "root=/dev/nfs ip=dhcp" in the boot loader by hitting
> a few keys on the keyboard before the kernel loads, and I think you'll
> start to get my point here.
Currently on systems I am talking I have a directory structured like:
dir/config
dir/bzImage
dir/ramdisk
dir/ramdisk/sbin/init
dir/ramdisk/etc/
.....
So I edit dir/ramdisk/etc/somefile.conf and run a script that rebuilds
everything. Or I edit dir/config which has my command line in it
and run the script again.
Getting to this point took a bit of effort but that is where I am
at now.
With initramfs it becomes as designed it becomes easier because it easier
to build a cpio archive. But mkcramfs has similar properties for
building filesystems. The whole building the initramfs thing into
the kernel is something that probably needs to be worked so the
initramfs can be attached to the kernel separately. When the bootable
kernel image is ELF that is easy. With something like bzImage on x86
it can be a pain, as there isn't any room to extend the things.
And all I asserted is that for ``me'' it is equally simple to change
the ramdisk contents as to changes those of a file.
For something like /bin/kinit that contains the default kernel
polices on how to mount root it should certainly be command line
driven.
For complicated setups where I am partitioning the hard drives,
making filesystems, and installing over the network. A configuration
file has proven to be easier, and that is what I do. The fundamental
issue is that after a certain point the command line just does not
have room for all of the parameters needed.
Possibly I answered the wrong question?
As for hitting a few keys on the keyboard in the bootloader before
the kernel loads well.... That is good on one machine, it gets to be
a pain on 4. And at a 1000 I have much better things to do with my
time. Which just shows my bias from working on with clusters. On a
cluster the only time you want to treat a machine as an individual is
when you are replacing bad hardware.
I have played with parsing command line options. And messing
with /proc/cmdline or being /sbin/init and just getting those options
from the kernel is not difficult. For prototyping it may be a good
idea to read /proc/cmdline so the kernel can eat the options before
kinit does.
Eric
next prev parent reply other threads:[~2003-03-08 18:01 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-03-06 21:10 Make ipconfig.c work as a loadable module Robin Holt
2003-03-06 22:34 ` Alan Cox
2003-03-06 22:11 ` Jeff Garzik
2003-03-06 22:25 ` Russell King
2003-03-06 22:32 ` Jeff Garzik
2003-03-07 0:13 ` Alan Cox
2003-03-06 23:19 ` Russell King
2003-03-07 0:29 ` Alan Cox
2003-03-07 0:08 ` Russell King
2003-03-07 1:29 ` Chris Dukes
2003-03-07 9:42 ` Russell King
2003-03-07 11:46 ` Bogdan Costescu
2003-03-08 2:03 ` Eric W. Biederman
2003-03-08 10:45 ` Bogdan Costescu
2003-03-08 16:07 ` Eric W. Biederman
2003-03-08 16:19 ` Russell King
2003-03-08 16:48 ` Eric W. Biederman
2003-03-08 17:05 ` Russell King
2003-03-08 18:01 ` Eric W. Biederman [this message]
2003-03-07 13:38 ` Chris Dukes
2003-03-07 14:29 ` Russell King
2003-03-07 16:23 ` Richard B. Johnson
2003-03-07 21:47 ` William Lee Irwin III
2003-03-07 22:00 ` Chris Friesen
2003-03-07 7:15 ` Michael Mueller
2003-03-07 12:54 ` Alan Cox
2003-03-07 21:33 ` Michael Mueller
2003-03-09 4:46 ` Arnaldo Carvalho de Melo
2003-03-07 9:10 ` Denis Vlasenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m1r89hkaam.fsf@frodo.biederman.org \
--to=ebiederm@xmission.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=bogdan.costescu@iwr.uni-heidelberg.de \
--cc=holt@sgi.com \
--cc=jgarzik@pobox.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@oss.sgi.com \
--cc=pakrat@www.uk.linux.org \
--cc=rmk@arm.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).