Re: making a linux kernel with no root filesystem

From: Denis Vlasenko
Date: Thu Oct 21 2004 - 07:32:33 EST


On Thursday 21 October 2004 12:46, Mildred Frisco wrote:
> Hi,
> I would like to ask help in compiling a minimal linux kernel.
> Basically, it would only contain the kernel andno filesystem (or
> probably devfs). I would only have to boot the kernel from floppy.
> Then after the necessary kernel initializations, I would issue a
> prompt where I can either shutdown or reboot the system. That's the
> only functionality required. As I've learned from the init program
> (and startup scripts), the init services and shutdown commands are
> called from /sbin. However, I do not require to mount the root fs
> anymore. I also tried to search for the source code of the shutdown
> program but I can't find it. Please help on the steps that I should
> do.

Okay please imagine that kernel initialized all hardware and,
now, what shall it do instead of mounting root fs and starting
$INIT?

You want a "prompt where I can either shutdown or reboot the system".
How to do that? It is best done from small userspace environment,
like initrd or initramfs. Putting this into kernel is ugly.
--
vda

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