From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from imap.thunk.org ([74.207.234.97]:36846 "EHLO imap.thunk.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754137AbeCGE6P (ORCPT ); Tue, 6 Mar 2018 23:58:15 -0500 Date: Tue, 6 Mar 2018 23:58:12 -0500 From: "Theodore Y. Ts'o" To: Randy Dunlap Cc: linux-ext4@vger.kernel.org, Linux FS Devel Subject: Re: ext4 confusion Message-ID: <20180307045812.GB7507@thunk.org> References: <9fcee669-1ab3-7beb-a9e8-77fd22dc71c9@infradead.org> <20180306223421.GA7204@thunk.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Tue, Mar 06, 2018 at 03:34:25PM -0800, Randy Dunlap wrote: > > My custom kernel does not use an initramfs at all. OK, so if you are not using an initramfs at all, it's *normal* for the file system to be mounted read-only, since it's not safe to run fsck on the file system unless it is mounted read-only. So the standard init scripts (at least in the good old days pre-systemd) expected that you use the ro option to make sure the root file system is mounted read-only, and then the init scripts would check the file system if it was needed, and then the init scripts would remount the file sytsem read-write afterwards. As I mentioned, with many modern distro's this is now done in initramfs, and with Debian it will actually run the fsck *before* the root file system is even mounted, and then it can just mount it read/write. Obviously, if that is what initramfs does, then the init scripts (or the magic systemd units in the brave new systemd world) don't need to remount the file system read/write. To be honest, there is a huge amount of magic these days in the initramfs and systemd scripts. I do know that Debian stable supports using a read-only mount and its systemd setup does the right thing, because that's how kvm-xfstests works. But with some of the other distro's (Red Hat Enterprse Linux especially), it's been magic, and trying to figure out how it works is something I gave up on a long time ago. I was just amazed that it managed to boot over fiber channel, and I was glad I never had to debug on the freaking thing worked. :-/ - Ted