Re: How is the size of init ram disk determined when initramfs is used?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxx
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]

  Powered by Linux