From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ed1-f45.google.com (mail-ed1-f45.google.com [209.85.208.45]) (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 A941A15624D for ; Sat, 13 Sep 2025 00:58:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.45 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757725121; cv=none; b=NtKG/QzNNxiUGoi7IIeYozgEyPeygwQumom9HrznukZvXmWlubbhWB79u/icTtCKfMGQnm9N6lVqL3//rwfgz2AbmPOKMbY1az0fkylLyBjlC3Bm5+QJ99bNz6eI04Scu1Tun5GRisCuvyeiBVGWCvdyMqwRgjg7JyDDP4ALE+M= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757725121; c=relaxed/simple; bh=riLYrwvey4IG1vm31BCl7axPrjxd4nPuzw1Lf4FnM3A=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=d8wbDwETLwh+cNpIidCDdENgIkeujubywnWNyKFIh+8+H+kZm0SKQ/kHhpMnZiHFvR3CwTs6wcmpJL149+DLb/4VTpPYrupDoS+R4zLKSZ/ubCj8+aj8sqW/ybRb6ZbR/FZvab4K6qByeAE7JR7otq2zNM/Id6Z0RyYFlevjF4A= 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=DzX33owQ; arc=none smtp.client-ip=209.85.208.45 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="DzX33owQ" Received: by mail-ed1-f45.google.com with SMTP id 4fb4d7f45d1cf-6228de280ccso4861929a12.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=lists.linux.dev; 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=DzX33owQJirHW7ZcUr0FiNGgSFUBYr+OuuV0awGHT2Uq7Qn4XbjyQuumXzUCGu/HLl zMOfkGx/k3DKyLa+z4UK9Qcu7bkTynemX+jeQcibRetUpaKnBDZSTRSC809fze/aCJBD palhy0mdfVf+912qloOlgqQ8bBnHVXcGEFLlmdYnlnJzzx7g4Exswm7RLIWJlqx6lXB+ K35LQTywg8Fk/xN69FI3rde/fcYdQ6On4BK9SyKucv5XutUY7nCSTYxr9WEJE2b5cUKU CyiqpI7h8Wp1ADghaSS4ruR0SlaOV7JgclXTpOT8iSEPmwYukJJrtMepkYMcRMNsQv0J 0DAQ== 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=HTLNbMUNdC0TRFDf64I7LJ3bq2Rka/XiVICr3GKKtmQHA8TOpd1n1kPQSYmh1dSvHr Vx0uQxQcMniAlRZJn+26bKG8wc92AGLuj1shQWLDlrXpIeLm6M9dWySIGjQrhVf77vy1 3G5N7IPkKKmHpPhHwIQouxTSlEKnF7P+l5SVp7GZwGoZD8+kgCEJMNGuYLzXNjBagwKB v4mAaRMyB7Qn+l4NBtpfPVjwn1x/VSbfuU+rc8KVVx7VNqUvnFuX0MU6aQiJ9ZzY5/fq TVy0qjA9H+8O1zqyS5/aamzEKrCKAKkX5VrKUXfQIQuDLo49PS4KSY6wPlwF/IoXEwRH W2/g== X-Forwarded-Encrypted: i=1; AJvYcCViw+O5BDlpsFKHZcDXMInYZAe12GjWhVuoBiKvvGs99OTwpEhLacczRLDGKayd5CJo5nIff0iO@lists.linux.dev X-Gm-Message-State: AOJu0Yxm79gtXVSBd/dcL6QK3j88g5UZ82PSXIAyT4az6b+6FiSDhUhE tmn39arLzY4HR3BG5OyuyTxG35LVzAQ494+mxvYnAH72mPMjnQP88aK5 X-Gm-Gg: ASbGncvdHtUKayXdl9fVDUwXVKgi72NEDIspmqVuDlc1hjnF7E9fGGT1adXs1Q6WgrX VyRIg6rRXC12YFJeP46hAowu6Tl65LzfVH+J1McckvtIhfkggU0D7nyGSGmXKOLrRHEcF30lhQZ sPFQB2qoq46uDNCP/lwAkWHdyJ/5U/GiROiMT5/jCe0oQIgBSvRDmOEG00lgzuODfjznOwB6weo A90NWfR12s2tN5iw7Omp5tBFhJH1q3Gn/r23QPu85YS/wt/0i66AfuCKj9n/VqmRhjoi/xAk9HY EC/Dr0mUM7jhbrTJcGQ9cf3kOgS5pI65EYY9j6QrvApxd9svlVHv30kgYfJ5VLW02qJH4SaYUEr r42uZisVUvx/nGQ3uhrEDgSK5aUy4mw== 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: patches@lists.linux.dev 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