[BusyBox] init and again and tinylogin...
Berlin Brown
bigbinc at hotmail.com
Wed Feb 12 17:57:03 UTC 2003
Very informative reply, Ok so the reason I put in 'sh -i' is because init
just stops after that, in the init.c code it stops at
'wait(&status); something'. And if I leave it there I get interacive
mode(better than nothing). From what I have read, some process is supposed
to look at the 'passwd' file and prompt for example root and then launch the
shell that is in that file for example /bin/sh.
So what am I missing, what is why I think my tinylogin is not working?
>From: Gene Cumm <greenpuddy at stny.rr.com>
>To: Berlin Brown <bigbinc at hotmail.com>
>CC: busybox at busybox.net
>Subject: Re: [BusyBox] init and again and tinylogin...
>Date: Wed, 12 Feb 2003 17:15:28 -0500
>MIME-Version: 1.0
>Received: from winder.codepoet.org ([166.70.99.138]) by
>mc1-f32.law16.hotmail.com with Microsoft SMTPSVC(5.0.2195.5600); Wed, 12
>Feb 2003 14:11:48 -0800
>Received: from winder.codepoet.org (localhost [127.0.0.1])by
>winder.codepoet.org (Postfix) with ESMTPid CBCCA157AE4; Wed, 12 Feb 2003
>15:11:20 -0700 (MST)
>Received: by winder.codepoet.org (Postfix, from userid 104)id BF40E157AE4;
>Wed, 12 Feb 2003 15:10:10 -0700 (MST)
>Received: from ArcticBitch.greenpuddy.com (bgm-24-169-33-181.stny.rr.com
>[24.169.33.181])by winder.codepoet.org (Postfix) with ESMTP id
>BC1331575EEfor <busybox at busybox.net>; Wed, 12 Feb 2003 15:10:06 -0700 (MST)
>Received: from stny.rr.com (ArcticBitch [127.0.0.1])by
>ArcticBitch.greenpuddy.com (8.11.6/8.11.6) with ESMTP id h1CMFTk02838;Wed,
>12 Feb 2003 17:15:32 -0500
>X-Message-Info: dHZMQeBBv44lPE7o4B5bAg==
>Delivered-To: busybox at busybox.net
>Message-ID: <3E4AC780.4060901 at stny.rr.com>
>User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2) Gecko/20021203
>X-Accept-Language: en-us, en
>References: <F9g3gWrRgxshACUL04J00027aec at hotmail.com>
>In-Reply-To: <F9g3gWrRgxshACUL04J00027aec at hotmail.com>
>X-Spam-Status: No, hits=-2.6
>required=5.0tests=IN_REP_TO,QUOTED_EMAIL_TEXT,REFERENCES,SPAM_PHRASE_00_01,
> USER_AGENT,USER_AGENT_MOZILLA_UA,X_ACCEPT_LANGversion=2.43
>X-Spam-Level: Sender: busybox-admin at busybox.net
>Errors-To: busybox-admin at busybox.net
>X-BeenThere: busybox at busybox.net
>X-Mailman-Version: 2.0.12
>Precedence: bulk
>List-Help: <mailto:busybox-request at busybox.net?subject=help>
>List-Post: <mailto:busybox at busybox.net>
>List-Subscribe:
><http://busybox.net/mailman/listinfo/busybox>,<mailto:busybox-request at busybox.net?subject=subscribe>
>List-Id: Discussion and development of BusyBox <busybox.busybox.net>
>List-Unsubscribe:
><http://busybox.net/mailman/listinfo/busybox>,<mailto:busybox-request at busybox.net?subject=unsubscribe>
>List-Archive: <http://busybox.net/lists/busybox/>
>X-Original-Date: Wed, 12 Feb 2003 17:15:28 -0500
>Return-Path: busybox-admin at busybox.net
>X-OriginalArrivalTime: 12 Feb 2003 22:11:49.0087 (UTC)
>FILETIME=[BD0BC6F0:01C2D2E3]
>
>Berlin Brown wrote:
>>Sorry, I messed up the message.
>>
>>Ok, I have pretty much everything working with busybox, including init but
>>my system startup seems strange. For example I have to explicity set the
>>shell in interactive mode, In my rc.sysinit(or rcS for debian ppl) And
>>when I do a 'ps' I get this which is strange:
>>
>>---- init
>>---- /bin/sh rc.sysinit
>>---- /bin/sh -i <--- this what I added in rc.sysinit
>>
>>But when I take out the sh -i, then rc.sysinit stops executing and then it
>>goes back to the kernel.
>
>Well, it makes sense that rc.sysinit sticks around since it's still
>attached to `/bin/sh -i`. if you put `/bin/sh -i &` it'll release but
>that's a really backwards way to start a shell. See below.
>
>>So my question is...shouldnt busybox(init) run login or something or ask
>>for a password. And what script should I put that in. I can call login
>>manually for example in rc.sysinit but that also seems strange.
>>Also when I compiled, tinylogin, I took out shadow passwords, so maybe
>>that is a problem. So on a linux system what happens after the rc scripts
>>run?
>>
>>Berlin Brown
>>bigbinc at hotmail.com
>
>Normally shells and logins are started by init via /etc/inittab. A part of
>the reason for this is that init is a single task that doesn't often do a
>lot and designed only for starting proceses like this. Restarting a shell
>involves either init or a looping shell(BAD). Try looking at yours on
>your development system (if a *nix) for a start and read Erik's info on how
>busybox\init works in the busybox docs. There IS a default behavior but
>you overrode it with your /etc/inittab. Worst case scenario is copy what
>Erik has in the docs and move up from there.
>
>Here's what normally happens on a linux system(very briefly):
>1)Boot, explode and run kernel
>2)Kernel mounts a root and searches to run an init program
>3)init opens /etc/inittab and runs it by a special sequence
> a)busybox and SysV Init run rc.sysinit or the like (an init script)
> b)SysV init also runs:
> 1)a script associated with the init default runlevel
> 2)some other things with different ID's
> c)Both get ready to run other programs under certain alert
>ID/runlevel's, ie restart, ctrlaltdel, etc. If the associated runlevel/ID
>is activated, the given program is run.
> d)Lastly, both start the shells/logins for each console
>4)The system is ready for you to use it.
>
>I think the basic trends of this are also in most all *nix style systems.
>
>(Erik, catch me if I am wrong on this:) From what I've seen of
>busybox\init, it's designed only to run some programs to start, keep
>logins/shells running and reboot/halt the system. It's very small, very
>light, and has the bare essential of functionality.
>
>Note to anyone: If there is something I am mistaken about, feel free to
>correct me. I've been know to make mistakes.
>
>_______________________________________________
>busybox mailing list
>busybox at busybox.net
>http://busybox.net/mailman/listinfo/busybox
_________________________________________________________________
Help STOP SPAM with the new MSN 8 and get 2 months FREE*
http://join.msn.com/?page=features/junkmail
More information about the busybox
mailing list