From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from shelob.surriel.com (shelob.surriel.com [96.67.55.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 46A55C4167B for ; Sun, 1 Jan 2023 19:24:28 +0000 (UTC) Received: from localhost ([::1] helo=shelob.surriel.com) by shelob.surriel.com with esmtp (Exim 4.96) (envelope-from ) id 1pC3wS-0006ps-1g; Sun, 01 Jan 2023 14:24:20 -0500 Received: from 178.115.242.59.static.drei.at ([178.115.242.59] helo=mail.osadl.at) by shelob.surriel.com with esmtp (Exim 4.96) (envelope-from ) id 1pC3wO-0006lK-28 for kernelnewbies@kernelnewbies.org; Sun, 01 Jan 2023 14:24:16 -0500 Received: by mail.osadl.at (Postfix, from userid 1001) id A24B25CC5E2; Sun, 1 Jan 2023 20:23:23 +0100 (CET) Date: Sun, 1 Jan 2023 20:23:23 +0100 From: Nicholas Mc Guire To: Bernd Petrovitsch Subject: Re: How is the size of init ram disk determined when initramfs is used? Message-ID: <20230101192323.GA23315@osadl.at> References: <072001d8d9f5$0fb3dbd0$2f1b9370$@etri.re.kr> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Cc: kernelnewbies@kernelnewbies.org X-BeenThere: kernelnewbies@kernelnewbies.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Learn about the Linux kernel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: kernelnewbies-bounces@kernelnewbies.org On Sun, Jan 01, 2023 at 06:32:55PM +0100, Bernd Petrovitsch wrote: > Hi all! > > On 07/10/2022 04:32, Chan Kim wrote: > [...] > >I'm using initramfs.cpio.gz for initial file system image. > >I embed it in the kernel Image file. > >After linux boots, when I'm in the shell, I can create files. > >But I'm curious how much the file system can grow. > > Why not just try it once;-) ramdisks are static - so if you mount ram0 and ramdisk_size=8192 then your ramdisk is occupying 8MB and that will be the hard limit at least on some architectures (x86, I think also arm). > > >I remember somewhere reading that the initramdisk is made and the initramfs > >archive is extracted in the ramdisk. On some architectures you can pass the size as kernel parameter ramdisk_size=#kb and that will then set the size of the ramdisk when you mount it (at boot or during normaal operations). As I did not find what archtiecture you are refering to this might help - grep for ramdisk_size in Documentations and you should have it. E.g. for arm it is marked as obsolete (arm/boot.rst) but still seems to be supported with CONFIG_DEPRECATED_PARAM_STRUCT set. Wonder what it is being replaced by. thx! hofrat _______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies