This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Ramdisk problems

Other Parts Discussed in Thread: ASH

I have created a ramdisk image that is 34M uncompressed and a little under 13M compressed. When booting the kernel has trouble reading the ramdisk. I get the following error:

RAMDISK: gzip image found at block 0
mmc0: host does not support reading read-only switch. assuming write-enable.
mmc0: new high speed SD card at address 0007
mmcblk0: mmc0:0007 SD02G 1.86 GiB
 mmcblk0: p1 p2
RAMDISK: incomplete write (3808 != 32768)
write error
VFS: Mounted root (ext2 filesystem) on device 1:0.
Freeing init memory: 108K
attempt to access beyond end of device
ram0: rw=0, want=65948, limit=65536
EXT2-fs error (device ram0): ext2_get_inode: unable to read inode block - inode=
8595, block=32973
attempt to access beyond end of device
/bin/sh: can't aram0: rw=0, want=65962, limit=65536
ccess tty; job cEXT2-fs error (device ram0): ext2_get_inode: ontrol turned ofuna
ble to read inode block - inode=8656, block=32980f

... more errors with 'attempt to access beyond...' follow..

I do finally get a bash (ash) prompt. However, none of the commands work.

My bootargs=
mem=96M console=ttyS0,115200n8 root=/dev/ram0 rw
initrd=0x82000000,34816K ip=off video=davincifb:vid0=720x567x16,2500K:vid1=720x5
76x16,2500K:osd0=720x576x16,2025K davinci_enc_mngr.ch0_output=COMPOSITE davinci_
enc_mngr.ch0_mode=davinci_enc_mngr.ch0_mode=ntsc v4l2_video_capture=device:MT9T0
31 vpfe_capture.interface=1

What could be the problem.

Thank you.

 

  • Do you solve the problem?I got  the same problem!

  • I don't remember exactly (it was some time ago). I reduced ramdisk size to 32MB by removing files I did not need. It may have to do with kernel configuration. When you configure kernel (make menuconfig) somewhere you can define the maximum ramdisk fs size if I remember. I think that might have been my problem as the default kernel configuration has 32Mbyte fs size.

    When making ramdisk image file I use:
    dd if=/dev/zero of=$DEST bs=1M count=32
    This makes the file to be 32MB exactly. When compressed it was around 12.5Mbyte.

    Hope this helps.

  • The kernel needs to know the uncompressed size of RAMDISK being used. You can check the same in your kernel configuration (.config). Look for a line containing CONFIG_BLK_DEV_RAM_SIZE e.g.:

    CONFIG_BLK_DEV_RAM_SIZE=16384

    The size of ramdisk can be smaller than the size specified here; but not bigger. If you are using u-boot, you may also need to change the location where the kernel and ramdisk are located.

    Do take a look at "Documentation/ramdisk.txt" in the Linux sources to get better understanding on RAMDISK. Much of the description is x86 biased; but the general concepts remain same.