[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
<933797c385f2e222ade076b3e8fc5810fa47f5bd.camel@cyberus-technology.de>
Date: Fri, 21 Mar 2025 13:17:54 +0000
From: Julian Stecklina <julian.stecklina@...erus-technology.de>
To: "hch@....de" <hch@....de>, "hsiangkao@...ux.alibaba.com"
<hsiangkao@...ux.alibaba.com>
CC: "torvalds@...ux-foundation.org" <torvalds@...ux-foundation.org>,
"gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
"rafael@...nel.org" <rafael@...nel.org>, "viro@...iv.linux.org.uk"
<viro@...iv.linux.org.uk>, "linux-kernel@...r.kernel.org"
<linux-kernel@...r.kernel.org>, "linux-fsdevel@...r.kernel.org"
<linux-fsdevel@...r.kernel.org>
Subject: Re: [PATCH] initrd: support erofs as initrd
On Fri, 2025-03-21 at 13:27 +0800, Gao Xiang wrote:
> Hi Christoph,
>
> On 2025/3/21 13:01, Christoph Hellwig wrote:
> > We've been trying to kill off initrd in favor of initramfs for about
> > two decades. I don't think adding new file system support to it is
> > helpful.
> >
>
> Disclaimer: I don't know the background of this effort so
> more background might be helpful.
So erofs came up in an effort to improve the experience for users of NixOS on
smaller systems. We use erofs a lot and some people in the community just
consider it a "better" cpio at this point. A great property is that the contents
stays compressed in memory and there is no need to unpack anything at boot.
Others like that the rootfs is read-only by default. In short: erofs is a great
fit.
Of course there are some solutions to using erofs images at boot now:
https://github.com/containers/initoverlayfs
But this adds yet another step in the already complex boot process and feels
like a hack. It would be nice to just use erofs images as initrd. The other
building block to this is automatically sizing /dev/ram0:
https://lkml.org/lkml/2025/3/20/1296
I didn't pack both patches into one series, because I thought enabling erofs
itself would be less controversial and is already useful on its own. The
autosizing of /dev/ram is probably more involved than my RFC patch. I'm hoping
for some input on how to do it right. :)
>
> Two years ago, I once thought if using EROFS + FSDAX to directly
> use the initrd image from bootloaders to avoid the original initrd
> double caching issue (which is what initramfs was proposed to
> resolve) and initramfs unnecessary tmpfs unpack overhead:
> https://lore.kernel.org/r/ZXgNQ85PdUKrQU1j@infradead.org
>
> Also EROFS supports xattrs so the following potential work (which
> the cpio format doesn't support) is no longer needed although I
> don't have any interest to follow either):
> https://lore.kernel.org/r/20190523121803.21638-1-roberto.sassu@huawei.com
Thanks for the pointers!
Julian
Powered by blists - more mailing lists