From: "H. Peter Anvin" <hpa@zytor.com>
To: Chris Friesen <cfriesen@nortelnetworks.com>
Cc: linux-kernel@vger.kernel.org, kai@tp1.ruhr-uni-bochum.de
Subject: Re: Kernel setup() and initrd problems
Date: Fri, 14 Mar 2003 12:42:53 -0800 [thread overview]
Message-ID: <3E723ECD.8010000@zytor.com> (raw)
In-Reply-To: <3E7235B7.5050407@nortelnetworks.com>
Chris Friesen wrote:
> H. Peter Anvin wrote:
>
>> Chris Friesen wrote:
>>
>>>
>>> Below is the script that I used to pivot from a standard ramdisk (for
>>> with
>>> the infrastructure is already in place in our build environment) to a
>>> tmpfs
>>> filesystem. This requires no changes to the boot args.
>
>
>> ... which means that you either have boot args or rdev so that
>> /dev/ram0 is the root filesystem (or it wouldn't work.)
>
>
> Yes, but after the pivot, /dev/ram0 isn't the real filesytem, its tmpfs
> mounted at /. Isn't that what the original poster was talking about,
> where the root on the final running system is not the same as what the
> machine was booted with?
>
> Maybe I'm just confused.
>
I think so.
The fundamental problem is that the original initrd protocol considered
the initrd to be something different than "a real root", and its init
(linuxrc) to be something different than "a real init."
With pivot_root, all of that is historical baggage, and worse - it gets
in the way.
The way to get around the historical baggage is to tell the kernel that
the initrd is a "permanent" initrd by using the "root=/dev/ram0"
command-line option. This has the side effect of bypassing all the
initrd historical crap and instead spawning /sbin/init using PID 1, like
any other system would do. Now you can just pivot and "exec /sbin/init"
like you should be.
Of course, after the pivot_root, the root is something completely
different than the root= command-line option states, but that's
irrelevant. The command-line option is there to disable the initrd
historical garbage, not for any other purpose.
-hpa
next prev parent reply other threads:[~2003-03-14 20:39 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-03-13 8:42 Kernel setup() and initrd problems Oliver Tennert
2003-03-13 17:16 ` Kai Germaschewski
2003-03-13 18:05 ` Kevin P. Fleming
2003-03-14 19:12 ` H. Peter Anvin
2003-03-14 19:27 ` Chris Friesen
2003-03-14 19:43 ` H. Peter Anvin
2003-03-14 20:04 ` Chris Friesen
2003-03-14 20:42 ` H. Peter Anvin [this message]
2003-03-14 20:53 ` Chris Friesen
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=3E723ECD.8010000@zytor.com \
--to=hpa@zytor.com \
--cc=cfriesen@nortelnetworks.com \
--cc=kai@tp1.ruhr-uni-bochum.de \
--cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox