Re: preinit= (Was: Re: [PATCH] 5 year old bug in main.c (initrd). Can

From: Werner Almesberger (
Date: Mon May 29 2000 - 20:23:48 EST

Dave Cinege wrote:
> But that is because I am a hacker that knows C and am familar with kernel
> internals.

You don't need kernel internals for writing that little init replacement.
That's the whole point ;-)

Besides, your pre-init can provide _exactly_ the same "user interface"
as the kernel extension you're proposing.

> A normal user can not do these things, and needs a mechinism to configure,
> the root, modules, <use your imagination>.

And in what way would a pre-init without kernel magic prevent you from
doing this ?

> As the author of LILO, I can't help but take my turn to abuse YOU now. : >
> With current technology boot loaders (GRUB, syslinux), not boot loaders based
> on prehistoic absolute block offset of the target file (LILO!),
> this is a non-issue.

Well, no matter how sophisticated your boot loader, you need to store that
command line somewhere. (Unless, of course, you change the boot loader to
auto-detect the presence of your pre-init and take due precautions.)
Command lines are among the more frequently changed thing in boot loader
configurations. Now if somebody removes that preinit=... either by
accident or by ignorance, they're dead. Of course, they deserve it, but
it's still not nice.

>> - isn't backwards-compatible with older kernel versions
> Good. The problem is permanently fixed, without the bagage of the
> mis-implemented /linuxrc solution.

Particularly people who use very different kernels (e.g. those
maintaining code for 2.2 and 2.3) would love you for that ;-)

> I'm not stating this have no console, unless you put your own
> little init binary together that can mknod the file if it's not there.
> I consider that broken.

How is this different from mknod'ing the console in linuxrc/pre-init ?

Well, I get the impression we're wasting our time. I like the idea of
making the initialization process more general, and I'm trying to
covince you to implement it in a way that follows the general trend
for such extensions. If you are determined to write your little kernel
hack instead, nobody can deny you that, but since it will almost
certainly never become part of the mainstream kernel, we'll have to
wait for somebody else to implement and disseminate a better solution.

- Werner

 / Werner Almesberger, ICA, EPFL, CH /

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to Please read the FAQ at

This archive was generated by hypermail 2b29 : Wed May 31 2000 - 21:00:22 EST