From nobody Sat Feb 7 11:05:12 2026 Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.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 41FEE2C326B for ; Fri, 10 Oct 2025 09:42:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.47 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760089345; cv=none; b=S7HLaUTd228k84JV8/aa32KDvYuoFZMt6oo593psOj8NS3BzUMwglm5Kt+ud/wi8FsbBsi2XSfCP/aCMSbfxNtxm58FoOyL64mPizlPVmMHkt0dCixqAUHbcH40ti56enyijBd7U/azbV1xORcKCfxFRpkqSVw/uSi2wloDG1TY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760089345; c=relaxed/simple; bh=vpQ+LSLHouZBwGQBSVAWIUVgEf6yUW/Fn0AY8RH0AoY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=DGHqIQlJak345kVU0mX9eGecqa6Y9rc7Gi5sBz7T8bzseY+DXRQmuCg5nYuHZRvWsv9Ab3JKWVfH+gdFAuV4haf0axngfjS1xyyPIhRBlDqY1kTxKeqYIHYnN1lqIC3bcAgtyqGtj9QkzQDkT5WQVeFljyptxamAJWPBU77Q04A= 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=TnAOXH22; arc=none smtp.client-ip=209.85.128.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="TnAOXH22" Received: by mail-wm1-f47.google.com with SMTP id 5b1f17b1804b1-46e5980471eso10212325e9.2 for ; Fri, 10 Oct 2025 02:42:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1760089336; x=1760694136; 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=yB+XQb9dVBYMVnL4S8fyMdF/923o0cYSVo05HxH73v4=; b=TnAOXH22joUBWeDFi3SJV91CLC4+/N0+FB/jANT4nnEvRw297wobaPMZhQcosUqoVn MfeMc68XOFLZ5wTi1GSj/sXxDUtSyRG8/1wEK/iqjAnPOeC35dmCFdhWA+zZjQ4kCmUK 85plJ6WJV/Rd5RPq9L4Pi/eyWc43r9imFtFeObShrzKVKMEoQV3cERBfIwP10xUb0Ol9 pBwf71B24jw7pRoP39HFculG6cDtNGvJzwuy5n8zZ5B1GXs7JrbQbLifqjPo6wKHBhpx XoHm1TISiXBZMj949r7qFjJzG7uPyPo+xQM4Mw/amx+r2cN1M5PfkaokgmGX4ykmGOmW Jcnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1760089336; x=1760694136; 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=yB+XQb9dVBYMVnL4S8fyMdF/923o0cYSVo05HxH73v4=; b=elrFtAu7TGnP773FfPG9HO83Rar0fJN/O3+P57MbQz0NhTm+GFZAq7N3L/hrW1xRZA bGfz9inMxPMm8wSoO21rx4VTiJMBK8ybvkgFSMLcFEaoXXujj3H6BdJuN+UL7sJBpswu KEGzsOI9cQe37ZJ9KKPUadxAA8cIS7NpfWELOb+xorlfwlexQ0iz3daNtdoibEU1/T2R +MMYKT28F+SHxmF1p8pE15OLk7g20h4q+AVOYD16mOltiQr9EsI66/HfQgBf7VOxm+of 15YFAIxHu03ufSuIg1jVop2ESkSyUw20uRS9x+yg7DeMTT8NOhv0FwMvf9Qlm4m2FjXD +4OQ== X-Forwarded-Encrypted: i=1; AJvYcCXYyxlW5LtNDyOOr5f+pq4I5024Igoy9CmMzfcu2EO+eRwBOJFe3zMUJe97lSNikk+IvD9UftkWnM64hNo=@vger.kernel.org X-Gm-Message-State: AOJu0Yx1rmwgQmkEc/KWLWuSyhTQmB6X2KxB5G1cOtTvlJY9tdE3a6xA IU9E51gwIzY+MrYqWqcT3pXhYPvyECTxW9PsCOWZO4o8vbbVtsbas7/C X-Gm-Gg: ASbGncuYER2AcBj2rn1aZ8c4RjoFtGhEsVFj46C2ttbbaNuB2bRCTF3nS4qvx1HckAT 2cL2R9C3q+8HJ/CWRYKsxWBRuK/yv8RY7Qs+Yw0sGFpmv4oNt9gLklN2EC3u5D1dXYxX6+8Seyp RBP8j8lSBvEk/JwOmvUZTzjdiWcG+zJre188AX28JuxbBsZYaOvh1SCes2mTfneAMYM8W+6SeCA Rb+rgbhO7gpociEjHFkosgcOkji7RdQGCM9FKE+rJguZrd/1+54lTMyBa27PYqlwGG9XZ4UAwy+ 2fWS9Ewskaon7yVOfpZHiU1O8y4KUgGzEXt0Pl4DEJZcrz5xE523h0ch/k/ZsGUmo0O63tFEjS7 UNDm4GVDAssCv47wzxWg1D3djBbcoUBj9PWuv9Q== X-Google-Smtp-Source: AGHT+IGhj1/Xta/HDezSCHmYKGPM6KRR6NesF+F9b2XmUayFL7V4iH3QP/fT9tINiA4R8cJX5aHPpA== X-Received: by 2002:a05:600c:6383:b0:45d:d353:a491 with SMTP id 5b1f17b1804b1-46fa9a8c425mr74390025e9.1.1760089336065; Fri, 10 Oct 2025 02:42:16 -0700 (PDT) Received: from localhost ([212.73.77.104]) by smtp.gmail.com with UTF8SMTPSA id 5b1f17b1804b1-46fab3d7df4sm59813525e9.1.2025.10.10.02.42.12 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 10 Oct 2025 02:42:15 -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 , Alexander Graf , Rob Landley , Lennart Poettering , linux-arch@vger.kernel.org, linux-block@vger.kernel.org, initramfs@vger.kernel.org, linux-api@vger.kernel.org, linux-doc@vger.kernel.org, Michal Simek , Luis Chamberlain , Kees Cook , Thorsten Blum , Heiko Carstens , Arnd Bergmann , Dave Young , Christophe Leroy , Krzysztof Kozlowski , Borislav Petkov , Jessica Clarke , Nicolas Schichan , David Disseldorp , patches@lists.linux.dev Subject: [PATCH v2 1/3] init: remove deprecated "load_ramdisk" and "prompt_ramdisk" command line parameters Date: Fri, 10 Oct 2025 09:40:45 +0000 Message-ID: <20251010094047.3111495-2-safinaskar@gmail.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20251010094047.3111495-1-safinaskar@gmail.com> References: <20251010094047.3111495-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" ...which do nothing. They were deprecated (in documentation) in 6b99e6e6aa62 ("Documentation/admin-guide: blockdev/ramdisk: remove use of "rdev"") and in kernel messages in c8376994c86c ("initrd: remove support for multiple floppies") Signed-off-by: Askar Safin --- Documentation/admin-guide/kernel-parameters.txt | 4 ---- arch/arm/configs/neponset_defconfig | 2 +- init/do_mounts.c | 7 ------- init/do_mounts_rd.c | 7 ------- 4 files changed, 1 insertion(+), 19 deletions(-) diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentatio= n/admin-guide/kernel-parameters.txt index e019db1633fd..521ab3425504 100644 --- a/Documentation/admin-guide/kernel-parameters.txt +++ b/Documentation/admin-guide/kernel-parameters.txt @@ -3280,8 +3280,6 @@ If there are multiple matching configurations changing the same attribute, the last one is used. =20 - load_ramdisk=3D [RAM] [Deprecated] - lockd.nlm_grace_period=3DP [NFS] Assign grace period. Format: =20 @@ -5245,8 +5243,6 @@ Param: - step/bucket size as a power of 2 for statistical time based profiling. =20 - prompt_ramdisk=3D [RAM] [Deprecated] - prot_virt=3D [S390] enable hosting protected virtual machines isolated from the hypervisor (if hardware supports that). If enabled, the default kernel base address diff --git a/arch/arm/configs/neponset_defconfig b/arch/arm/configs/neponse= t_defconfig index 2227f86100ad..4d720001c12e 100644 --- a/arch/arm/configs/neponset_defconfig +++ b/arch/arm/configs/neponset_defconfig @@ -9,7 +9,7 @@ CONFIG_ASSABET_NEPONSET=3Dy CONFIG_ZBOOT_ROM_TEXT=3D0x80000 CONFIG_ZBOOT_ROM_BSS=3D0xc1000000 CONFIG_ZBOOT_ROM=3Dy -CONFIG_CMDLINE=3D"console=3DttySA0,38400n8 cpufreq=3D221200 rw root=3D/dev= /mtdblock2 mtdparts=3Dsa1100:512K(boot),1M(kernel),2560K(initrd),4M(root) l= oad_ramdisk=3D1 prompt_ramdisk=3D0 mem=3D32M noinitrd initrd=3D0xc0800000,3= M" +CONFIG_CMDLINE=3D"console=3DttySA0,38400n8 cpufreq=3D221200 rw root=3D/dev= /mtdblock2 mtdparts=3Dsa1100:512K(boot),1M(kernel),2560K(initrd),4M(root) m= em=3D32M noinitrd initrd=3D0xc0800000,3M" CONFIG_FPE_NWFPE=3Dy CONFIG_PM=3Dy CONFIG_MODULES=3Dy diff --git a/init/do_mounts.c b/init/do_mounts.c index 6af29da8889e..0f2f44e6250c 100644 --- a/init/do_mounts.c +++ b/init/do_mounts.c @@ -34,13 +34,6 @@ static int root_wait; =20 dev_t ROOT_DEV; =20 -static int __init load_ramdisk(char *str) -{ - pr_warn("ignoring the deprecated load_ramdisk=3D option\n"); - return 1; -} -__setup("load_ramdisk=3D", load_ramdisk); - static int __init readonly(char *str) { if (*str) diff --git a/init/do_mounts_rd.c b/init/do_mounts_rd.c index 19d9f33dcacf..5311f2d7edc8 100644 --- a/init/do_mounts_rd.c +++ b/init/do_mounts_rd.c @@ -18,13 +18,6 @@ static struct file *in_file, *out_file; static loff_t in_pos, out_pos; =20 -static int __init prompt_ramdisk(char *str) -{ - pr_warn("ignoring the deprecated prompt_ramdisk=3D option\n"); - return 1; -} -__setup("prompt_ramdisk=3D", prompt_ramdisk); - int __initdata rd_image_start; /* starting block # of image */ =20 static int __init ramdisk_start_setup(char *str) --=20 2.47.3 From nobody Sat Feb 7 11:05:12 2026 Received: from mail-wm1-f48.google.com (mail-wm1-f48.google.com [209.85.128.48]) (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 0709927604E for ; Fri, 10 Oct 2025 09:42:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.48 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760089366; cv=none; b=WUcm/kkdOOw5PH8JO0ykPnk9E+v3feE56Pe+vFwTqdQLhcpCrr1ZiwUwmQ27MoC8F/zmq+3oA+A6sYVj/w/c9X8cpw6Q3W2F5nyJJo53kLYhC5mxAzJPxssSX9yV8HjZ/4DokClou1wOXOi0m5a6fcACi1EiZfmU2ug+SQ7egt4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760089366; c=relaxed/simple; bh=gjPlGissF6EYFYZPaMD+IJyLT7L2Kw6o1SmPVz9xBaU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ozYCFguqwN8Mt8I0/TpLbI8zynCAOKzJazukOsK8v6F1ur0nT3aXe5j7P38bPdizdZeYRuEJulQclhAVpDlFGpyJoBnQQXBwR2Be0urIQGJclr6HRXjeWUTjH1e71ZBw8NkL/M/AMgTW7DnMYoHx9VKvGkAj6ayxSiDgK17MFv0= 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=M67juhzb; arc=none smtp.client-ip=209.85.128.48 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="M67juhzb" Received: by mail-wm1-f48.google.com with SMTP id 5b1f17b1804b1-46e2e6a708fso12238795e9.0 for ; Fri, 10 Oct 2025 02:42:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1760089361; x=1760694161; 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=GGor90y5sQmBa6+afLj7nUayHxGY9HpJCoz4p3w31VA=; b=M67juhzbW+EksNbNENYBsjEYULuJJiJwyd4z+LPON174cTXkSu29UnLru21DY2wjOR t/GvC+7fGPPzENHHCtoGW25nCdPiBkwgrGc+OYs7VD2z8g4qzw24CLoTp1l6/emQJVTW r4RDR4nBewy5rUal5YsAbDmenOeiL82lY1d5iUC/5bPiv7i2jXcIHnQ2DBpfuKxyTtma /0jz2I2aidpEiQjaiYQQN6rRzJHFysCk5hypK79yRWy6a+qKgW0plx/wgXESKXFx0bTa o5S67y1aawV1Y1s/6l21fZePmGOazaUlLZTdUNI1wia0DkMBvjsL/FwOjAzSFLgM/qDL pJtQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1760089361; x=1760694161; 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=GGor90y5sQmBa6+afLj7nUayHxGY9HpJCoz4p3w31VA=; b=pj9nkIqs3JqZL2FjE86q3tH94N4bc7k8KEKbJJwSy2ChjArnmDfhrFXV8fZfzKmsnK 3l+0CauBiZ2COBL8ngBQH6FdOH3LJ2AFYtj2h+p6gfvCvSVTEsJ5nVajwYYedbBjEQHs sIkg1w/8BWxSsWMbosETwizMxkqXkDQYuXvSTzGBn7cMWw5tU9C7oN6wjBSWxWXFQfi4 mow0SazWC7OQFshMHwBgtiUcP4pvhz7aSwX4mdR1aAzt4QIWUKjkZh1s3TA0+eyjFO9w aKTlemoWSZb5N8bFlFEPnkRIsISwivgHfhhLo8MZrokdfaWRRQXb5P5SWQQ4cc4gF/9U 4xJA== X-Forwarded-Encrypted: i=1; AJvYcCU2yQ34PH9gDRH/v38bCN08WQsvZWGtVE3M/Wgd9jmAks/Oy1o//9KN2xXJdYrm+5Cy9WnqUJJBSn2NKfE=@vger.kernel.org X-Gm-Message-State: AOJu0Yw3iow3Iz1v2/aGQAt5hEfZ2UOmBhR3tWLg5kvCAnEbmC1nSaQG ubnfhFqR7m5ZXEFEQE1Gu6eycIo0PDTriDZBmC7qNyLMNZLvY7FZjx40 X-Gm-Gg: ASbGnctsrjORqfhBsAY+f1qNXxhrY5hxvP5UuMBRxYiqyuhDgnB+HpEZf1kuEEvpAP2 MXdWNKtxuUGcwgV9rZM4wjvUNt1z0pPCYnXeQfyJRdFWOdElgWe7fj06MJfgims1rwsZX4oq+Ec xKdkOhH5nPoR4gElTYemU3dYdjfwtUjJb+A8X7XUbupGOVsevq2GjW6p6eVtYxJGPppWyj2u2aA xhmtpYp82/mvWFlmDyHGX+2ibWHAy99btcums7M4NBmYHDDMo8x1HPajuT2gn9RcJ97W75uZYoW G9ucQ5JlcQHkurzAMRr+Qyu8I3mRVxaEs8Wvt5AacyPsmgLzsX+wkH9HFZCe/AN4yYLE/XCRQ5m T/JMOkLy69/1etMdoGq0QQzUKzUhmgyeT+PkVCA== X-Google-Smtp-Source: AGHT+IG5hUlNpNqFmjuCUBM21GrnZZo3v6yQYLN20PP8R9c3EH7G+xd/e7926FvUzEtuyqYUZ8VCzA== X-Received: by 2002:a05:6000:4305:b0:3c8:d236:26bd with SMTP id ffacd0b85a97d-42666ac2ce9mr6828418f8f.11.1760089360889; Fri, 10 Oct 2025 02:42:40 -0700 (PDT) Received: from localhost ([212.73.77.104]) by smtp.gmail.com with UTF8SMTPSA id ffacd0b85a97d-426ce582b39sm3248294f8f.15.2025.10.10.02.42.37 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 10 Oct 2025 02:42:40 -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 , Alexander Graf , Rob Landley , Lennart Poettering , linux-arch@vger.kernel.org, linux-block@vger.kernel.org, initramfs@vger.kernel.org, linux-api@vger.kernel.org, linux-doc@vger.kernel.org, Michal Simek , Luis Chamberlain , Kees Cook , Thorsten Blum , Heiko Carstens , Arnd Bergmann , Dave Young , Christophe Leroy , Krzysztof Kozlowski , Borislav Petkov , Jessica Clarke , Nicolas Schichan , David Disseldorp , patches@lists.linux.dev Subject: [PATCH v2 2/3] initrd: remove deprecated code path (linuxrc) Date: Fri, 10 Oct 2025 09:40:46 +0000 Message-ID: <20251010094047.3111495-3-safinaskar@gmail.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20251010094047.3111495-1-safinaskar@gmail.com> References: <20251010094047.3111495-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" Remove linuxrc initrd code path, which was deprecated in 2020. Initramfs and (non-initial) RAM disks (i. e. brd) still work. Both built-in and bootloader-supplied initramfs still work. Non-linuxrc initrd code path (i. e. using /dev/ram as final root filesystem) still works, but I put deprecation message into it Signed-off-by: Askar Safin --- .../admin-guide/kernel-parameters.txt | 4 +- fs/init.c | 14 --- include/linux/init_syscalls.h | 1 - include/linux/initrd.h | 2 - init/do_mounts.c | 4 +- init/do_mounts.h | 18 +--- init/do_mounts_initrd.c | 85 ++----------------- init/do_mounts_rd.c | 17 +--- 8 files changed, 17 insertions(+), 128 deletions(-) diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentatio= n/admin-guide/kernel-parameters.txt index 521ab3425504..24d8899d8a39 100644 --- a/Documentation/admin-guide/kernel-parameters.txt +++ b/Documentation/admin-guide/kernel-parameters.txt @@ -4285,7 +4285,7 @@ Note that this argument takes precedence over the CONFIG_RCU_NOCB_CPU_DEFAULT_ALL option. =20 - noinitrd [RAM] Tells the kernel not to load any configured + noinitrd [Deprecated,RAM] Tells the kernel not to load any configured initial RAM disk. =20 nointremap [X86-64,Intel-IOMMU,EARLY] Do not enable interrupt @@ -5299,7 +5299,7 @@ ramdisk_size=3D [RAM] Sizes of RAM disks in kilobytes See Documentation/admin-guide/blockdev/ramdisk.rst. =20 - ramdisk_start=3D [RAM] RAM disk image start address + ramdisk_start=3D [Deprecated,RAM] RAM disk image start address =20 random.trust_cpu=3Doff [KNL,EARLY] Disable trusting the use of the CPU's diff --git a/fs/init.c b/fs/init.c index 07f592ccdba8..60719494d9a0 100644 --- a/fs/init.c +++ b/fs/init.c @@ -27,20 +27,6 @@ int __init init_mount(const char *dev_name, const char *= dir_name, return ret; } =20 -int __init init_umount(const char *name, int flags) -{ - int lookup_flags =3D LOOKUP_MOUNTPOINT; - struct path path; - int ret; - - if (!(flags & UMOUNT_NOFOLLOW)) - lookup_flags |=3D LOOKUP_FOLLOW; - ret =3D kern_path(name, lookup_flags, &path); - if (ret) - return ret; - return path_umount(&path, flags); -} - int __init init_chdir(const char *filename) { struct path path; diff --git a/include/linux/init_syscalls.h b/include/linux/init_syscalls.h index 92045d18cbfc..0bdbc458a881 100644 --- a/include/linux/init_syscalls.h +++ b/include/linux/init_syscalls.h @@ -2,7 +2,6 @@ =20 int __init init_mount(const char *dev_name, const char *dir_name, const char *type_page, unsigned long flags, void *data_page); -int __init init_umount(const char *name, int flags); int __init init_chdir(const char *filename); int __init init_chroot(const char *filename); int __init init_chown(const char *filename, uid_t user, gid_t group, int f= lags); diff --git a/include/linux/initrd.h b/include/linux/initrd.h index f1a1f4c92ded..7e5d26c8136f 100644 --- a/include/linux/initrd.h +++ b/include/linux/initrd.h @@ -3,8 +3,6 @@ #ifndef __LINUX_INITRD_H #define __LINUX_INITRD_H =20 -#define INITRD_MINOR 250 /* shouldn't collide with /dev/ram* too soon ... = */ - /* starting block # of image */ extern int rd_image_start; =20 diff --git a/init/do_mounts.c b/init/do_mounts.c index 0f2f44e6250c..1054ad3c905a 100644 --- a/init/do_mounts.c +++ b/init/do_mounts.c @@ -476,13 +476,11 @@ void __init prepare_namespace(void) if (saved_root_name[0]) ROOT_DEV =3D parse_root_device(saved_root_name); =20 - if (initrd_load(saved_root_name)) - goto out; + initrd_load(); =20 if (root_wait) wait_for_root(saved_root_name); mount_root(saved_root_name); -out: devtmpfs_mount(); init_mount(".", "/", NULL, MS_MOVE, NULL); init_chroot("."); diff --git a/init/do_mounts.h b/init/do_mounts.h index 6069ea3eb80d..a386ee5314c9 100644 --- a/init/do_mounts.h +++ b/init/do_mounts.h @@ -23,25 +23,15 @@ static inline __init int create_dev(char *name, dev_t d= ev) } =20 #ifdef CONFIG_BLK_DEV_RAM - -int __init rd_load_disk(int n); -int __init rd_load_image(char *from); - +int __init rd_load_image(void); #else - -static inline int rd_load_disk(int n) { return 0; } -static inline int rd_load_image(char *from) { return 0; } - +static inline int rd_load_image(void) { return 0; } #endif =20 #ifdef CONFIG_BLK_DEV_INITRD -bool __init initrd_load(char *root_device_name); +void __init initrd_load(void); #else -static inline bool initrd_load(char *root_device_name) -{ - return false; - } - +static inline void initrd_load(void) { } #endif =20 /* Ensure that async file closing finished to prevent spurious errors. */ diff --git a/init/do_mounts_initrd.c b/init/do_mounts_initrd.c index f6867bad0d78..d4f5f4c60a22 100644 --- a/init/do_mounts_initrd.c +++ b/init/do_mounts_initrd.c @@ -2,13 +2,7 @@ #include #include #include -#include -#include #include -#include -#include -#include -#include =20 #include "do_mounts.h" =20 @@ -41,6 +35,7 @@ late_initcall(kernel_do_mounts_initrd_sysctls_init); =20 static int __init no_initrd(char *str) { + pr_warn("noinitrd option is deprecated and will be removed soon\n"); mount_initrd =3D 0; return 1; } @@ -70,85 +65,17 @@ static int __init early_initrd(char *p) } early_param("initrd", early_initrd); =20 -static int __init init_linuxrc(struct subprocess_info *info, struct cred *= new) -{ - ksys_unshare(CLONE_FS | CLONE_FILES); - console_on_rootfs(); - /* move initrd over / and chdir/chroot in initrd root */ - init_chdir("/root"); - init_mount(".", "/", NULL, MS_MOVE, NULL); - init_chroot("."); - ksys_setsid(); - return 0; -} - -static void __init handle_initrd(char *root_device_name) -{ - struct subprocess_info *info; - static char *argv[] =3D { "linuxrc", NULL, }; - extern char *envp_init[]; - int error; - - pr_warn("using deprecated initrd support, will be removed soon.\n"); - - real_root_dev =3D new_encode_dev(ROOT_DEV); - create_dev("/dev/root.old", Root_RAM0); - /* mount initrd on rootfs' /root */ - mount_root_generic("/dev/root.old", root_device_name, - root_mountflags & ~MS_RDONLY); - init_mkdir("/old", 0700); - init_chdir("/old"); - - info =3D call_usermodehelper_setup("/linuxrc", argv, envp_init, - GFP_KERNEL, init_linuxrc, NULL, NULL); - if (!info) - return; - call_usermodehelper_exec(info, UMH_WAIT_PROC|UMH_FREEZABLE); - - /* move initrd to rootfs' /old */ - init_mount("..", ".", NULL, MS_MOVE, NULL); - /* switch root and cwd back to / of rootfs */ - init_chroot(".."); - - if (new_decode_dev(real_root_dev) =3D=3D Root_RAM0) { - init_chdir("/old"); - return; - } - - init_chdir("/"); - ROOT_DEV =3D new_decode_dev(real_root_dev); - mount_root(root_device_name); - - printk(KERN_NOTICE "Trying to move old root to /initrd ... "); - error =3D init_mount("/old", "/root/initrd", NULL, MS_MOVE, NULL); - if (!error) - printk("okay\n"); - else { - if (error =3D=3D -ENOENT) - printk("/initrd does not exist. Ignored.\n"); - else - printk("failed\n"); - printk(KERN_NOTICE "Unmounting old root\n"); - init_umount("/old", MNT_DETACH); - } -} - -bool __init initrd_load(char *root_device_name) +void __init initrd_load(void) { if (mount_initrd) { create_dev("/dev/ram", Root_RAM0); /* - * Load the initrd data into /dev/ram0. Execute it as initrd - * unless /dev/ram0 is supposed to be our actual root device, - * in that case the ram disk is just set up here, and gets - * mounted in the normal path. + * Load the initrd data into /dev/ram0. */ - if (rd_load_image("/initrd.image") && ROOT_DEV !=3D Root_RAM0) { - init_unlink("/initrd.image"); - handle_initrd(root_device_name); - return true; + if (rd_load_image()) { + pr_warn("using deprecated initrd support, will be removed in September = 2026; " + "use initramfs instead or (as a last resort) /sys/firmware/initrd.\n"); } } init_unlink("/initrd.image"); - return false; } diff --git a/init/do_mounts_rd.c b/init/do_mounts_rd.c index 5311f2d7edc8..0a021bbcd501 100644 --- a/init/do_mounts_rd.c +++ b/init/do_mounts_rd.c @@ -22,6 +22,7 @@ int __initdata rd_image_start; /* starting block # of im= age */ =20 static int __init ramdisk_start_setup(char *str) { + pr_warn("ramdisk_start=3D option is deprecated and will be removed soon\n= "); rd_image_start =3D simple_strtol(str,NULL,0); return 1; } @@ -177,7 +178,7 @@ static unsigned long nr_blocks(struct file *file) return i_size_read(inode) >> 10; } =20 -int __init rd_load_image(char *from) +int __init rd_load_image(void) { int res =3D 0; unsigned long rd_blocks, devblocks, nr_disks; @@ -191,7 +192,7 @@ int __init rd_load_image(char *from) if (IS_ERR(out_file)) goto out; =20 - in_file =3D filp_open(from, O_RDONLY, 0); + in_file =3D filp_open("/initrd.image", O_RDONLY, 0); if (IS_ERR(in_file)) goto noclose_input; =20 @@ -220,10 +221,7 @@ int __init rd_load_image(char *from) /* * OK, time to copy in the data */ - if (strcmp(from, "/initrd.image") =3D=3D 0) - devblocks =3D nblocks; - else - devblocks =3D nr_blocks(in_file); + devblocks =3D nblocks; =20 if (devblocks =3D=3D 0) { printk(KERN_ERR "RAMDISK: could not determine device size\n"); @@ -267,13 +265,6 @@ int __init rd_load_image(char *from) return res; } =20 -int __init rd_load_disk(int n) -{ - create_dev("/dev/root", ROOT_DEV); - create_dev("/dev/ram", MKDEV(RAMDISK_MAJOR, n)); - return rd_load_image("/dev/root"); -} - static int exit_code; static int decompress_error; =20 --=20 2.47.3 From nobody Sat Feb 7 11:05:12 2026 Received: from mail-wr1-f47.google.com (mail-wr1-f47.google.com [209.85.221.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 66BCC2C178E for ; Fri, 10 Oct 2025 09:43:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.47 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760089400; cv=none; b=WnjquZ+vJ6X5CZtMyO5b8WQrRMDm0IxHd6Z1+hRz4IhRKtUfFCJVndzfKnJV6RfF1OJ/zzqc5FE4lpTD67oZFH5F5uZHYoaRXyCgHCKGFgA7wiBx4uDlV9TF5KcECunlwYzJunNeiL5zriP6RWB7IyHpj8JBkeyeoQJkchNLjlE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760089400; c=relaxed/simple; bh=tfJwv3nqlpDtjcN28xzwLtu0Ad/Qk3DuNUw19bGFdw0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=o77E2FSISjTc6s136uQtGqZHDPKQpIa7/eblwSmGXhwmEp10JEZ0onnzo/qrlnTZRY3oOmFxW9OSvc5fgUE7cNQATum+RCxHrlFuL6yrwPADxwt+dXCFoVgT2P73NTOleNpnImbNtQCt2kUGTwBaBIDfEHJ1XIiAVxBpJxshweY= 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=H2MNdXQh; arc=none smtp.client-ip=209.85.221.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="H2MNdXQh" Received: by mail-wr1-f47.google.com with SMTP id ffacd0b85a97d-3f99ac9acc4so1575528f8f.3 for ; Fri, 10 Oct 2025 02:43:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1760089394; x=1760694194; 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=kmHzldTWpRVGaYiRV7mqVTmbw8wTd7DjVDHFKbOWCEM=; b=H2MNdXQhBP6UZRIf427UJPOaBPKLw53ezfUFHqraxZPLItmNzxyiaxGWwwZw5KnSVm +coy6QRPj4Ko0vYtaep45sJwuLKzSNfQ8Y7YCUJrEKs40bAzoMrJyBPxlngY0CUhZ2nz MJzzl6pASGIC1HeeEoVEuSZIv11I9yr4Xh6mLzABxM9BoAd7pHlvuaBSm4nxtXKd65x2 6Jlmoylazu/vg7ORaRSBTN2JFXA4Gaq+37SnXVMXDrh+yhe/5G/CkVovRVDxmPHYaNOc c2eGNEvTd6/zFDTK1NRsZDPCv590fYmLNC4Jm0tz+g2ZBLExX6OzvFoBW2NiPYvZCllE RaUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1760089394; x=1760694194; 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=kmHzldTWpRVGaYiRV7mqVTmbw8wTd7DjVDHFKbOWCEM=; b=ef7+5R5rE1re93IShE3ZllgxcKIbuPwpatVvKLyfAVdKtmo82VbAJaDWtCZdniuyjP 0NxIJlttNkaamP0N2VuP9qym9rkR8rz+InDJTnx7C/9q21Jy8YaZqX3ziJs+pRDopqhV AhEOkTEcOQg20y97jKiLAvptSXKyQc/EFy1GV+w1H3wfn9ObKOIlHcTQf+1wcyDke2Yn suIV/O/cwwMe5G+4RpvuSqAkgZvssJSQfzYxA/zywdNyGRuttqwUW9jHv5MKRxJsfnzX UySLwY8sVzERnRf4GA4ry2HPOHtuLZ/mS0r1LN3dK/AZu/gVFpaAKA3llQoV/pkoJIyK gIWw== X-Forwarded-Encrypted: i=1; AJvYcCVdoTglRGRiUGgsMZKFl4NeoY0jVFexL8ZNOQqQWk/CHXuTkZuYyv87sdPRb/BxbqhcruUmTQ/4DFK7VDw=@vger.kernel.org X-Gm-Message-State: AOJu0Ywzsr+0Hatosni88PtONXekQ2tYuJlisOCo7fV5sA5wQ/b4rEoE wqMXk1rrRsdpHgqfL8+iqD1m7I9XYS8BEjDPqKPYUunhiVwkErJ457UE X-Gm-Gg: ASbGncu3XrLAGZMGhfRQQMGrUSoJS+w1r1r4PcbEMXGnWKaBeKBz1lDwTKK82bIRCS8 Vj9utxbCG2yVAVZ7/3qE7LwydZAAjIkQ5Fnofdf7Wnr4BjKUCF+HqiXasijeG3SraqaLT/D28vE G8O9YrpE4k+hYEVuqu2ieu0VSaD7ZiaFgd9z1BBNIBcJefgKPNFXUhUbebRh5cRrcTyElC8lLhg WSMbMoDM9+kpeR2lbmw3Y9uISUfzTKzhQf2/gacV0YrWldP4vnAK+nGf8UGJfGXKwWgXRZePVlY 7tNHXsSbaVch5IrL9wnoPSoXl216Jab4jcBUlEZgTdQoEdtuHSP5Kbr257zlTLNIcgTkLTJsANQ Pv6+IGM3VSfqH0HDoPtjjmCM6onoJkyYEQA7hN6/l27x+xxVh X-Google-Smtp-Source: AGHT+IF9s+/76+HLGw2mLZk76tGq6/V4j0p5f2hCMj0ootyyX2pqmy4ieClzRxxY9elYI46O7lbdMg== X-Received: by 2002:a05:6000:2dc8:b0:425:6866:6a9e with SMTP id ffacd0b85a97d-4265ef6e5c2mr4984366f8f.0.1760089393527; Fri, 10 Oct 2025 02:43:13 -0700 (PDT) Received: from localhost ([212.73.77.104]) by smtp.gmail.com with UTF8SMTPSA id ffacd0b85a97d-426ce5e8309sm3283123f8f.50.2025.10.10.02.43.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 10 Oct 2025 02:43:13 -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 , Alexander Graf , Rob Landley , Lennart Poettering , linux-arch@vger.kernel.org, linux-block@vger.kernel.org, initramfs@vger.kernel.org, linux-api@vger.kernel.org, linux-doc@vger.kernel.org, Michal Simek , Luis Chamberlain , Kees Cook , Thorsten Blum , Heiko Carstens , Arnd Bergmann , Dave Young , Christophe Leroy , Krzysztof Kozlowski , Borislav Petkov , Jessica Clarke , Nicolas Schichan , David Disseldorp , patches@lists.linux.dev Subject: [PATCH v2 3/3] init: remove /proc/sys/kernel/real-root-dev Date: Fri, 10 Oct 2025 09:40:47 +0000 Message-ID: <20251010094047.3111495-4-safinaskar@gmail.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20251010094047.3111495-1-safinaskar@gmail.com> References: <20251010094047.3111495-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" It is not used anymore Signed-off-by: Askar Safin --- Documentation/admin-guide/sysctl/kernel.rst | 6 ------ include/uapi/linux/sysctl.h | 1 - init/do_mounts_initrd.c | 20 -------------------- 3 files changed, 27 deletions(-) diff --git a/Documentation/admin-guide/sysctl/kernel.rst b/Documentation/ad= min-guide/sysctl/kernel.rst index 8b49eab937d0..cc958c228bc2 100644 --- a/Documentation/admin-guide/sysctl/kernel.rst +++ b/Documentation/admin-guide/sysctl/kernel.rst @@ -1215,12 +1215,6 @@ that support this feature. =3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D =20 =20 -real-root-dev -=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D - -See Documentation/admin-guide/initrd.rst. - - reboot-cmd (SPARC only) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 diff --git a/include/uapi/linux/sysctl.h b/include/uapi/linux/sysctl.h index 63d1464cb71c..1c7fe0f4dca4 100644 --- a/include/uapi/linux/sysctl.h +++ b/include/uapi/linux/sysctl.h @@ -92,7 +92,6 @@ enum KERN_DOMAINNAME=3D8, /* string: domainname */ =20 KERN_PANIC=3D15, /* int: panic timeout */ - KERN_REALROOTDEV=3D16, /* real root device to mount after initrd */ =20 KERN_SPARC_REBOOT=3D21, /* reboot command on Sparc */ KERN_CTLALTDEL=3D22, /* int: allow ctl-alt-del to reboot */ diff --git a/init/do_mounts_initrd.c b/init/do_mounts_initrd.c index d4f5f4c60a22..fb0c9d3b722f 100644 --- a/init/do_mounts_initrd.c +++ b/init/do_mounts_initrd.c @@ -8,31 +8,11 @@ =20 unsigned long initrd_start, initrd_end; int initrd_below_start_ok; -static unsigned int real_root_dev; /* do_proc_dointvec cannot handle kdev_= t */ static int __initdata mount_initrd =3D 1; =20 phys_addr_t phys_initrd_start __initdata; unsigned long phys_initrd_size __initdata; =20 -#ifdef CONFIG_SYSCTL -static const struct ctl_table kern_do_mounts_initrd_table[] =3D { - { - .procname =3D "real-root-dev", - .data =3D &real_root_dev, - .maxlen =3D sizeof(int), - .mode =3D 0644, - .proc_handler =3D proc_dointvec, - }, -}; - -static __init int kernel_do_mounts_initrd_sysctls_init(void) -{ - register_sysctl_init("kernel", kern_do_mounts_initrd_table); - return 0; -} -late_initcall(kernel_do_mounts_initrd_sysctls_init); -#endif /* CONFIG_SYSCTL */ - static int __init no_initrd(char *str) { pr_warn("noinitrd option is deprecated and will be removed soon\n"); --=20 2.47.3