[uClinux-dev] Ram file system

Robert B. Williams rwilliams at valcom.com
Wed Aug 24 09:07:50 EDT 2005


Here are some printks I stuck in the code.

**RBW** rd_load_image()
**RBW** from --> /initrd.image
**RBW** sys_open("/dev/ram")
**RBW** sys_open(from)
Kernel panic - not syncing: VFS: Unable to mount root fs on
unknown-block(1,0)

rd_load_image(from) is called.
>From is passed in as initrd.image (string).  This sys_open(from) fails.

I am at a total loss.  Can I achieve my same efforts with initramfs?  I
notice that the kernel builds an initramfs before the user code is compiled.
Can I manually build initramfs image after words, say in my vendor makefile?
Is there a documented process for this?

Cheers

Robert Williams
5614 Hollins Road
Roanoke, VA USA 24019
www.valcom.com


-----Original Message-----
From: uclinux-dev-bounces at uclinux.org
[mailto:uclinux-dev-bounces at uclinux.org] On Behalf Of Philippe Petillon
Sent: Wednesday, August 24, 2005 4:11 AM
To: uClinux development list
Subject: RE: [uClinux-dev] Ram file system

Check you configured initrd support in block devices, and try a command-line
like this:
"Kernel command line: ram=64M initrd=0x70A00000,0x00400000 root=/dev/ram0
console=ttyS0,115200n8 keepinitrd"

-----Message d'origine-----
De : uclinux-dev-bounces at uclinux.org
[mailto:uclinux-dev-bounces at uclinux.org]De la part de Robert B. Williams
Envoye : mardi 23 aout 2005 22:00
A : 'uClinux development list'
Objet : RE: [uClinux-dev] Ram file system


Adding "initrd=addr,size" has made no difference.  uClinux still fails to
open "/initrd.image"



Robert Williams
5614 Hollins Road
Roanoke, VA USA 24019
www.valcom.com


-----Original Message-----
From: uclinux-dev-bounces at uclinux.org
[mailto:uclinux-dev-bounces at uclinux.org] On Behalf Of Philippe Petillon
Sent: Tuesday, August 23, 2005 11:39 AM
To: uClinux development list
Subject: RE: [uClinux-dev] Ram file system

Try using "initrd=addr,size" in your command line, where addr is the addr of
your ramdisk and size its size.

-----Message d'origine-----
De : uclinux-dev-bounces at uclinux.org
[mailto:uclinux-dev-bounces at uclinux.org]De la part de Robert B. Williams
Envoye : mardi 23 aout 2005 17:37
A : 'uClinux development list'
Objet : RE: [uClinux-dev] Ram file system


I've traced the initrd problem to the function
int __init rd_load_image(char *from) in /init/do_mounts_rd.c.

The following function call fails.
in_fd = sys_open(from, O_RDONLY, 0);  //where from = "/initrd.image"
Am I suppose to name my initrd image a specific way?  How would the kernel
even know where to look for this?  Does u-boot provide this information when
it loads the kernel and initrd?

Please help,


Robert Williams
5614 Hollins Road
Roanoke, VA USA 24019
www.valcom.com


-----Original Message-----
From: uclinux-dev-bounces at uclinux.org
[mailto:uclinux-dev-bounces at uclinux.org] On Behalf Of Greg Ungerer
Sent: Monday, August 22, 2005 8:09 PM
To: uClinux development list
Subject: Re: [uClinux-dev] Ram file system

Hi Robert,

Robert B. Williams wrote:
> To this point I have used romfs as my root file system.  I am trying to
> set up a read/write file system in ram.  I could not find enough
> information to get initramfs to work though I made a little headway I
> think.  Anyway, I am trying to get the old initrd to work with kernel
> 2.6.x  from uClinux-dist-test-20050808.  I am using a coldfire 5272.  I
> pass the following boot parameters in via the Kernel Hacking:
> root=/dev/ram rw init=/linuxrc.

Do you really have a /dev/ram device node?
Typically you would use /dev/ram0.

Regards
Greg



> I created the initrd image from the romfs directories with the following
> script:
>
>
>
> mkdir -p $(ROOTDIR)/initrd
>
> dd if=/dev/zero of=$(IMAGEDIR)/initrd.bin bs=4k count=4096
>
> sudo /sbin/mke2fs -F -v -m0 $(IMAGEDIR)/initrd.bin
>
> sudo mount -o loop $(IMAGEDIR)/initrd.bin $(ROOTDIR)/initrd
>
> sudo cp -av $(ROMFSDIR)/* $(ROOTDIR)/initrd
>
> sudo umount $(ROOTDIR)/initrd
>
> gzip -f -9 $(IMAGEDIR)/initrd.bin
>
>
>
> I am using u-boot to pass the image as a multipack:
>
>
>
>             mkimage -A m68k -O linux -T multi -C gzip -a 0x20000 -e
> 0x20000 \
>
>             -d $(IMAGEDIR)/image.bin.gz:$(IMAGEDIR)/initrd.bin.gz
> $(IMAGEDIR)/image.pkg;
>
>
>
> Finally, I am getting the following boot error:
>
>
>
> .
>
> Kernel command line: root=/dev/ram rw init=/linuxrc
>
> .
>
> RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
>
> .
>
> Kernel panic - not syncing: VFS: Unable to mount root fs on
> unknown-block(1,0)
>
>
>
> Any help would be appreciated.  Alternatively, I would use the initramfs
> if I can find some documentation on it.  I want to build the image
> myself so that it is independent of the kernel.  Any ideas on how to
> build the initramfs image?  What needs to be in it?
>
>
>
> Also, in the case of initrd and initramfs is it absolutely necessary
> that I pivot the root?  The kernel and file system the first runs is all
> I need.  I am hoping I don't have too.  I just haven't gotten far enough
> yet to know.
>
>
>
> Cheers,
>
>
>
> Robert Williams
>
> 5614 Hollins Road
>
> Roanoke, VA USA 24019
>
> www.valcom.com
>
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> uClinux-dev mailing list
> uClinux-dev at uclinux.org
> http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
> This message was resent by uclinux-dev at uclinux.org

--
------------------------------------------------------------------------
Greg Ungerer  --  Chief Software Dude       EMAIL:     gerg at snapgear.com
SnapGear -- a CyberGuard Company            PHONE:       +61 7 3435 2888
825 Stanley St,                             FAX:         +61 7 3891 3630
Woolloongabba, QLD, 4102, Australia         WEB: http://www.SnapGear.com
_______________________________________________
uClinux-dev mailing list
uClinux-dev at uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev at uclinux.org

_______________________________________________
uClinux-dev mailing list
uClinux-dev at uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev at uclinux.org

_______________________________________________
uClinux-dev mailing list
uClinux-dev at uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev at uclinux.org

_______________________________________________
uClinux-dev mailing list
uClinux-dev at uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev at uclinux.org

_______________________________________________
uClinux-dev mailing list
uClinux-dev at uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev at uclinux.org




More information about the uClinux-dev mailing list