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

From: Dave Cinege (dcinege@psychosis.com)
Date: Mon May 29 2000 - 18:55:38 EST


Werner Almesberger wrote:
>
> Dave Cinege wrote:
> > Useful for setting up things prior to init, like devfs
>
> If you need to do work before the "real init", you can call the "real
> init" something else, run your pre-init instead of the "real init" and
> then exec the "real init".

Aside for the /dev/console problem, that is not hard for me to do.
But that is because I am a hacker that knows C and am familar with kernel
internals.

A normal user can not do these things, and needs a mechinism to configure, the
root, modules, <use your imagination>. And that last one is the BIGGEST thing.
It is the reason why I consider the root=/dev/ram0 /linxrc chekc a bug. Users
should be left to be creative with a broad feture set, where all the decisions
have not been removed from their mortal control.

> - adds a mandatory boot command line option, which has the following
> problems:

It is only mandatory if you need it.

> - increases the length of the boot command line

Whoppee.

> - tight dependency on the user space setup, and needs to be
> preserved across boot loader configuration changes

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.

> - doesn't work with loaders that don't support command lines
> (e.g. the floppy boot sector)
> - isn't backwards-compatible with older kernel versions

Good. The problem is permanently fixed, without the bagage of the
mis-implemented /linuxrc solution.

> > Works even if you're not using initrd
>
> Ditto.

Ditto.

>
> > Standardized way to execute things prior to init
>
> If it becomes necessary, I'm sure distributors will happily pick up
> your init-nee-preinit replacement.

God forbid the kernel actually provides means to work within it's own boot
process. : P

> Will not fail for lack of /dev/console (Current init= will!)
>
> Maybe /sbin/init does, but the kernel will invoke it whether you
> have a console or not.

I'm not stating this correctly...you 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.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



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