mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrea Arcangeli <andrea@suse.de>
To: Rik van Riel <riel@conectiva.com.br>
Cc: linux-kernel@vger.kernel.org
Subject: Re: 2.4.19pre8aa3
Date: Thu, 16 May 2002 04:32:38 +0200	[thread overview]
Message-ID: <20020516023238.GE1025@dualathlon.random> (raw)
In-Reply-To: <20020516020134.GC1025@dualathlon.random> <Pine.LNX.4.44L.0205152303500.32261-100000@imladris.surriel.com>

On Wed, May 15, 2002 at 11:06:51PM -0300, Rik van Riel wrote:
> On Thu, 16 May 2002, Andrea Arcangeli wrote:
> > On Wed, May 15, 2002 at 07:30:18PM -0300, Rik van Riel wrote:
> > > On Wed, 15 May 2002, Andrea Arcangeli wrote:
> > >
> > > > Only in 2.4.19pre8aa3: 00_ext3-register-filesystem-lifo-1
> > > >
> > > > 	Make sure to always try mounting with ext3 before ext2 (otherwise
> > > > 	it's impossible to mount the real rootfs with ext3 if ext3 is a module
> > > > 	loaded by an initrd and ext2 is linked into the kernel).
> > >
> > > Funny, I've been doing this for months.
> > >
> > > Maybe you should look into pivot_mount(2) and pivot_mount(8)
> > > some day ?
> 
> > First of all there's no pivot_mount but there's only pivot_root (never
> > mind, it is clear you meant pivot_root).
> >
> > Secondly pivot_root has nothing to do with handle_initrd.
> >
> > Go read init/do_mounts.c::handle_initrd. There are only two ways:
> 
> There's a third way, which is used on the initrd of most
> distros:

I'm not using the full blown initrd of most distros that is aware of the
mistery of life and of all the kernel bugs out there too, my own dumb
linuxrc just says:

	echo hello world

and then returns, and ext3 gets mounted as ext2 and that's a kernel bug,
all other fs gets mounted correctly with my initrd, only ext3 gone wrong
until I fixed it.

> --- snip from linuxrc ----
> mount --ro -t $rootfs $rootdev /sysroot
> pivot_root /sysroot /sysroot/initrd
> ------
> 
> This way you can specify both the root fs and - if wanted -
> special mount options to the root fs. Then you pivot_root(2)
> to move the root fs to / and the (old) initrd to /initrd.

both lines are completly superflous, very misleading as well. I
recommend to drop such two lines from all the full blown bug-aware
linuxrc out there (of course after you apply the ordering fix to the
kernel).

About the "special mount options", now since 2.4.19pre if you try to
pass different flags to your mount in linuxrc and the kernel, you will
fail to mount the real root fs, if you want to pass the "if wanted
special mount options" they must be passed via the kernel parameter
only, they cannot be inside the linuxrc knowledge or the kernel mount
will fail.

> 
> The initscripts then umount /initrd, after which the initrd
> data gets freed.

you also need to call flushb /dev/ram0 to free the initrd memory after
umount /initrd, if you do it in userspace without using the automation
in do_mounts.c.

Andrea

  reply	other threads:[~2002-05-16  2:32 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-05-15 21:27 2.4.19pre8aa3 Andrea Arcangeli
2002-05-15 21:56 ` 2.4.19pre8aa3 Andreas Dilger
2002-05-16  2:18   ` 2.4.19pre8aa3 Andrea Arcangeli
2002-05-15 22:30 ` 2.4.19pre8aa3 Rik van Riel
2002-05-16  2:01   ` 2.4.19pre8aa3 Andrea Arcangeli
2002-05-16  2:06     ` 2.4.19pre8aa3 Rik van Riel
2002-05-16  2:32       ` Andrea Arcangeli [this message]
2002-05-16  2:42         ` 2.4.19pre8aa3 Rik van Riel
2002-05-16  2:58           ` 2.4.19pre8aa3 Andrea Arcangeli
2002-05-16  8:36         ` 2.4.19pre8aa3 Russell King
2002-05-16  8:59           ` 2.4.19pre8aa3 Russell King
2002-05-16 12:56           ` 2.4.19pre8aa3 Andrea Arcangeli
2002-05-16  9:27         ` 2.4.19pre8aa3 Juan Quintela
2002-05-16 16:07           ` 2.4.19pre8aa3 Andrea Arcangeli
2002-05-16 18:37             ` 2.4.19pre8aa3 Rik van Riel
2002-05-16 18:59               ` 2.4.19pre8aa3 Andrea Arcangeli
2002-05-16  3:12     ` 2.4.19pre8aa3 Andrew Morton
2002-05-16  3:23       ` 2.4.19pre8aa3 Andrea Arcangeli
2002-05-16 19:26 ` 2.4.19pre8aa3 Christoph Hellwig
2002-05-31 20:34   ` 2.4.19pre8aa3 Andrea Arcangeli

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=20020516023238.GE1025@dualathlon.random \
    --to=andrea@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=riel@conectiva.com.br \
    /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

all inboxes | Powered by JetHome®