[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ea71777e-fc4b-4b45-c670-61a859b715a8@infradead.org>
Date: Tue, 6 Mar 2018 15:34:25 -0800
From: Randy Dunlap <rdunlap@...radead.org>
To: "Theodore Y. Ts'o" <tytso@....edu>
Cc: linux-ext4@...r.kernel.org,
Linux FS Devel <linux-fsdevel@...r.kernel.org>
Subject: Re: ext4 confusion
On 03/06/2018 02:34 PM, Theodore Y. Ts'o wrote:
> 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
Mine says:
BOOT_IMAGE=/boot/bzImage-416-3m32 root=/dev/sda5 resume=/dev/sda3 splash=native quiet showopts elevator=cfq selinux=0 apparmor=0 debug initcall_debug ignore_loglevel
> 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
My custom kernel does not use an initramfs at all.
> 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...
OK, I don't see the "VFS: mounting root" message with the distro kernel.
With the distro kernel, I see:
[ 10.678700] EXT4-fs (sda5): re-mounted. Opts: data=ordered,acl,user_xattr
and with my custom kernel (no initramfs) I see:
[ 3.146701] EXT4-fs (sda5): mounted filesystem with ordered data mode. Opts: (null)
[ 3.149212] VFS: Mounted root (ext4 filesystem) readonly on device 8:5.
so maybe when I'm not using an initramfs, the fs type probing is confused.
I'll keep looking into it. Thanks for your time(s). I'll just continue to remount
it R/W for now.
--
~Randy
Powered by blists - more mailing lists