Hi Aditya, Yes, I also meant the same. Thanks for the additional info though. Regards, Dileep On Fri, Jan 5, 2024 at 1:33 PM Aditya Gupta <adityag@xxxxxxxxxxxxx> wrote: > > Hi Dileep, > > On Mon, Jan 01, 2024 at 04:46:03PM +0530, Dileep Sankhla wrote: > > > > > > Thanks for your solution. Mine is fine in size and I am already using > > > MODULES=dep. > > > > > > > Sorry, my bad. I thought 18M was good enough but after asking this on > > LinuxQuestions.org, I got to know that it was not sufficient for the boot > > success (see [1]). Copying the existing kernel version's config from > > `/boot` and running `make olddefconfig` solved the size issue for me. It is > > now ~78M. The size of the kernel's initrd that I was using earlier is ~71M. > > > > Just for the clarity, the size of initrd being only 18 MB is likely not > the root cause for your system not booting, it would likely be that some > modules were missing earlier. > > Likely why you built linux with a default config (defconfig), many > modules might have been missing, which are required on your system to > boot correctly. For example, file system support for btrfs will require > the btrfs module, etc. > > Generally while creating initrd, `dracut` (on rhel/fedora), or > `mkinitcpio`/`mkinitramfs` also copy your kernel's modules (at > /lib/modules/new-kernel-version/*) to the initrd. > > Since you had less modules the first time you built with defconfig, so > initrd also had less modules, and hence size was only 18MB. > > Later when you built using the distro kernel's config, you likely had > many more modules, and hence more modules were put in the initrd also, > causing it's size to increase, and since you used distro kernel config, > so your modules would be similar in the kernel you built, and hence > similar size of the initrd ~70MB. > > It's a good start to use the distro config for building a kernel. > > PS. I have been able to successfully boot by building with defconfig, > then manually enabling some drivers according to error messages during > boot, but that is for learning only, normally it might be a waste of > time. > And also I boot my ArchLinux with no initrd, and have had even smaller > initrd and booted successfully, how I did that was building only the > modules I knew my system needed as built-in. > > Regards, > Aditya Gupta > _______________________________________________ Kernelnewbies mailing list Kernelnewbies@xxxxxxxxxxxxxxxxx https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies