From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ed1-f47.google.com (mail-ed1-f47.google.com [209.85.208.47]) (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 7838D11CA9 for ; Sat, 13 Sep 2025 00:58:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.47 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757725120; cv=none; b=IXscUzX9f1XGwiV4cat1rtPgJ1bIidkyJ2QFaMGUTMFfGbp6KhJsdo05Q+jItUk1k2qiYYG2PGK5G7Ed/VXqG4ZfhtvltpqxiIvoOrOj+6rpA6a5h0L/eAS3nYJl8Aj7RSvlJckoBJaWhBeDEqpeYNW/1X+26fhsL/cfSJEzxq0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757725120; c=relaxed/simple; bh=riLYrwvey4IG1vm31BCl7axPrjxd4nPuzw1Lf4FnM3A=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=mGSuhcjSgG8aCBm8gn5I05Ep+3Z4xoRo87m65D+kPz31NinbPd3wae5htKAcMHYWXMMchEx/TIWKPU3e7P0MC2XULUc2WmvuO2WVYZW6TE67RWMwdZn2Pkl728MRL7fWRIzAeg+FyfCZwwMUXNl18UXq9O7EIVsus1dzH84CLbg= 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.47 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-f47.google.com with SMTP id 4fb4d7f45d1cf-6188b5ad4f0so3984404a12.0 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=wxhEOgIebmLAVJiWcmgpW43iUDz9L/s1QMW6LcRAkoxRy3gB+kUGyM6k+Xykzat58P vT4TUMB4a4lone5/3rNpO5S+3JpzoM+pHaSt243QDdg+XZ+LZEbfk145gdKtaq4tmiK1 tfCuZISugrlvsAIligud0rT2tpjsQ/sKQm3GFLHqBltQVc2s0I9ZLWSox0lxgALGzZGT jc6Wa3WlcXHWYJkwlrNaOiIiExJT4ISi4JgNpJ2KtKAmxPsBK6eDn0ogS1zBH1+LTs8m z5KSAMhWAu4LaXLhSeMGN5VCnLPqYW5yFCOyKQdqnIyR7WtRXLP685PSitllmHjIHwzW u52Q== X-Forwarded-Encrypted: i=1; AJvYcCWk7w/x22ZQip0YPC8cszVtG3QdMPo1Eyq+0kU6b+APWMiWZu1FeGhPmzhWXYMWn+UNyPZXa4uLkaM=@vger.kernel.org X-Gm-Message-State: AOJu0YxeSPLZtPFuxV2HImnH3tD0WvPvrBwMnAI3Ckt9O2Cl2QbbYNvj /eFzm7MGaGP7MpU2taugLLS/jxtsx6pkGQaWFtEw2f5n11X3y9NtYAIA X-Gm-Gg: ASbGncuWEEegybWgD70qSVIqQEcHfcNTjZMx7v2YbsTleAFeoVIuS/d9PBCwrhBoGej Pi3svmlsk/wLQMLb46ekjRj5ccx/6DO/ksHRBuqwCYYvyldoT0EL5l+ECMdsSCIqXy/b8ZARETg oeb5bD0En0JAw2LbCrqeD0Fb31wmR1v8RSZ5P8E9OqRQ+4ZR59TiPlsDCcfgkIkyWkE0VhDo9lO hUmaKd1JuYvwpsi3JnrugD/rLjWHEhhTvrfA6McmUR+vfWzUGC6NDeyT316xRZU+P1xNg+JTbZt SXnZW7dw5Y1IKNuHzTnPMVw/6LiVKIsZtOOqaTzimKapswwXta8v9YlQLyPbcYCkNzfrccI1bcH L3M8zHZL3Nm5feBNBCxt5tLC6GCu3tw== 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-api@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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/Documentation/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 :Author: Rob Landley +Report errors in this document to + What is ramfs? -------------- @@ -101,9 +103,9 @@ archive is extracted into it, the kernel will fall through to the older code to locate and mount a root partition, then exec some variant of /sbin/init out of that. -All this differs from the old initrd in several ways: +All this differs from the old initrd (removed in 2025) in several ways: - - 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.) @@ -137,7 +139,7 @@ Populating initramfs: 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). 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: -------------------------- -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 kernel -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 archive can also +be passed into a 2.6 kernel. In this case, the kernel will extract the external cpio archive into rootfs before trying to run /init. -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. 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 When debugging a normal root filesystem, it's nice to be able to boot with -- 2.47.2