[Peeweelinux] Re: [Peeweelinux ] rootfilesystem isn't free after flushing to ramdisk

correy [email protected]
Thu, 24 Jul 2003 10:30:35 +1000


--------------090509000400020407030907
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

Hi there I changed my lilo configuration to use the /dev/ram2


image=/mnt/cf1/bzImage
       label=bzImage
       ramdisk=9556
       root=/dev/ram2
       read-only

The error I get is this
=====================
/dev/ram2: No sapce left on device
19113+0 records in
19112+0 records out
Flushing buffers to disk....
tcsetpgrp: Inappropriate ioctl for device
VFS: Mounted root (ext2 filesystem) readonly
Trying to move old root to /initrd ... failed
Unmounting old root
Trying to free ramdisk memory .... okay
Freeing unused kernel memory: 200k freed
attempt to access beyond end of device
01:02: rw=0, want=49158, limit=9556
EXT2-fs error (device ramdisk(1,2)): ext2_read_inode: unable to read inode blod - inode=12001,block49157
Warning: unable to open an initial console
attempt to access beyond end of device
01:02: rw=0, want=57351, limit=9556
EXT2-fs error (device ramdisk(1,2)): ext2_read_inode: unable to read inode block - inode=14011, block=57350
Kernel panic: No init found. Try passing int= option to kernel.
========================

I then changed ramdisk=57351 however it just took longer to flush and I still got /dev/ram2: No space left on device.

The reason I need to be able to do this is that I want to be able to save the image of the cf card as a tar.gz file and then simply copy it across to the appropriate partion and then chroot to this filesystem type lilo and then reboot the system. I no longer have the pwl project that I used to create the fielsystem either. Surely there is something simple that I am missing here??

Correy



>I ALSO discovered, in that same directory, the "linuxrc" file
>that the make-target scripts often talk about.  And the
>contents of that file are interesting:
>
>  echo "Copying filesystem /dev/hda2 to /dev/ram2...."
>  dd if=/dev/hda2 of=/dev/ram2
>  echo "Flushing buffers to disk...."
>  sync
>
>I said the other day this was built into the kernel--apparently
>not!  I am still trying to figure out how this script gets
>run before the real init is started.
>
>Anyway, the root line in my lilo.conf reads like this:
>
>  root      = /dev/ram2 
>
>also:
>
> ramdisk   = 9556
> 
>I can't be sure this is the answer for you, because none of the
>lilo.conf files you have posted (including the "before" example)
>show it this way.  But you can try it.   The number after "ramdisk"
>is the amount of memory needed to copy the ramdisk to.  It can be
>larger then needed.
>
>I would have to ask: Which of the target configurations did 
>you use?  Are you not using peeweelinux to generate your
>targets anymore?  Why not?  Do you need something they don't
>do?  Once you set out on your own you will find you have 
>to understand almost everything...
>
>Barry
>
>=====================================================================
>  
>
>>I ALSO discovered, in that same directory, the "linuxrc" file
>>that the make-target scripts often talk about.  And the
>>contents of that file are interesting:
>>
>>  echo "Copying filesystem /dev/hda2 to /dev/ram2...."
>>  dd if=/dev/hda2 of=/dev/ram2
>>  echo "Flushing buffers to disk...."
>>  sync
>>
>>I said the other day this was built into the kernel--apparently
>>not!  I am still trying to figure out how this script gets
>>run before the real init is started.
>>    
>>
>
>The linuxrc file is part of the initrd mechanism. A really good 
>description of the initrd mechanism in in the kernel Documentation, 
>typically: /usr/src/linux/Documentation/initrd.txt
>
>Adi
>
>
>
>
>correy wrote:
>  
>
>>Hi Troy
>>
>>Sorry for sending this email directly to you but it is just I bet you 
>>would know the answer straight away. I sent it to the pwl mailing as well.
>>
>>My root filesystem isn't unmounted after the bootup. It use to free 
>>itself before I changed the kernel using lilo. So the script that sets 
>>up lilo in the PeeWeeLinux install program must be doing something 
>>different in the way
>>that it configures lilo I think.
>>
>>Below is my lilo file that works. Perhaps my new kernel has something to 
>>do with it however everything seems to work
>>fine apart from this.
>>
>>Can you see anything wrong for example should I be telling root that it 
>>is at /dev/hdc2 or should I be telling it that
>>it is in the ramdisk where the compact flash partition now resides after 
>>the boot sequence.
>>
>>________________________
>>boot=/dev/hdc
>>disk=/dev/hdc
>>       bios=0x80
>>
>>linear
>>map=/mnt/cf1/map
>>install=/mnt/cf1/boot.b
>>prompt
>>timeout=50
>>initrd=/mnt/cf1/initrd
>>default=bzImage
>>
>>image=/mnt/cf1/bzImage
>>       label=bzImage
>>       root=/dev/hdc2
>>       read-only
>>-----------------------
>>
>>Any help is welcome
>>
>>Many thanks
>>
>>Correy
>>
>>
>>
>>    
>>
>
>  
>


--------------090509000400020407030907
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <title></title>
</head>
<body>
Hi there I changed my lilo configuration to use the /dev/ram2<br>
<pre wrap="">

image=/mnt/cf1/bzImage
       label=bzImage
       ramdisk=9556
       root=/dev/ram2
       read-only

The error I get is this
=====================
/dev/ram2: No sapce left on device
19113+0 records in
19112+0 records out
Flushing buffers to disk....
tcsetpgrp: Inappropriate ioctl for device
VFS: Mounted root (ext2 filesystem) readonly
Trying to move old root to /initrd ... failed
Unmounting old root
Trying to free ramdisk memory .... okay
Freeing unused kernel memory: 200k freed
attempt to access beyond end of device
01:02: rw=0, want=49158, limit=9556
EXT2-fs error (device ramdisk(1,2)): ext2_read_inode: unable to read inode blod - inode=12001,block49157
Warning: unable to open an initial console
attempt to access beyond end of device
01:02: rw=0, want=57351, limit=9556
EXT2-fs error (device ramdisk(1,2)): ext2_read_inode: unable to read inode block - inode=14011, block=57350
Kernel panic: No init found. Try passing int= option to kernel.
========================

I then changed ramdisk=57351 however it just took longer to flush and I still got /dev/ram2: No space left on device.

The reason I need to be able to do this is that I want to be able to save the image of the cf card as a tar.gz file and then simply copy it across to the appropriate partion and then chroot to this filesystem type lilo and then reboot the system. I no longer have the pwl project that I used to create the fielsystem either. Surely there is something simple that I am missing here??

Correy

</pre>
<br>
<blockquote type="cite"
 cite="mid2AA4A15C835A1C49B9CF61F4490BB6EB45D837@bneprdmsg01.internal.qr.com.au">
  <pre wrap="">I ALSO discovered, in that same directory, the "linuxrc" file
that the make-target scripts often talk about.  And the
contents of that file are interesting:

  echo "Copying filesystem /dev/hda2 to /dev/ram2...."
  dd if=/dev/hda2 of=/dev/ram2
  echo "Flushing buffers to disk...."
  sync

I said the other day this was built into the kernel--apparently
not!  I am still trying to figure out how this script gets
run before the real init is started.

Anyway, the root line in my lilo.conf reads like this:

  root      = /dev/ram2 

also:

 ramdisk   = 9556
 
I can't be sure this is the answer for you, because none of the
lilo.conf files you have posted (including the "before" example)
show it this way.  But you can try it.   The number after "ramdisk"
is the amount of memory needed to copy the ramdisk to.  It can be
larger then needed.

I would have to ask: Which of the target configurations did 
you use?  Are you not using peeweelinux to generate your
targets anymore?  Why not?  Do you need something they don't
do?  Once you set out on your own you will find you have 
to understand almost everything...

Barry

=====================================================================
  </pre>
  <blockquote type="cite">
    <pre wrap="">I ALSO discovered, in that same directory, the "linuxrc" file
that the make-target scripts often talk about.  And the
contents of that file are interesting:

  echo "Copying filesystem /dev/hda2 to /dev/ram2...."
  dd if=/dev/hda2 of=/dev/ram2
  echo "Flushing buffers to disk...."
  sync

I said the other day this was built into the kernel--apparently
not!  I am still trying to figure out how this script gets
run before the real init is started.
    </pre>
  </blockquote>
  <pre wrap=""><!---->
The linuxrc file is part of the initrd mechanism. A really good 
description of the initrd mechanism in in the kernel Documentation, 
typically: /usr/src/linux/Documentation/initrd.txt

Adi




correy wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">Hi Troy

Sorry for sending this email directly to you but it is just I bet you 
would know the answer straight away. I sent it to the pwl mailing as well.

My root filesystem isn't unmounted after the bootup. It use to free 
itself before I changed the kernel using lilo. So the script that sets 
up lilo in the PeeWeeLinux install program must be doing something 
different in the way
that it configures lilo I think.

Below is my lilo file that works. Perhaps my new kernel has something to 
do with it however everything seems to work
fine apart from this.

Can you see anything wrong for example should I be telling root that it 
is at /dev/hdc2 or should I be telling it that
it is in the ramdisk where the compact flash partition now resides after 
the boot sequence.

________________________
boot=/dev/hdc
disk=/dev/hdc
       bios=0x80

linear
map=/mnt/cf1/map
install=/mnt/cf1/boot.b
prompt
timeout=50
initrd=/mnt/cf1/initrd
default=bzImage

image=/mnt/cf1/bzImage
       label=bzImage
       root=/dev/hdc2
       read-only
-----------------------

Any help is welcome

Many thanks

Correy



    </pre>
  </blockquote>
  <pre wrap=""><!---->
  </pre>
</blockquote>
<br>
</body>
</html>

--------------090509000400020407030907--