I am trying to replace the linux kernel in Debian7.11 with a new one of version 3.4.1(the original one is 3.2.0) for experimental environment using Parallels Desktop. I configured the new kernel with the old configuration file in /boot/ and used default values for the new features in 3.4.1.

After I finished this upgrade and reboot with the new kernel, it hung on "Unpacking initramfs". However it succeed to boot when I give it more RAM(1024MB, the original RAM is 512MB). So my question is why it can not boot with low RAM? Is it caused by some configuration options of the kernel?If so, how to configure the kernel to make it possible?

I tried to look into the configuration options of kernel but I can't get the answer. Any help would be appreciated:)

  • 1
    Did you build a custom initramfs as well, or are you reusing the one provided by debian? If so, how big is it? Any significant differences between them? What about the size of the kernel itself? It might also be good to enable the earlyprintk kernel option and turn it on during boot to see if it'll get you any additional info. – phemmer Nov 21 '16 at 13:37
  • The new initrd.img-3.4.1 has a size of 121MB while the original one is only 9.8MB, and the size of the kernel is unchanged. Is this the problem? – Arvin Hsu Nov 21 '16 at 14:10
  • Well, given that your response seems to indicate that you're using an initrd, not an initramfs (there is a difference), then yes, you are exhausting your available memory. IIRC initrd has a max size of 16mb. And even if you are using initramfs, 121mb is pretty big, and when uncompresses, you could easily be exhausting your available memory. – phemmer Nov 21 '16 at 14:46
  • Really appreciate for your help! I tried to strip the modules to make initrd smaller and now it can boot with low RAM successfully! It is the size of initrd that caused this problem, but can't the swap partition be used at that time? – Arvin Hsu Nov 21 '16 at 17:27
  • 1
    Don't be confused by the initrd.img file name, that's actually a compressed cpio archive, which is used to build an initramfs, not a legacy initrd image. And no, you can't use a swap partition while loading it, the point is that your kernel isn't running yet when it's loaded, so everything must fit into the memory. – Ferenc Wágner Nov 22 '16 at 8:02

Missing any detail about your build process, I can only guess your modules are huge because they include debug symbols. Check the CONFIG_DEBUG_INFO setting in your kernel configuration, and also review the INSTALL_MOD_STRIP environment variable. From Documentation/kbuild/kbuild.txt:

INSTALL_MOD_STRIP, if defined, will cause modules to be stripped after they are installed.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.