LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-16-2006, 11:44 AM   #1
shinobi59
Member
 
Registered: Oct 2004
Posts: 55

Rep: Reputation: 15
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.
 
Old 01-16-2006, 11:48 AM   #2
ugenn
Member
 
Registered: Apr 2002
Posts: 549

Rep: Reputation: 30
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.
 
Old 01-16-2006, 12:35 PM   #3
shinobi59
Member
 
Registered: Oct 2004
Posts: 55

Original Poster
Rep: Reputation: 15
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.
 
Old 01-16-2006, 01:01 PM   #4
ugenn
Member
 
Registered: Apr 2002
Posts: 549

Rep: Reputation: 30
How big exactly did you create your rootfs image?
 
Old 01-16-2006, 02:19 PM   #5
shinobi59
Member
 
Registered: Oct 2004
Posts: 55

Original Poster
Rep: Reputation: 15
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.
 
Old 11-23-2016, 04:21 AM   #6
SUBBU3881
LQ Newbie
 
Registered: Sep 2016
Posts: 1

Rep: Reputation: Disabled
How to rectify this issue.?

Quote:
Originally Posted by shinobi59 View Post
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
 
Old 11-23-2016, 07:46 AM   #7
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 15,953

Rep: Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211
That was over 10 years ago - don't dig up dead threads.
 
Old 11-23-2016, 09:12 AM   #8
mjolnir
Member
 
Registered: Apr 2003
Posts: 750

Rep: Reputation: 83
@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.
 
Old 11-23-2016, 04:30 PM   #9
jefro
Moderator
 
Registered: Mar 2008
Posts: 17,101

Rep: Reputation: 2552Reputation: 2552Reputation: 2552Reputation: 2552Reputation: 2552Reputation: 2552Reputation: 2552Reputation: 2552Reputation: 2552Reputation: 2552Reputation: 2552
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
RAMDISK: couldn't find valid ramdisk image starting at 0. iotc247 Slackware 10 12-10-2010 04:08 PM
2 GB file limit when creating an image with mkisofs ccasares Linux - Newbie 5 12-26-2004 08:48 PM
creating a ramdisk runtime from another ramdisk code123 Linux From Scratch 0 10-11-2004 09:59 AM
creating a ramdisk nakkaya Linux - General 1 02-24-2003 05:41 AM
Creating ramdisk for directory tree. vaibhavk Linux - General 0 01-17-2002 12:29 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:30 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration