Skip to main content.

14.3.18. Ramdisk Greater than 4 MB Causes Problems

I built a ramdisk image which is bigger than 4 MB. I run into problems when I try to boot Linux with this image, while other (smaller) ramdisk images work fine.

The Linux kernel has a default maximum ramdisk size of 4096 kB. To boot with a bigger ramdisk image, you must raise this value. There are two methods:
  • Dynamical adjustment using boot arguments:
    You can pass a boot argument ramdisk_size=<size-in-kB> to the Linux kernel to overwrite the configured maximum. A flexible way to to this is using U-Boot environment variables. For instance, to boot with a ramdisk image of 6 MB (6144 kB), you can define:
=> setenv rd_size 6144
=> setenv bootargs ... ramdisk_size=\$(rd_size) ...
=> saveenv
If you later find out that you need an even bigger ramdisk image, or that a smaller one is sufficient, all that needs changing is the value of the "rd_size" environment variable.

14.3.17. Linux Kernel crashes when using a ramdisk image 1. Abstract 14.3.19. Combining a Kernel and a Ramdisk into a Multi-File Image
Prev Home Next