public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: <jhf@rivenstone.net>
To: Marcelo Tosatti <marcelo.tosatti@cyclades.com>
Cc: Erik Andersen <andersen@codepoet.org>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] fix 2.4.x incorrect argv[0] for init
Date: Wed, 1 Oct 2003 15:34:25 -0400	[thread overview]
Message-ID: <20031001193425.GA19793@rivenstone.net> (raw)
In-Reply-To: <20031001185613.GA13945@codepoet.org>

[-- Attachment #1: Type: text/plain, Size: 1249 bytes --]

On Wed, Oct 01, 2003 at 12:56:13PM -0600, Erik Andersen wrote:
> In 2.4.x when someone specifies "init=/bin/foo" to select an
> alternative binary to run instead of /sbin/init, argv[0] is not
> to the correct value.  This is a problem for programs such as
> busybox that multiplex applications based on the value of
> argv[0].  For example, even if you specify init=/bin/sh" on the
> kernel command line, busybox will still receive "/sbin/init" as
> argv[0], and will therefore run init rather than /bin/sh...
> 
> This problem was recently fixed in 2.6.x.  This patch applies
> the same fix to 2.4.x.

    I didn't know that got merged.  Great!

    Debian users running 2.6: go install busybox-static, then make a
link from /sbin/sh to /bin/busybox.  If something bad happens to your
file system or libc or something like that, you can still boot with
init=/sbin/sh and get a shell prompt and all the important utilities
as long as /bin/busybox is okay.  It's a nice failsafe, especially
when testing kernels or running an unstable distribution.

   If this patch gets merged in 2.4, 2.4 users will be able to do this
too.

-- 
Joseph Fannin
jhf@rivenstone.net

"That's all I have to say about that." -- Forrest Gump.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2003-10-01 19:31 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-01 17:44 Linux 2.4.23-pre6 Marcelo Tosatti
2003-10-01 18:56 ` [PATCH] fix 2.4.x incorrect argv[0] for init Erik Andersen
2003-10-01 19:34   ` jhf [this message]
2003-10-01 21:21 ` Linux 2.4.23-pre6 David van Hoose
2003-10-02  7:08   ` Marcelo Tosatti
2003-10-02 11:09     ` David van Hoose
2003-10-02 22:13 ` J.A. Magallon
2003-10-05 21:42   ` Marcelo Tosatti
2003-10-09 22:21 ` 2.4.23-pre6 aic79xx compile failure amd64 Samuel Flory
  -- strict thread matches above, loose matches on Subject: below --
2003-09-09 22:32 [PATCH] fix 2.4.x incorrect argv[0] for init Erik Andersen

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=20031001193425.GA19793@rivenstone.net \
    --to=jhf@rivenstone.net \
    --cc=andersen@codepoet.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcelo.tosatti@cyclades.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