Wind River Support Network

HomeDefectsLIN6-8250
Fixed

LIN6-8250 : grub2 error: the initrd is too big, size of 483MB or larger

Created: Aug 27, 2014    Updated: Dec 3, 2018
Resolved Date: Dec 1, 2014
Found In Version: 6.0.0.8
Fix Version: 6.0.0.15
Severity: Standard
Applicable for: Wind River Linux 6
Component/s: System Usecases

Description

Grub2 failed to load a large initrd file with size of 483MB or greater and reported the following error:

 error: the initrd is too big.
 Nevertheless grub-0.97 seem to be able to boot the same size of an image.
On the other hand Grub2  seems to be booting 243MB initrd Ok.
Customer's board=intel-x86-64, 8GB RAM 

Kernel command line
BOOT_IMAGE=/bzImage-intel-x86-64.bin root=LABEL=ROOT console=ttyS0,9600n8 quiet acpi=ht libata.force=noncq acpi_enforce_resources=lax memmap=64M$2G
# memmap=64M$2G  is the memory reserved for thier PFE device for DMA
 
GRUB config
...
  menuentry 'OS' {
 
          search --no-floppy --label --set=root LINUX-BOOT
          linux   "${boot_path}"bzImage-intel-x86-64.bin root=LABEL=ROOT console=ttyS0,9600n8 quiet ${platform_kcmd_params} ${application_kcmd_params}
          initrd  "${boot_path}"initrd.cpio.gz
  }
 
GRUB environment (grub-editenv list)
platform_kcmd_params=  acpi=ht libata.force=noncq acpi_enforce_resources=lax memmap=64M$2G

# they are not using “application_kcmd_params” hence the environment  is not set.

Steps to Reproduce

1. Create a project with either glibc_small or glibc_std; 
 configure --enable-board=intel-x86-64 --enable-kernel=standard --enable-rootfs=glibc_std --enable-bootimage=hdd,tar.bz2 --with-bootimage-space=1024 --enable-checkout-all-layers=yes --enable-reconfig --enable-rm-oldimgs=yes --with-template=feature/initramfs --enable-addons=no --enable-reconfig=yes 

2. make fs;
3. Produce large initrd :

$ cd /root/of/the/project/directory
$ ls config.log
config.log
$ ./scripts/fakestart.sh /bin/bash
# whoami
root
# cd export/dist

Then use dd if=/dev/zero of=junk_file bs=1048576 count=1024; followed by
# find ./ | cpio –H newc –o | gzip -9c > ../initrd.gz

Check that the resultant initrd.gz file is > 412MB.
# exit
$ whoami
Mortal_user

1.2GB worth of data gets compressed to about 350MB as initrd.gz

Other Downloads


Live chat
Online