LinuxQuestions.org
Register a domain and help support LQ
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, 10:44 AM   #1
shinobi59
Member
 
Registered: Oct 2004
Posts: 53

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, 10: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, 11:35 AM   #3
shinobi59
Member
 
Registered: Oct 2004
Posts: 53

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, 12: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, 01:19 PM   #5
shinobi59
Member
 
Registered: Oct 2004
Posts: 53

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.
 
  


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 03:08 PM
2 GB file limit when creating an image with mkisofs ccasares Linux - Newbie 5 12-26-2004 07:48 PM
creating a ramdisk runtime from another ramdisk code123 Linux From Scratch 0 10-11-2004 08:59 AM
creating a ramdisk nakkaya Linux - General 1 02-24-2003 04:41 AM
Creating ramdisk for directory tree. vaibhavk Linux - General 0 01-16-2002 11:29 PM


All times are GMT -5. The time now is 01:07 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration