[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    Re: [BusyBox] removing linuxrc from bb ?
From:       kent robotti <robotti () metconnect ! com>
Date:       2000-10-28 8:14:29
[Download RAW message or body]

> On Fri Oct 27, 2000 at 10:39:59PM -0700, kent robotti wrote:
> >
> > > I don't know how you get a /linuxrc link to bb without having /sbin/init...
> > > Having /linuxrc act as init is the whole point of BB_FEATURE_LINUXRC.  If you
> > > look in Config.h
> > >
> > >     #ifdef BB_FEATURE_LINUXRC
> > >     #ifndef BB_INIT
> > >     #define BB_INIT
> > >     #endif
> > >     #define BB_LINUXRC
> > >     #endif
> >
> > There's init support in bb but i didn't create a /sbin/init link
> > to it for the test, i just created a /linuxrc link, the kernel runs
> > /linuxrc then opens a console and runs /bin/sh.
> >
> > The kernel doesn't treat /linuxrc like init, unless
> > i link it to /sbin/init which is a link to bb.

On Fri, 27 October 2000, Erik Andersen wrote:

> The kernel (in init/main.c) runs /linuxrc as a kernel thread (which is why when
> busybox runs in an initrd I have to take extra care since init is not pid 1).
> Whatever is sitting there as /linuxrc, if it is an executable, a link to an
> executable, or a script, it will be run.  When /linuxrc exits, the kernel thread
> exits, and the kernel then mounts the real root device (if there is any), and
> then tries to run init.  If it fails to find init, it falls back on /bin/sh.
>
> So, from what you described, it looks like you have specified root=/dev/ram0 to
> the kernel, the kernel boots, /linuxrc gets run, then exits (?), followed by
> the kernel failing to find init and falling back to running /bin/sh.

You're right!

The initrd uses ram0 and the root partition is set to ram0,
so it doesn't work.

loadlin kernel initrd=initrd.gz root=/dev/ram0 rw

This works etc.

loadlin kernel initrd=initrd.gz root=/dev/ram1 rw

Nevermind!





[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic