public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Chris Lingard <chris@ukpost.com>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: initrd help -- umounts root after pivot_root
Date: Fri, 31 Oct 2003 18:47:47 +0000	[thread overview]
Message-ID: <200310311847.47920.chris@ukpost.com> (raw)
In-Reply-To: <Pine.A32.3.91.1031030191344.46426A@student.ccbc.cc.md.us>

On Friday 31 October 2003 12:18 am, John R Moser wrote:
> Been trying with 2.4.20, 2.4.22, 2.6.0-test9, how the heck do I get this
> to work?
> I set everthing up on /dev/shm type tmpfs, then
> cd /dev/shm
> mkdir initrd
> pivot_root . initrd

Might be better to do something like:

mount -t devfs  none  /dev
mount -t proc none /proc
mkdir  -p  ram
mount -t tmpfs tmpfs /ram
cd /ram
mkdir proc  cdrom
mount  -t proc  none /ram/proc
/mount_cdrom

This is the start of my linuxrc script and creates the future root at /ram

> Of course, the kernel unmounts / and then swears that it can't find init
> when the linuxrc exits.
>
> The documentation says that linuxrc should pivot_root to the real root in
> Documentation/initrd.txt so I thought that's what the script sholud do.
> Apparently the doc is bad/old.

man pivot_root

mkdir initrd
sbin/pivot_root  .  initrd
mount devfs -t devfs /dev
exec /usr/sbin/chroot . /sbin/init  <dev/console >dev/console 2>&1

(These is no automatic call to /sbin/init)

The documentation is bad insofar as root=/dev/rd/0 now fails

Also you will need to search for a patch to umount your old /initrd.  Please
feel free you email me direct for a very unofficial patch to linux-2.4.22

Chris Lingard

  reply	other threads:[~2003-10-31 18:47 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-31  0:18 initrd help -- umounts root after pivot_root John R Moser
2003-10-31 18:47 ` Chris Lingard [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-10-31 12:46 Bob Chiodini
2003-10-31 18:13 ` Maciej Zenczykowski
2003-10-31 21:59 ` H. Peter Anvin
2003-11-03 13:47   ` Bob Chiodini

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=200310311847.47920.chris@ukpost.com \
    --to=chris@ukpost.com \
    --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