All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Theodore Y. Ts'o" <tytso@mit.edu>
To: Randy Dunlap <rdunlap@infradead.org>
Cc: linux-ext4@vger.kernel.org,
	Linux FS Devel <linux-fsdevel@vger.kernel.org>
Subject: Re: ext4 confusion
Date: Tue, 6 Mar 2018 17:34:21 -0500	[thread overview]
Message-ID: <20180306223421.GA7204@thunk.org> (raw)
In-Reply-To: <9fcee669-1ab3-7beb-a9e8-77fd22dc71c9@infradead.org>

On Mon, Mar 05, 2018 at 08:17:10PM -0800, Randy Dunlap wrote:
> 
> ext4_fill_super() tells me:
> 
> [    3.033174] EXT4-fs (sda5): couldn't mount as ext3 due to feature incompatibilities
> [    3.100186] EXT4-fs (sda5): mounted filesystem with ordered data mode. Opts: (null)
> [    3.102683] VFS: Mounted root (ext4 filesystem) readonly on device 8:5.
> 
> This is a new install, new filesystem. It has never been ext2 or ext3.
> 
> After bootup and before I do anything else, I can remount /dev/sda5 on / as
> rw and everything is OK.

What is the boot command-line that are you using?  What does
/proc/cmdline say?  Mine says (for example):

% cat /proc/cmdline 
BOOT_IMAGE=/vmlinuz-4.15.3-00026-g373ea7d39542 root=/dev/mapper/cwcc-root ro fbcon=font:sun12x22 quiet

The ro mount option is usually what causes the root file system to be
mounted read-only.

I would check and see whether you are using the same init script path
for your custom kernel versus your distro kernel.  In particular, is
the initramfs the same for both?  With Debian, there is an initial
ramdisk which is used:

	linux	/vmlinuz-4.15.3-00026-g373ea7d39542 root=/dev/mapper/cwcc-root ro fbcon=font:sun12x22 quiet
	echo	'Loading initial ramdisk ...'
	initrd	/initrd.img-4.15.3-00026-g373ea7d39542

With the Debian initial ram disk, e2fsck is actually run on the file
system *before* it is mounted, and then it is mounted under userspace
control, and the kernel's default autoprobing isn't used at all.  So
with Debian's initramfs, it *knows* it is an ext4 file system and it
mounts it directly as ext4, so in my kernel logs I just see this:

Mar  5 18:26:11 cwcc kernel: [   15.073579] EXT4-fs (dm-1): mounted filesystem with ordered data mode. Opts: (null)

So I don't see the "VFS: mounting root..." message at all.  I don't
know what your distribution is doing, but you might want to check and
see if the "VFS: mounting root" is showing up when you are booting the
distro-kernel.  This really smells like a problem with how the
initramfs for your custom kernel was set up...

	      	   	  	     - Ted

  parent reply	other threads:[~2018-03-06 22:34 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-06  4:17 ext4 confusion Randy Dunlap
2018-03-06  4:34 ` Eric Sandeen
2018-03-06  4:38   ` Randy Dunlap
2018-03-06  4:40     ` Eric Sandeen
2018-03-06  4:42       ` Randy Dunlap
2018-03-06  4:45         ` Eric Sandeen
2018-03-06  5:12           ` Randy Dunlap
2018-03-06  6:47             ` Dave Chinner
2018-03-06 20:07               ` Randy Dunlap
2018-03-06 22:53                 ` Eric Sandeen
2018-03-06 22:34 ` Theodore Y. Ts'o [this message]
2018-03-06 23:34   ` Randy Dunlap
2018-03-07  4:58     ` Theodore Y. Ts'o
2018-03-07  5:35       ` Randy Dunlap

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=20180306223421.GA7204@thunk.org \
    --to=tytso@mit.edu \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=rdunlap@infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.