Re: final(?) no-daemon kmod diffs for linux-2.1.96

Adam J. Richter (adam@yggdrasil.com)
Fri, 17 Apr 1998 10:21:48 -0700


>> = Adam J. Richter
> = Werner Almesberger
>> I believe we can avoid that, by calling the initial ramdisk
>> program "/sbin/init" instead of "/linuxrc"

>The difference is intentional:
> - your initrd may contain an /sbin/init, which is different from /linuxrc
> - just using the /sbin/init code would imply that the init=xxx boot
> command-line option changes the choice of _both_ programs/scripts

I am talking about deleting the code from the kernel which
does a second mount anyhow. Fortunately, the kernel passes the
remaining comand line options to init, and they're also available
from /proc/cmdline, so you can have a userland convention for
changing the second init process. I would suggest "init2=".

> - if you're really pressed for space, you may possibly want to use a
> reduced FS that doesn't support directories

I used to think that "/init" should be in the list of init
programs that the kernel tries to exec at the end of init/main.c for
exactly this reason, but now we have romfs, which is 6.5kB and
supports directories and has all the right tools, so I don't
know if even this little change is necessary. Were you thinking of
a specific filesystem? Anyhow, either of these solutions is simpler
than remounting supporting necessary to implement "/linuxrc".

> - "linuxrc" self-documents the purpose ;-)

rc files are usually text configuration files.

>Perhaps the only thing that needs changing wrt /linuxrc is that there
>should be a boot command-line option to pick a different name than
>"/linuxrc".

Initial ramdisks are great. They resolve a whole bunch of
chicken-and-egg programs facing more modularized kernels, diskless
booting, etc. Thank you very much for this great facility and support
for it in lilo. The special "linuxrc" program, the kernel code to
remount root and the attendant /proc filesystem entries to control
this are, however, unnecessary kernel complexity (done with
Linux-specific naming too) that should be moved to userland.

I understand that the linuxrc root remounting may have
seemed necessary originally, but now that the "exec chroot /mnt /sbin/init"
method has been pointed out, I think it should be clear that the
one time kernel level root remounting and "/linuxrc" are unnecessary.

Adam J. Richter __ ______________ 4880 Stevens Creek Blvd, Suite 205
adam@yggdrasil.com \ / San Jose, California 95129-1034
+1 408 261-6630 | g g d r a s i l United States of America
fax +1 408 261-6631 "Free Software For The Rest Of Us."

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu