LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Creating root file image into ramdisk (https://www.linuxquestions.org/questions/linux-general-1/creating-root-file-image-into-ramdisk-404045/)

shinobi59 01-16-2006 10:44 AM

Creating root file image into ramdisk
 
Trying to create a root file image that will load into a ram drive, using PXE BOOT and a tftp server. I am getting the following errors:

RAMDISK: Compressed image found at block 0
RAMDISK: incomplete write (-28 != 32768) 20971520
VFS: Mounted root (ext2 filesystem) readonly.
Freeing unused kernel memory: 140k freed
attempt to access beyond end of device
ram0: rw=0, want=98312, limit=40960
EXT2-fs error (device ram0): ext2_get_inode: unable to read inode block - inode=12289, block=49155
Warning: unable to open an initial console.
attempt to access beyond end of device
ram0: rw=0, want=46852, limit=40960
Buffer I/O error on device ram0, logical block 23425
attempt to access beyond end of device
ram0: rw=0, want=46852, limit=40960
Buffer I/O error on device ram0, logical block 23425
attempt to access beyond end of device
ram0: rw=0, want=65544, limit=40960
EXT2-fs error (device ram0): ext2_get_inode: unable to read inode block - inode=8193, block=32771
attempt to access beyond end of device
ram0: rw=0, want=46852, limit=40960
Buffer I/O error on device ram0, logical block 23425
Kernel panic - not syncing: No init found. Try passing init= option to kernel.


Anyone here done any embedded systems work?


Problem could be related to the /etc/rc.d/rc.sysinit file which I have not gone completely through yet. Anyone out there have an rc.sysinit built for RHEL 4.0 for a diskless system?


Thanks in advance. Any assistance appreciated.

ugenn 01-16-2006 10:48 AM

From the looks of it, it appears that your ramdisk is too small to fit the filesystem image. try using the ramdisk_size kernel parameter to change the allocation size.

shinobi59 01-16-2006 11:35 AM

ugenn ... thanks.

My last iteration I actually set the ramdisk_size parameter.

This was the error prior to setting the parameter:

RAMDISK: Compressed image found at block 0
RAMDISK: incomplete write (-28 != 32768) 16777216
VFS: Mounted root (ext2 filesystem) readonly.
Freeing unused kernel memory: 140k freed
attempt to access beyond end of device
ram0: rw=0, want=98312, limit=32768
EXT2-fs error (device ram0): ext2_get_inode: unable to read inode block - inode=12289, block=49155
Warning: unable to open an initial console.
attempt to access beyond end of device
ram0: rw=0, want=32776, limit=32768
EXT2-fs error (device ram0): ext2_get_inode: unable to read inode block - inode=4097, block=16387
attempt to access beyond end of device
ram0: rw=0, want=65544, limit=32768
EXT2-fs error (device ram0): ext2_get_inode: unable to read inode block - inode=8193, block=32771
Kernel panic - not syncing: No init found. Try passing init= option to kernel.


I then set the kernel parameter as follows:


ramdisk_size = 20480 (My understanding is that this is in k bytes).


This is the error after I set the parameter:

RAMDISK: Compressed image found at block 0
RAMDISK: incomplete write (-28 != 32768) 20971520
VFS: Mounted root (ext2 filesystem) readonly.
Freeing unused kernel memory: 140k freed
attempt to access beyond end of device
ram0: rw=0, want=98312, limit=40960
EXT2-fs error (device ram0): ext2_get_inode: unable to read inode block - inode=12289, block=49155
Warning: unable to open an initial console.
attempt to access beyond end of device
ram0: rw=0, want=46852, limit=40960
Buffer I/O error on device ram0, logical block 23425
attempt to access beyond end of device
ram0: rw=0, want=46852, limit=40960
Buffer I/O error on device ram0, logical block 23425
attempt to access beyond end of device
ram0: rw=0, want=65544, limit=40960
EXT2-fs error (device ram0): ext2_get_inode: unable to read inode block - inode=8193, block=32771
attempt to access beyond end of device
ram0: rw=0, want=46852, limit=40960
Buffer I/O error on device ram0, logical block 23425
Kernel panic - not syncing: No init found. Try passing init= option to kernel.

Is the ram disk still too small??


Just trying to get to a login prompt and then start trimming down the kernel and the file system as much as possible will be the goal.






Thanks.

ugenn 01-16-2006 12:01 PM

How big exactly did you create your rootfs image?

shinobi59 01-16-2006 01:19 PM

Ok. got it now.
 
ugenn,

There were multiple needs for space, so I totalled them up and created a ram disk larger than the total and it works fine now. Thanks.

SUBBU3881 11-23-2016 03:21 AM

How to rectify this issue.?
 
Quote:

Originally Posted by shinobi59 (Post 2051030)
ugenn,

There were multiple needs for space, so I totalled them up and created a ram disk larger than the total and it works fine now. Thanks.



Hi,

May I know the way you rectified this issue clearly.?

Thanks and Regards,
Siva Prakash Reddy

syg00 11-23-2016 06:46 AM

That was over 10 years ago - don't dig up dead threads.

mjolnir 11-23-2016 08:12 AM

@SUBBU3881 welcome to the forum. Not everyone here is as rude as the person at post 7, that said, the search tool is your friend.

jefro 11-23-2016 03:30 PM

SUBBU3881, welcome to LQ.

Let's not get sidetracked.

Yes, it is a 10 year old thread and only once in a while will you get a reply. Most likely things have changed.

I can't cut this post out of General but maybe someone else can.

SUBBU3881, might be best to post the entire problem on a new thread to make it more current if it doesn't get cut out of this thread.

syg00 posts some of the best replies to threads of any at LQ. I can assure you he was not trying to be rude.


All times are GMT -5. The time now is 10:33 AM.