Wind River Support Network

HomeDefectsLIN7-3125
Fixed

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: 7.0.0.0.LB14
Fix Version: 7.0.0.6
Severity: Standard
Applicable for: Wind River Linux 7
Component/s: BSP

Description

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:~# 
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:~# 
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:~# 
root@localhost:~# free 
             total       used       free     shared    buffers     cached
Mem:       3878756     132148    3746608          0       2704      42784
-/+ buffers/cache:      86660    3792096
Swap:            0          0          0
root@localhost:~# 


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/fakestart.sh /bin/bash 
   # whoami
   root
   # 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
   Mortal_user 

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 
   }
   EOF

   # 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
Online