Wind River Support Network


LIN7-3125 : grub2 error: the initrd is too big, size of 596MB or larger

Created: Mar 11, 2015    Updated: Sep 8, 2018
Resolved Date: Apr 29, 2015
Found In Version:
Fix Version:
Severity: Standard
Applicable for: Wind River Linux 7
Component/s: BSP


RCA#903 : LIN6-8250

After grub menu, load initrd.gz print below message.
 error: the initrd is too big. 

continue boot via root=/dev/sdXx mount rootfs.

root@localhost:~# cat /proc/cmdline 
BOOT_IMAGE=/boot/intel-x86-64-bzImage-WR7.0.0.0_standard root=/dev/sdb1 ro rootwait single
root@localhost:~# cat /boot/grub/grub.cfg
set default='0'; if [ x"$default" = xsaved ]; then load_env; set default="$saved_entry"; fi
set timeout=10

## ## End Default Options ##
menuentry 'WRLinux6.0' {
  set root='(hd0,1)'; set legacy_hdbias='0'
  linux /boot/intel-x86-64-bzImage-WR7.0.0.0_standard root=/dev/sdb1 ro rootwait single 
  initrd /boot/initrd.gz 
root@localhost:~# free 
             total       used       free     shared    buffers     cached
Mem:       3878756     132148    3746608          0       2704      42784
-/+ buffers/cache:      86660    3792096
Swap:            0          0          0

Steps to Reproduce

Test Steps
1. On Host:
a) 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
b) make fs
c) generate initrd.gz, lager than 412M
   $./scripts/ /bin/bash 
   # whoami
   # cd export/dist

   # cp ../intel-x86-64-glibc-std-standard-dist.tar.bz2 .

   # find ./ | cpio –H newc –o | gzip -9c > ../initrd.gz 

   Check that the resultant initrd.gz file is lager than 412MB.

   # exit
   $ whoami

2. Install grub.
   # mkfs.ext3 /dev/sdXx
   # mount /dev/sdXx /media/sdXx
   # grub-install --boot-directory=/media/sdXx /dev/sdXx

3. Deploy images.
   # cat <<EOF>grub.cfg
   set default='0'
   set timeout=10
   menuentry 'WRLinux6.0' {
      set root='(hd0,1)'; set legacy_hdbias='0'
      linux /boot/intel-x86-64-bzImage-WR7.0.0.0_standard root=/dev/sdXx ro rootwait single 
      initrd /boot/initrd.gz 

   # cp initrd.gz /media/sdXx/boot/
   # cp intel-x86-64-bzImage-WR7.0.0.0_standard /media/sdXx/boot/
   # cp intel-x86-64-glibc-std-standard-dist.tar.bz2 /media/sdXx/
   # cd /media/sdXx
   # tar --numeric-owner -xjf intel-x86-64-glibc-std-standard-dist.tar.bz2

4. Boot via grub.
   Select sdXx device as boot media.
   Check load initrd.gz ok
   Confirm whole boot no issue. 

Other Downloads

Live chat