From nobody Tue Dec 2 02:19:57 2025 Received: from mail-lf1-f41.google.com (mail-lf1-f41.google.com [209.85.167.41]) (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 97E913074B4 for ; Wed, 19 Nov 2025 22:26:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.41 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763591177; cv=none; b=eDJkNeIi5E9TZoprSJfmNbk+oQ230RCS+LH2DsrHkd71phwnt8/cfK1HBF+Mj0g3IrfprXzlpdb3o7MAVEb3Wafl5RZ8FWKRtvWhaOUR/a+gSUtM69oIzzCDvqi8P9cPlY2Vdzl3jNkplssAaltecaBasQLMcFVzmsIwXXfALxs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763591177; c=relaxed/simple; bh=xFurCGxlKeC/tk9lJqwt+qhC4G1oERsMk1YgSqg0z4M=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=X3cCvR7IHyItDvJeHAVKjC2W8p2rxjiwFebVAA4UfCJkuzyoWeKE8m+KbCiEbiq/SgdBIRIPHHiOdYgPjco919V2RTF1URtM1x4trbav91H9kTyzRSY7he5ZYms+JP7abvP6qqj6m9eNW1P4hLoidWUynigqxbchQ6yeI6oB5Vs= 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=XgdRSOo3; arc=none smtp.client-ip=209.85.167.41 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="XgdRSOo3" Received: by mail-lf1-f41.google.com with SMTP id 2adb3069b0e04-5958931c9c7so147996e87.2 for ; Wed, 19 Nov 2025 14:26:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1763591173; x=1764195973; 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=fApFH3gxVydnn6o27DJgEciM38Nk8T7NkdtS/0xgRng=; b=XgdRSOo3KGbkyKXW9NTfMPwrCoF+ME9Ff6Z95Hd2DDXm3yiKYsFdMFumhlzXFYu4yY qk4nR8ML+0w/VlVGuChigYUs9Pm7CmN5zHIMxV9Bi8jlxxcEwDbYDir8b+u4b8seDJq+ /eZ/H2DR0N5X+blcO9tOEl7kUxjFS+rrGo4adWFAmkFMyHgzg/4eoUxGczDtev46zvaT RfVCn979PgY3uvo8YscvIvoq4RS8BYtHmhoH3ns9979QHm2jMpvBqF+5rYIz6jdRPeWX GiM+UuYcWK7isoqJIOOhubfl15n0vtcyS+k50EqQ7rzKneZ2OH0D1PTw0HWQpE5KOXwh q1KA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763591173; x=1764195973; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=fApFH3gxVydnn6o27DJgEciM38Nk8T7NkdtS/0xgRng=; b=YscywQ8yJvDueRXBeqmm763+OAkPR6ZbRoCBxLHgCToZdVBInEWZDwEQke1l7NPe7y y+xuoM834v9zAc3aO0GOIKgRCeGtOZFdXL8vrldQ4xyTC/tFBv3XgWhBrYPxB5a8VWcK V5XR9NXLgt4MOlBMTNDYu+JpTdIsO8ERtFfCfuLoNDGQwgRE+YjGGhL4tsz+8olP5W0F Wt/f57hDB9iH8bG0psbn/pFDKo14sPGa8perTqZXYf7FvZigmUeCiAOfZJbXjxMzwNWv j2Jedf//p4KkI4j96oBVxQrl2n9jH/7O1lmE6ljqZtAnOq0WkNc2xdfeH9GQwIYtk69k 2tMg== X-Forwarded-Encrypted: i=1; AJvYcCVdFxjUy14cvMhQek/up47iFoAsEN96xDITShkmycht3V3u+9Ss5XybomO/vHgBRmPwQwv3/WXoLmmhJbU=@vger.kernel.org X-Gm-Message-State: AOJu0YxIkv1MRamWTJnOGCICHfCJPeGCQNGYWEJ/rNeLQssmnxT2AB3h sowMnqDAoYwhbwH/HFayogWb1mcfkHsJo2CWnjUBMWAKQebHwHcarLN4 X-Gm-Gg: ASbGncsPuT3n6WAwlNFP3h7QXC/cH0JaUbuaVb6PWyyKD6hLrrSZKZmvdCnXyom3EqE V9+cfd3+bqKGwRrUuYwzdEkn1NvQusE5QwxMlJWT1NJyVjqSVzJVlT5vprYzb6w0MqHAW1R/vJu jkhvKvYvS8ZaQuV5PCeB97yz+wrF9y+t1WngJ1FG8Ra4myU186Q5gyq2VXrfnTaiCRmayH7PXFm 5Jrf5jo8igYSlEspvHALBnIkMQDf4lbtCiCwMzTh6tpcTDkJsE/+JAlWNXq2PdK/QBD3qisgPLS Pt58/DnsuwodT7XJZAbV0XsKIj9KPH2XMo0zMONqNgPR3o8cfPxAuyODdFnELRzpo4nIqO9egHn tuKappwngXfI1jXBGjfSvqdVbbYTF3LHg5GtdmcsAuCqzkqp9YLqB0kBgCDBkjw8+VGffa73dFR ny4R5LAq9/GFcAaFjx/30= X-Google-Smtp-Source: AGHT+IFENZJ7RcpXWRmhUGxSKU8/+JjRXLl6S7aQ+5lvgaxElbnkwmTEZ8S5HDDyVaHfayjnh2Ye3A== X-Received: by 2002:a05:6512:acc:b0:595:81c1:c55 with SMTP id 2adb3069b0e04-5969e2ae965mr219191e87.8.1763591172383; Wed, 19 Nov 2025 14:26:12 -0800 (PST) Received: from localhost ([109.167.240.218]) by smtp.gmail.com with UTF8SMTPSA id 2adb3069b0e04-5969dbbedd7sm159505e87.63.2025.11.19.14.26.09 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 19 Nov 2025 14:26:10 -0800 (PST) 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 v4 1/3] init: remove deprecated "load_ramdisk" and "prompt_ramdisk" command line parameters Date: Wed, 19 Nov 2025 22:24:05 +0000 Message-ID: <20251119222407.3333257-2-safinaskar@gmail.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20251119222407.3333257-1-safinaskar@gmail.com> References: <20251119222407.3333257-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"") in 2020 and in kernel messages in c8376994c86c ("initrd: remove support for multiple floppies") in 2020. Signed-off-by: Askar Safin Acked-by: Arnd Bergmann Reviewed-by: Christoph Hellwig Reviewed-by: Randy Dunlap --- 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 6c42061ca20e..15af6933eab4 100644 --- a/Documentation/admin-guide/kernel-parameters.txt +++ b/Documentation/admin-guide/kernel-parameters.txt @@ -3319,8 +3319,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 @@ -5284,8 +5282,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 Tue Dec 2 02:19:57 2025 Received: from mail-lf1-f54.google.com (mail-lf1-f54.google.com [209.85.167.54]) (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 CF69E2ED159 for ; Wed, 19 Nov 2025 22:26:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.54 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763591198; cv=none; b=IE9GQUKsFEKrfCrXYwDUTY/Wm3kd+GQoDaeU9TjKrdilIwu/LQ6kVsVleK0pO+8w1mcr6R7jt9Y9V2yn/N2ev7/QqyImeAoIRIIeJThEDoVLacrnoL1WFHTmlNfHSM2OMrA5y0wDw47wkmF0+xY9lBPlyCDosaL+OsiQ5cdNReA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763591198; c=relaxed/simple; bh=B30ksd/i6KlWZzGSOJluZMvprLijJbryg/ZlhpI37Xg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=UUSXBBL4LWcT3emiW/N5VyWKYBIDN2/kwkgsWGJlqynGqh3zgyXDCUvpo1Hyh49DTDXLKhACCntSrEE+afOCMM/8JdfGmIRT3tnKRXfwR02Q0AXbwa/jlAzGfbLj1+TLnIVm9wMs9RA3cgUhPs+MH0GxfdTiMvpK9AOxvnRkZk4= 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=Ks/+oZuJ; arc=none smtp.client-ip=209.85.167.54 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="Ks/+oZuJ" Received: by mail-lf1-f54.google.com with SMTP id 2adb3069b0e04-59431f57bf6so174213e87.3 for ; Wed, 19 Nov 2025 14:26:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1763591194; x=1764195994; 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=rpz7T6QQ/kKXNjO1wwsOWaO7Nw3DfMsERYzmwHv+rnY=; b=Ks/+oZuJCDnebhI/q84MpZIMxSSmR02wVCEevnZc1aVVu9pDn1WEtDzlaWN4rHlVEK xRTI+4lXSL73O0KE9kgIGE1c0FiCg7u2InWpFSvXguS7hu6KuxzsB2MYGztfV5anG9vG COYW43//eD8Vdu+t4Ft8o4W3DWuvWQ3vrMBroCj3Gj4DP3zbYsJGxzwUHPwvf0aU+OuS G4aMe7Mv92CUhLl/KUHpKuum+hX4ahVMaLmmIk/a04AfZ+IIcQ5bdKqn7BqOfNLHj3Ix mKIfyfMnA42vfid2aXlHPDxr9k9IccE2MzTGL20vfqF4aLub6u8iBT5bDMaNuv1KQ33t R62w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763591194; x=1764195994; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=rpz7T6QQ/kKXNjO1wwsOWaO7Nw3DfMsERYzmwHv+rnY=; b=Os9PEkhdw1VRdxCMUjJA6HpSSjzWwjAf/Xc6CZFhL4te3uEnrQrPvvF5xouI/ELgmf iIh/+3oa3KF2z2cSkS2NUY/Y3veRyyObHlqI5GdCWoNCJRDbvVUx1fXlcJ2BVtxgyEbn eYQME1yU5iulpZ82Fu4TY4xopNIhhLikumTa13FTxp8MZspeXseWr2s6yC44WMB089le 642SRtYgc8ioMWaC6jahLGH/oj8EnrGn8R7KP/hdrugHdTAGtiCzIlCDD1P5kLZSvwS7 6Z0GMsVWf0BF+OJTSKbOC0NcgpZ+rhsxMV97KjCqwQ2klWWM3hLt/zS3ge7NEKAhZt4j 1mIw== X-Forwarded-Encrypted: i=1; AJvYcCVXB39fD23c+TJGqJwhtsyLmUKKBZBDK2mepyrzHIAp5VOVmiE+gbENCfdqoJC6hW1TtqL8YH49Z8lvi5Y=@vger.kernel.org X-Gm-Message-State: AOJu0YwkholYjbliIvZg4J7W3av27j93AnlGG8cQGzjTrghfVYqPNDzT /qKJg5h4rWhRUa0jfM1MjOdVpvoZPOiQl63CBHoZjsxZwgyuDZHD/QO+ X-Gm-Gg: ASbGncsEGgsHPUhPwe1xE/oGLkNbVmMnueDQRhzOEkJHKRrntEZ3m439GGI4hONBZOE x6mk/udX4oGjdeuaTowqhZwouhh0s6ILUfZ+FkIlvImcbuvbf/CZoVmiWj5qVQNprNfnNMnQ1yP 2cjddsTBX12zjhh0eIfk3eWFDnuTFvzzqhbysFT1j/pbs2UM67W37K0PhQdnMWiS6TcBHn7UV5z i2fhjepjNxOdKPsCgRvl/kWQmnq5FMK5GGLhY6JnQU7sxGScelGCYqYgvlO2cXS+Wy77a0TVfe3 uGVGKjU3tWBl2GzAc3+DuCbnOGLXlY6RKCcevP3UzIdKm4fwt6xiQLviHfGSCfKpus4PUOj9R7O n+YenXygFRCKP+KifvCTGDLDC+KwZd6HQqHrGrI7pnC+ujnzIz4TolbBOun5LZLhqfITluup52E yV09zY1L5K4annNxp4DI5f X-Google-Smtp-Source: AGHT+IHKJFkl9t5N8j7PyCRMaEBOUQoDY6WPT5NRD3nx1OIP3SnAvvmsobVsbW3qyUfaDOP5L+EeFQ== X-Received: by 2002:a05:6512:3e0a:b0:590:6598:4edf with SMTP id 2adb3069b0e04-5969e318d8cmr157688e87.47.1763591193750; Wed, 19 Nov 2025 14:26:33 -0800 (PST) Received: from localhost ([109.167.240.218]) by smtp.gmail.com with UTF8SMTPSA id 2adb3069b0e04-5969db8989csm167842e87.39.2025.11.19.14.26.32 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 19 Nov 2025 14:26:33 -0800 (PST) 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 v4 2/3] initrd: remove deprecated code path (linuxrc) Date: Wed, 19 Nov 2025 22:24:06 +0000 Message-ID: <20251119222407.3333257-3-safinaskar@gmail.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20251119222407.3333257-1-safinaskar@gmail.com> References: <20251119222407.3333257-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. Also I deprecate command line parameters "noinitrd" and "ramdisk_start=3D". Signed-off-by: Askar Safin Reviewed-by: Christoph Hellwig --- .../admin-guide/kernel-parameters.txt | 8 +- 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 | 87 ++----------------- init/do_mounts_rd.c | 17 +--- 8 files changed, 22 insertions(+), 129 deletions(-) diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentatio= n/admin-guide/kernel-parameters.txt index 15af6933eab4..df441d1a9555 100644 --- a/Documentation/admin-guide/kernel-parameters.txt +++ b/Documentation/admin-guide/kernel-parameters.txt @@ -4324,8 +4324,10 @@ 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 - initial RAM disk. + noinitrd [Deprecated,RAM] Tells the kernel not to load any configured + initial RAM disk. Currently this parameter applies to + initrd only, not to initramfs. But it applies to both + in EFI mode. =20 nointremap [X86-64,Intel-IOMMU,EARLY] Do not enable interrupt remapping. @@ -5338,7 +5340,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..fe335dbc95e0 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,19 @@ 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 January 20= 27; " + "use initramfs instead or (as a last resort) /sys/firmware/initrd; " + "see section \"Workaround\" in " + "https://lore.kernel.org/lkml/20251010094047.3111495-1-safinaskar@gmai= l.com\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 Tue Dec 2 02:19:57 2025 Received: from mail-lf1-f52.google.com (mail-lf1-f52.google.com [209.85.167.52]) (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 1B68130AAD4 for ; Wed, 19 Nov 2025 22:26:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763591220; cv=none; b=Ddo+B2Me91PvsnwF80fY6nJ4fxKLPKx/wOwC7q5dDohFrL95+nBwrjL1Rhm/k4sLHlXt8Y5DHjU8jeL/FkXIvEkEsQ0cg8dxueygXF/pfuxUUQ72MsSKLNc6gt2ix1zs0Au/PDFKzl0a62fWn5I7IJFknTM+oKW+TPAWIBO5azQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763591220; c=relaxed/simple; bh=qOnnawt4egcjVD3EMm4ADkZ2z7Vo9vrDOjzvgdq3kes=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=EeBurcFnV3v08ev3CAhDhWnL//5U5/Wlg3OM7upqz+9o0/+OJXfs1g0Sr1aj6O7s0CwBecTfvrziQA0zfgxQiciHtMFhnHbz41RZPXmyfXCcuCNNHUUX1f7OJW86UsWqGzfPEsoBmzcdOv4aJP6qVHwvr65y9aTrTrQ1wrpcxzU= 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=R8k/DZ8/; arc=none smtp.client-ip=209.85.167.52 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="R8k/DZ8/" Received: by mail-lf1-f52.google.com with SMTP id 2adb3069b0e04-5957753e0efso179325e87.1 for ; Wed, 19 Nov 2025 14:26:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1763591216; x=1764196016; 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=IBHV1EUw0WBXSKlFcI/NhGu5XRuHQn0XLzAOgD+DTYU=; b=R8k/DZ8/ZkWu1ODdCi03BUhd0F6wJ+SI26jz55vpEOV1pSnPERLev3IwAQeGU9Ksnb xjiOXUCNbqNR3md5yGCT9dIVKjPaIS3mpoLpkuyO+XWoQLOU2mnh+9SDElRz5SHfHh3Q B0Wp03c6n0pUeFnj//hlczVj1aLV2ivD34FgWCLm3Wp2rJmju2T6TENUxfmee1/qUvse xHh5AEGWJi1knuZfskaA8eIhL5PpmlkU5smszODFrAzYd+ZNUXTteOUwRFrOEC4wNHEL l9c+nmG/rJdGmgVVAigFNQxltkX3V8NVu3TMSbQcqLexwAuvZ+VR2gIcAI3nv0pI67PG Rfkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763591216; x=1764196016; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=IBHV1EUw0WBXSKlFcI/NhGu5XRuHQn0XLzAOgD+DTYU=; b=rsZfzghfIwh5jIKdFqtff+XXYdKyZEqamxJW+Uu/0VGOm8OKLcReMSdi4StwE+s426 bOS4gJiJ5Up9dE+zXs5wQhc8t81K3rUNid0+Ae1S6mhPaIH9EjmBNGtFkcwkZBvD6xa7 ZrP9kp7oYDlKBysn76ZSPzSRjS6UvlCE+CJ8WVpiGQSPgDzbiFdkWuFBsocZWmeaZ55I /N3XC+6ANjDFIX1CjQTVvDlKeMo4fQq3uSHwOIbXZ/dluUyeY65bZ2zvSoa9U7PHjT5+ z8DGJpUi9AGNDWRRTpO5C98YwPfvWWRldzEdSTPmodW+d3g5WDZsj8mn32jTNjaqpV+Q q+Gg== X-Forwarded-Encrypted: i=1; AJvYcCVDj3StEkyBc+K7YPRWe6Syz1L9v2gt+9G8fvLTHYqjIa9K0LmQv86unNT44YXJzOc6RoI1gfCeULhy9iY=@vger.kernel.org X-Gm-Message-State: AOJu0YytEx256DIuI/Mt89drcGj0JuOSQT9q+4Haez9928XuIQ00LORh U/lkn8+w9qx28Vj4g2DsszPA4km0jzoa0S6XfBhPr/yZFJ5EL463045I X-Gm-Gg: ASbGnctR+SolIxQ3sp6ODUzCtYKlEc/Xg0Q5jZAeNUCkYUbPIAefxzpyoacQno1qz4w kTwNGyxPRX+5ngIGb/jqfx8faA2b/0o3hgjIEI0Q+7yYzUY06CMwVAn/+9tWvXqHyinjyANSx71 76EGV72F5+KUuEqefW3c9N0Gi4w41S3vPynLPFKY+gRV3DI3Ez8Nadz+bcvZ8cjgG977jlM1tYV KWQZLWvGiEdYsnjdNpxlUSp3nLl72/OIqKdsxIkFfgThI0ldLz+f+moe6ppimsfrbGGsFoVvHdt tmcClCepuYTIo6lw0aEEG6HS4FW7P6mn+xvu6XWagpbKdV44LmQKyZmsfFfQjve2x9Wd9o3QR5c 0wcWVhZAXDuzoj4KsIsUfdiyF6vNPA/2HinsmS0byXQXIsGr570FWCH1pd5ZF+GdLjQzMgdDRI3 jC7YbSxv30 X-Google-Smtp-Source: AGHT+IFgA9RKL+uFTnctiFZKqulaPxewVQd+eAgCSkyCWbVEq5Iah76Q4RixKmx92rXz16tT6l4F2g== X-Received: by 2002:a05:6512:3d08:b0:594:25e6:8a3a with SMTP id 2adb3069b0e04-5969e2e74d7mr178185e87.20.1763591216022; Wed, 19 Nov 2025 14:26:56 -0800 (PST) Received: from localhost ([109.167.240.218]) by smtp.gmail.com with UTF8SMTPSA id 2adb3069b0e04-5969db8989csm168021e87.39.2025.11.19.14.26.54 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 19 Nov 2025 14:26:54 -0800 (PST) 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 v4 3/3] init: remove /proc/sys/kernel/real-root-dev Date: Wed, 19 Nov 2025 22:24:07 +0000 Message-ID: <20251119222407.3333257-4-safinaskar@gmail.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20251119222407.3333257-1-safinaskar@gmail.com> References: <20251119222407.3333257-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 Reviewed-by: Christoph Hellwig --- 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 f3ee807b5d8b..218265babaf9 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 fe335dbc95e0..892e69ab41c4 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