From nobody Thu Oct 2 19:01:32 2025 Received: from mail-ed1-f49.google.com (mail-ed1-f49.google.com [209.85.208.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8827272623 for ; Sat, 13 Sep 2025 00:58:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.49 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757725118; cv=none; b=WQrLWtsrfK4sPi5M2llv7RTL3/K3Jj+ohwhfPZDSvVVECWzyWni1Qv2G6o9QpH4tO81/rLWQcaYN4s/7vAwtSdXzgrlIgZEIUmi56dEidmfIrYRwDhufPIbDNU9LxhgJ2nu8wC2Sgc0ViUnim/RhyEoAcY9f/vEL43DqSXAepqs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757725118; c=relaxed/simple; bh=riLYrwvey4IG1vm31BCl7axPrjxd4nPuzw1Lf4FnM3A=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=UJ+82RYBssCPtEz2koBg88yJ8yHY80anL5JVLTmo26IAqUimL84v3VmYh24PtIe+Zx1QiczLApv2DX4uXP8oWn6C+HbUW2FtTPzMoY8Oj42ZVMzeYAhwvxFX6fSv6yaOCcQ6oLUxUhiGL1zgZpDOBlmiM4AfAwwVgxnf4d7/XMQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=hKAdVg/A; arc=none smtp.client-ip=209.85.208.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="hKAdVg/A" Received: by mail-ed1-f49.google.com with SMTP id 4fb4d7f45d1cf-6228de280ccso4861916a12.3 for ; Fri, 12 Sep 2025 17:58:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1757725115; x=1758329915; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=2BXXMTZbWkKZqT8QgJ9Z777RqiFOaP2Wc1It8eJXku8=; b=hKAdVg/A1cgqKS6p9i2KuodzZogaEVcz6+R6REIkiNiIbFfMinE02lC9EOoe6YQ662 QoLR9T6aT3+M7BjTiV7UHhhnL8XkKjyZyIXFiPtCqdXyqRhXZQVCsC5d/pExy5n63UVD aP3IcvsxqqlBvJIhGWqLfrRjmqsx4H8gcINoCK2y+hNmwLXGrio/G7e159/gpZcMF69K kaZmEu4fumfSdszmb6RAwXH0qFnnNqWRKA9VZMV1du0FKs+yZoo8fyd8Vjq+UH3lzPCr jJbdtu7AJXlgY45fa3FMZxSgib30KPPXZPVWOybYPPZXcTs7CcclB57K/d1DO8TrpOBv 6XDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1757725115; x=1758329915; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=2BXXMTZbWkKZqT8QgJ9Z777RqiFOaP2Wc1It8eJXku8=; b=LRHMJNislB7G+lbl4j+VGeWgmzz03m0L+1d8ZKxoE2WG9NkH9Jl8E0m7kYQ5m4fmHO id+JmGlxCIoUAkbvVG60LjrKbr2C1yp7uJocqOQZveCttsmB/ff+AOQ+I+DAP2pDOlRT duLkfYpjRr87adArRwhvEFVuuCdP5Z178ReZTdtPGsaFv4Et1U0ul0arrY8wPwTpvH44 NKkLzdcP/D1qQ3UvFZ1wDmTYr7zNXQvx3v5C6Bod6cjBFczKjAnmHol7jl7n20QrCAna zyY8EY7QZOq3AgkTnm98kPqiaS9k1QsO6OlRSWGodc8IersqBDcC92gy5eAZtBeSvgSc Jemw== X-Forwarded-Encrypted: i=1; AJvYcCX5yZn9oACV0oOmUPPakBefksexvh1GZMEHzpYwBkjBNfzzDvIOegnUDHLD/zTNVbZ9O82OCTThXqA6118=@vger.kernel.org X-Gm-Message-State: AOJu0YwDZsnOK80DTj5ynHMk6qHlJd4SZS3iP7pljzabgasBEf2HwS1A +8r6k4vmy9nrxSXXDKrLxPf263x73ogsTFRNbp9tmcNCyyCM8nMHckQj X-Gm-Gg: ASbGncuAg3JsQSTrn/Rp5EvwDoZk8Fh52rI8TrZ4csQ3DLJQxWwedPffny6RrXOqBCD nv+Zo7tDkBu4xaD3hHbz0t4iaHZiRKiDe4DBgK4p0wzdL/QGsNGAO+eeH4K1Mlg7fCII0mIGpAT zWW25/ghCEz5crQ8DEdgLPA/6nC2epqYr1Iuz+1B1DTc7WN/KGcthc4LulN4+RVeoPPQzECPHTJ 4XR0MxaMOuxn2GzgV4grJyH5DQnQR2L1ehMc4iFa3SwdGUaAjvp049CLZ0UMb9Pi4uxhA83uRRq Ln8CeHNKuPc7j8XwOU3J2QIZr+p2um/mpjNjzFR6tPc3Ju61ET4+TliH9/k3HXRg7jfP6aFJ+NO naS8REGwH1yppuVGepVDvllbbG14mXQ== X-Google-Smtp-Source: AGHT+IF4XezAq8wXNO6voYrJeDnCFhU1tJ+TfyE7OJRqFWOCMlq1YMWoUA8uaJ4xPb3fA3w8qZjP4Q== X-Received: by 2002:a05:6402:5242:b0:628:a4fb:3b44 with SMTP id 4fb4d7f45d1cf-62ed825998fmr4961876a12.1.1757725114882; Fri, 12 Sep 2025 17:58:34 -0700 (PDT) Received: from localhost ([212.73.77.104]) by smtp.gmail.com with UTF8SMTPSA id 4fb4d7f45d1cf-62ec33f3b16sm4143925a12.24.2025.09.12.17.58.30 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 12 Sep 2025 17:58:34 -0700 (PDT) From: Askar Safin To: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Linus Torvalds , Greg Kroah-Hartman , Christian Brauner , Al Viro , Jan Kara , Christoph Hellwig , Jens Axboe , Andy Shevchenko , Aleksa Sarai , =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= , Julian Stecklina , Gao Xiang , Art Nikpal , Andrew Morton , Eric Curtin , Alexander Graf , Rob Landley , Lennart Poettering , linux-arch@vger.kernel.org, linux-alpha@vger.kernel.org, linux-snps-arc@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-csky@vger.kernel.org, linux-hexagon@vger.kernel.org, loongarch@lists.linux.dev, linux-m68k@lists.linux-m68k.org, linux-mips@vger.kernel.org, linux-openrisc@vger.kernel.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, linux-um@lists.infradead.org, x86@kernel.org, Ingo Molnar , linux-block@vger.kernel.org, initramfs@vger.kernel.org, linux-api@vger.kernel.org, linux-doc@vger.kernel.org, linux-efi@vger.kernel.org, linux-ext4@vger.kernel.org, "Theodore Y . Ts'o" , linux-acpi@vger.kernel.org, Michal Simek , devicetree@vger.kernel.org, Luis Chamberlain , Kees Cook , Thorsten Blum , Heiko Carstens , patches@lists.linux.dev Subject: [PATCH RESEND 17/62] doc: modernize Documentation/filesystems/ramfs-rootfs-initramfs.rst Date: Sat, 13 Sep 2025 00:37:56 +0000 Message-ID: <20250913003842.41944-18-safinaskar@gmail.com> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250913003842.41944-1-safinaskar@gmail.com> References: <20250913003842.41944-1-safinaskar@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Update it to reflect initrd removal. Also I specified that error reports should go to linux-doc@vger.kernel.org , because Rob Landley said that he keeps getting reports about this document and is unable to fix them Signed-off-by: Askar Safin --- .../filesystems/ramfs-rootfs-initramfs.rst | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Documentation/filesystems/ramfs-rootfs-initramfs.rst b/Documen= tation/filesystems/ramfs-rootfs-initramfs.rst index fa4f81099cb4..38a9cf11f547 100644 --- a/Documentation/filesystems/ramfs-rootfs-initramfs.rst +++ b/Documentation/filesystems/ramfs-rootfs-initramfs.rst @@ -8,6 +8,8 @@ October 17, 2005 =20 :Author: Rob Landley =20 +Report errors in this document to + What is ramfs? -------------- =20 @@ -101,9 +103,9 @@ archive is extracted into it, the kernel will fall thro= ugh to the older code to locate and mount a root partition, then exec some variant of /sbin/init out of that. =20 -All this differs from the old initrd in several ways: +All this differs from the old initrd (removed in 2025) in several ways: =20 - - The old initrd was always a separate file, while the initramfs archive= is + - The old initrd was always a separate file, while the initramfs archive= can be linked into the linux kernel image. (The directory ``linux-*/usr`` is devoted to generating this archive during the build.) =20 @@ -137,7 +139,7 @@ Populating initramfs: =20 The 2.6 kernel build process always creates a gzipped cpio format initramfs archive and links it into the resulting kernel binary. By default, this -archive is empty (consuming 134 bytes on x86). +archive is nearly empty (consuming 134 bytes on x86). =20 The config option CONFIG_INITRAMFS_SOURCE (in General Setup in menuconfig, and living in usr/Kconfig) can be used to specify a source for the @@ -222,15 +224,13 @@ use in place of the above config file:: External initramfs images: -------------------------- =20 -If the kernel has initrd support enabled, an external cpio.gz archive can = also -be passed into a 2.6 kernel in place of an initrd. In this case, the kern= el -will autodetect the type (initramfs, not initrd) and extract the external = cpio +If the kernel has CONFIG_BLK_DEV_INITRD enabled, an external cpio.gz archi= ve can also +be passed into a 2.6 kernel. In this case, the kernel will extract the ex= ternal cpio archive into rootfs before trying to run /init. =20 -This has the memory efficiency advantages of initramfs (no ramdisk block -device) but the separate packaging of initrd (which is nice if you have +This is nice if you have non-GPL code you'd like to run from initramfs, without conflating it with -the GPL licensed Linux kernel binary). +the GPL licensed Linux kernel binary. =20 It can also be used to supplement the kernel's built-in initramfs image. = The files in the external archive will overwrite any conflicting files in @@ -278,7 +278,7 @@ User Mode Linux, like so:: EOF gcc -static hello.c -o init echo init | cpio -o -H newc | gzip > test.cpio.gz - # Testing external initramfs using the initrd loading mechanism. + # Testing external initramfs. qemu -kernel /boot/vmlinuz -initrd test.cpio.gz /dev/zero =20 When debugging a normal root filesystem, it's nice to be able to boot with --=20 2.47.2