mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andries.Brouwer@cwi.nl
To: Andries.Brouwer@cwi.nl, linux-kernel@vger.kernel.org, mark.post@eds.com
Cc: alan@lxorguk.ukuu.org.uk
Subject: Re: PROBLEM: kernel mount of initrd fails unless mke2fs uses 1024 byt e blocks
Date: Fri, 12 Apr 2002 20:40:44 GMT	[thread overview]
Message-ID: <UTC200204122040.UAA608889.aeb@cwi.nl> (raw)


        From: "Post, Mark K" <mark.post@eds.com>

        [1.] One line summary of the problem:
            Trying to use an initrd for an installation fails unless the mke2fs
        used a blocksize of 1024 bytes.

        [2.] Full description of the problem/report:
            I'm trying to create a Linux for S/390 version 2.2.20 installation
        kernel/ramdisk set.  When I create the ramdisk, if I issue the mke2fs
        command with -b 2048 or -b 4096, it works fine.  But, I try to boot the
        system, I get an "EXT2-fs: Magic mismatch, very weird !" error when the
        kernel tries to mount the ramdisk as the root file system.  If I let the
        blocksize default, or specify -b 1024, everything works fine.

        The comparison that seems to be failing is at line 500 of
        linux/fs/ext/super.c:
                        if (es->s_magic != le16_to_cpu(EXT2_SUPER_MAGIC)) {
                                printk ("EXT2-fs: Magic mismatch, very weird !\n");
                                goto failed_mount;

I answered:

    I once submitted a patch for this, but apparently it is not in 2.2.20.

but was too hasty.
I recalled a buglet here, that was fixed in 2.4 and is still in 2.2,
and indeed, there is such a buglet, but your problem is elsewhere.

The kernel does set_blocksize() to change the blocksize of your
device. This set_blocksize() throws away all buffers with the
now incorrect size. But your device is a ramdisk, and throwing
out these buffers kills all your data.
So, after doing that, you have an empty ramdisk again.
Hence mount fails.

Andries



             reply	other threads:[~2002-04-12 20:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-12 20:40 Andries.Brouwer [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-04-12 21:17 Andries.Brouwer
2002-04-12 21:01 Post, Mark K
2002-04-12 17:55 Andries.Brouwer
2002-04-12 14:52 Post, Mark K
2002-04-09 20:47 Post, Mark K

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=UTC200204122040.UAA608889.aeb@cwi.nl \
    --to=andries.brouwer@cwi.nl \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.post@eds.com \
    /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®