RE: what's the best small shell for initrd?
> Currently /bin/sleep drags in libpthread, libm, and librt.
can't we hack something with an active loop using a "while" and a "date" ?
> Would anyone be interested in a version of ash that's statically linked and
> which incorporates the functionality of insmod, modprobe, raidstart, and
> sleep (without dragging in libpthread etc)?
have you checked sash (stand alone shell, dedicated to system recovery,
statically linked, many commands builtin), and busybox (can replace find
grep init tar insmod and many others - no raidstart, but maybe with a bit
of code?)
> I want to fit an initrd and the kernel image on a floppy disk, currently my
> kernel is 600K and my initrd is 1M, I think I should be able to get the
> initrd well under 400K...
are you stuck with 1440k floppies ? on a "regular" floppy, you can use
funky formatting and get up to 2000ko ; and with a bootable CD, you can
use 2880k floppies.
when I had to craft something too big to fit on a floppy, and which had
to run on floppies or cdrom, I used a dual-disk setup (kernel on 1st
floppy and root on 2nd floppy), but I had to apply a small kernel patch
in order to be able to use initrd feature anyway. If you're interested
I can find it again.
> As an aside, why does sleep link with so many things?
hmm. the source looked quite obscure. if you want to check it quickly
without unpacking shellutils : http://nemesis.enix.org/~skaya/sleep.c
--------------------------------------------
I must have a prodigious quantity of mind; it takes me as much as a
week sometimes to make it up.
-- Mark Twain, "The Innocents Abroad"
Reply to: