linux-kernel.vger.kernel.org archive mirror
 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:01:34 +0200	[thread overview]
Message-ID: <20020516020134.GC1025@dualathlon.random> (raw)
In-Reply-To: <20020515212733.GA1025@dualathlon.random> <Pine.LNX.4.44L.0205151929430.32261-100000@imladris.surriel.com>

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 ?

I'm not sure if you really understood what the problem is from my
description above because your kind suggestion doesn't make sense to me.

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:

1) you specified rootfstype=ext3, then the real rootfs will be
   mounted as ext3 and not as ext2, but the initrd must also
   be mountable by ext3 and that's not the case normally (the same
   rootfstype will apply to both the initrd and the real root fs,
   the fact rootfstype applies to both doesn't make sense but
   that's another issue and I don't want to be forced to use
   rootfstype anyways, I don't like having to pass an argument for
   something that can be done at runtime by the kernel).
2) you didn't specified rootfstype=, in such case ext2 will be
   tried first because it got registered first because ext2 is linked
   into the kernel and ext3 is a module

That's all, and that's an autodetection bug because ext3 must be always
tried first, there's no point at all to try to mount with ext2 before
ext3 (of course unless rootfstype= is specified).

If it works for you it means you regularly reboot with SYSRQ+B (or
some workaround on those lines), and so ext2 doesn't mount
and in turn ext3 is later tried. otherwise if ext2 mounts cleanly ext3
is _never_ tried and you cannot mount ext3 as rootfs without my patch
that enforces the ordering.

Make sure to check with /proc/mounts that your rootfs is really using
ext3 and not ext2, or you may not notice.

If it works for you it's probably because ext2 is a module too, or maybe
more simply because ext3 is linked into the kernel.

Andrea

  reply	other threads:[~2002-05-16  2:01 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   ` Andrea Arcangeli [this message]
2002-05-16  2:06     ` 2.4.19pre8aa3 Rik van Riel
2002-05-16  2:32       ` 2.4.19pre8aa3 Andrea Arcangeli
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=20020516020134.GC1025@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;
as well as URLs for NNTP newsgroup(s).