public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Paulo Marques <pmarques@grupopie.com>
To: Mildred Frisco <mildred.frisco@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: making a linux kernel with no root filesystem
Date: Thu, 21 Oct 2004 11:44:00 +0100	[thread overview]
Message-ID: <417792F0.20008@grupopie.com> (raw)
In-Reply-To: <e7b30b24041021030535925d1d@mail.gmail.com>

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.

Your /sbin/init can be a simple script (or even just bash or another shell).

You can use statically compiled binaries against dietlibc from here:

ftp://foobar.math.fu-berlin.de:2121/pub/dietlibc/bin-i386/

If you use "ash" as /sbin/init and place busybox there with the 
appropriate symlinks, you get a small semi-functional shell for a mere 
120kb of executables.

If you're really desperate for space, you can build your own executable 
that asks for shutdown/reboot and calls reboot(2) with the appropriate 
parameters, and link against dietlibc (or ulibc).

This is not really kernel related and you should not mess with the 
kernel code for acomplishing this. If you really need to cut down extra 
space in the kernel you can check the patches from the "tiny" tree to 
build an incredibly small kernel.

I hope this helps,

-- 
Paulo Marques - www.grupopie.com

All that is necessary for the triumph of evil is that good men do nothing.
Edmund Burke (1729 - 1797)

  reply	other threads:[~2004-10-21 10:50 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-21  9:46 making a linux kernel with no root filesystem Mildred Frisco
2004-10-21 10:05 ` Mildred Frisco
2004-10-21 10:44   ` Paulo Marques [this message]
2004-10-21 12:10     ` Richard B. Johnson
2004-10-21 19:44       ` Mathieu Segaud
2004-10-21 11:53 ` Denis Vlasenko
2004-10-21 19:20   ` Geert Uytterhoeven

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=417792F0.20008@grupopie.com \
    --to=pmarques@grupopie.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mildred.frisco@gmail.com \
    /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