Specifications
boot. " - Benjamin Herrenschmidt
14.3.17. Linux Kernel crashes when using a
ramdisk image
Question:
I have a Power Architecture® board with 1 GiB of RAM (or more). It works fine with root file system
over NFS, but it will crash when I try to use a ramdisk.
Answer:
Check where your ramdisk image gets loaded to. In the standard configuration, the Linux kernel can
access only 768 MiB of RAM, so your ramdisk image must be loaded below this limit. Check your
boot messages. You are hit by this problem when U-Boot reports something like this:
Loading Ramdisk to 3fdab000, end 3ff2ff9d ... OK
and then Linux shows a message like this:
mem_pieces_remove: [3fdab000,3ff2ff9d) not in any region
To fix, just tell U-Boot to load the ramdisk image below the 768 MB limit:
=> setenv initrd_high 30000000
14.3.18. Ramdisk Greater than 4 MB Causes
Problems
Question:
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.
Answer:
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. Note that this argument needs to be before any root
argument. 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.
Increasing the Linux kernel default value:
When configuring your Linux kernel, adjust the value of the
♦ •
14.3.18. Ramdisk Greater than 4 MB Causes Problems 182