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 D583BC4332F for ; Sun, 1 Jan 2023 16:55:18 +0000 (UTC) Received: from localhost ([::1] helo=shelob.surriel.com) by shelob.surriel.com with esmtp (Exim 4.96) (envelope-from ) id 1pC1c1-0003AK-2q; Sun, 01 Jan 2023 11:55:05 -0500 Received: from mail1.systemli.org ([93.190.126.36]) by shelob.surriel.com with esmtps (TLS1.2) tls TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1pC1by-00037I-07 for kernelnewbies@kernelnewbies.org; Sun, 01 Jan 2023 11:55:02 -0500 Message-ID: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=systemli.org; s=default; t=1672592097; bh=wlhWpv0+4KVeZs2h/Y7ImxRPnE7tN+puJxovGC5p08c=; h=Date:Subject:To:References:From:In-Reply-To:From; b=xqu97eG34v9txoFGUDNNjBrKRGj9aKDqYPq0kTnJ6AHArP1ppXFdlLbeBTrzqNKNg sk6RMA/EIEeOnlTUJN6/NkN5qzqMLfBK3sUIRv5ckP7bhzE8tXC/s0Flp83YMFIREE tQmCCtWx0XrDhFVb09V9RiIgwm1ZHRnxZvtcnzDXwaec0JCO2taW+Ob7l6p32Adw0x f1PewgprJ9DKA+/kA7FA0vhmV4T3X2wXbe/d3Bwl8eY0Xma4eEjuhUojDB+jM22R9j eGZ4BXbxv9WdZJcks4VOiJYi/ujy+rZ54Lt/OfgNwdI5690Ybn3iiQGJoUy7oq8lXB s4oRZpvRu8wjw== Date: Sun, 1 Jan 2023 17:54:52 +0100 MIME-Version: 1.0 Subject: Re: How is the size of init ram disk determined when initramfs is used? Content-Language: en-US To: kernelnewbies@kernelnewbies.org References: <072001d8d9f5$0fb3dbd0$2f1b9370$@etri.re.kr> From: Richard In-Reply-To: <072001d8d9f5$0fb3dbd0$2f1b9370$@etri.re.kr> 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-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: kernelnewbies-bounces@kernelnewbies.org Hi, I don't exactly how and where the size is determined, but On 07/10/2022 04:32, Chan Kim wrote: > Hello all, > > 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. > I remember somewhere reading that the initramdisk is made and the initramfs > archive is extracted in the ramdisk. > Then how is the ramdisk size determined? During the build usig Kconfig this is extremly unlikely. For example when you do "apt upgrade" on debian and there gets a new kernel installed (or I think even when it is only about specific new kernel modules), sometimes a new initramfs is built. This includes (as far as I know) also some modules and configuration specific to your computer. This way they can ship a generic kernel but it still works custom for you since the initramfs is custom. This customization means the intitramfs' size will vary. But since the kernel is built independently and beforehand it can not know that size. Also, why should the filesize be that important? Can't it just be stored in some file header when it's generated ? Maybe I'm missing something here -- Richard _______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies