All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ivan Vadovic <pivo@pobox.sk>
To: "W. Michael Petullo" <mike@flyn.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: PID of init != 1 when initrd with pivot_root
Date: Tue, 5 Jun 2001 21:36:09 +0200	[thread overview]
Message-ID: <20010605213608.A14147@ivan.doma> (raw)
In-Reply-To: <20010601040627.A1335@ivan.doma> <20010602220219.A1091@ivan.doma> <20010605175618.A2884@dragon.flyn.org>
In-Reply-To: <20010605175618.A2884@dragon.flyn.org>; from mike@flyn.org on Tue, Jun 05, 2001 at 05:56:18PM +0200

> > But the problem still remains. How do I make my /sbin/init run with PID 1 
> > using initial ramdisk under the new root change mechanism? I don't want to 
> > use the old change_root mechanism...
> 
> I had the same problem when doing some development for mkCDrec.
> This project uses busybox, whose init does not run if its PID != 1.
> I asked the busybox folks same question you did and never got a response.
> 
> As a kludge, and after looking at the busybox source code, I renamed init
> to linuxrc.  In this case the program is functionally equivalent to init,
> except that it does not do the PID == 1 check.
> 
> An excerpt from my real linuxrc:
> 
> echo Pivot_root: my PID is $$
> # exec /usr/sbin/chroot . /sbin/init < dev/console > dev/console 2>&1
> # Okay, try this:
> exec /usr/sbin/chroot . /sbin/linuxrc < /dev/console > /dev/console 2>&1
> 
> /sbin/linuxrc is actually init, renamed.
> 

I fugured it out. The Documentation/initrd.txt says to use root=/dev/rd/0 with
devfs. Well, that's wrong. You should use root=/dev/ram0 even with devfs no
matter what the documentation says. And my linuxrc finaly runs with PID == 1.

Ivan Vadovic

  reply	other threads:[~2001-06-05 19:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-06-01  2:06 PID of init != 1 when initrd with pivot_root Ivan
2001-06-01  4:11 ` H. Peter Anvin
2001-06-02 20:02 ` Ivan
2001-06-05 15:56   ` W. Michael Petullo
2001-06-05 19:36     ` Ivan Vadovic [this message]
2001-06-05 19:45     ` Kai Germaschewski

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=20010605213608.A14147@ivan.doma \
    --to=pivo@pobox.sk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mike@flyn.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.