Thread (103 messages) 103 messages, 14 authors, 2025-10-10

Re: [PATCH RESEND 00/62] initrd: remove classic initrd support

From: Julian Stecklina <hidden>
Date: 2025-09-13 08:58:39
Also in: linux-acpi, linux-alpha, linux-api, linux-arch, linux-block, linux-doc, linux-efi, linux-ext4, linux-fsdevel, linux-m68k, linux-mips, linux-patches, linux-riscv, linux-s390, linux-sh, linux-um, linuxppc-dev, lkml, loongarch, sparclinux

On Sat, 2025-09-13 at 00:37 +0000, Askar Safin wrote:
Intro
====
This patchset removes classic initrd (initial RAM disk) support,
which was deprecated in 2020.
Initramfs still stays, and RAM disk itself (brd) still stays, too.
init/do_mounts* and init/*initramfs* are listed in VFS entry in
MAINTAINERS, so I think this patchset should go through VFS tree.
This patchset touchs every subdirectory in arch/, so I tested it
on 8 (!!!) archs in Qemu (see details below).
Warning: this patchset renames CONFIG_BLK_DEV_INITRD (!!!) to CONFIG_INITRAMFS
and CONFIG_RD_* to CONFIG_INITRAMFS_DECOMPRESS_* (for example,
CONFIG_RD_GZIP to CONFIG_INITRAMFS_DECOMPRESS_GZIP).
If you still use initrd, see below for workaround.
As the person who kicked this off by trying to get erofs support for initrds:
You have all my support for nuking so much legacy code! I'm all for removing
historical baggage even if it comes with slight inconveniences for fringe
usecase users (me!).

If this series goes through, I'll drink a beer to you!

Acked-by: Julian Stecklina <redacted>
Also I renamed CONFIG_BLK_DEV_INITRD (which became total misnomer)
to CONFIG_INITRAMFS. And CONFIG_RD_* to CONFIG_INITRAMFS_DECOMPRESS_*.
This will break all configs out there (update your configs!).
This is beautiful. The original names were pretty misleading!
Workaround
====
If "retain_initrd" is passed to kernel, then initramfs/initrd,
passed by bootloader, is retained and becomes available after boot
as read-only magic file /sys/firmware/initrd [3].
This is pretty neat, because now you can use _all filesystems_ as initrds. :-D
This solves my original problem, albeit with a tiny shim initramfs. Nice!


Julian
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help