[uClinux-dev] Initrd works only with ext2

David McCullough davidm at snapgear.com
Wed Oct 5 17:58:59 EDT 2005


Jivin Mpourtounis Dimitrios lays it down ...
> On Wed, 5 Oct 2005, David McCullough wrote:
> 
> > 
> > Jivin Mpourtounis Dimitrios lays it down ...
> > > 
> > > Hi,
> > > 
> > > I have been using initrd with kernel 2.4.26. The initrd image was ext2 
> > > filesystem and everything worked right.
> > > 
> > > I tried to switch to another filesystem (jffs2), but my kernel cannot 
> > > mount the root (Kernel panic: VFS: Unable to mount root fs on 01:00).
> > > 
> > > I tried to use other filesystems (minix for example), the same problem.
> > > 
> > > It seems that only ext2 can be mounted.
> > > 
> > > Has anybody come across this behaviour?
> > > 
> > > Kernel has jffs2,minix etc filesystems support.
> > 
> > The initrd support needs to be able to identify the filesystem and work
> > out some details.
> > 
> > romfs and cramfs are also supported.
> > 
> > Look in linux-2.4.x/init and you should be able to find the area if you
> > decide to support another FS,
> > 
> > Cheers,
> > Davidm
> >
> 
> Thank you!
> 
> Ok, now cramfs works. In fact I use squashfs now, seems working right. Not 
> very sure if I can rely on it (I came across it by accident). If anybody 
> has an opinion, please comment.
> 
> I am trying to reduce RAM and flash footprint, in order to make it work on 
> a 2/8 MB mips system. Until now Ihave been using kernel with the initrd 
> image compiled in (ext2). Now it is squash fs, memoty footprint is reduced 
> but unfortunately not enough. Maybe I should use a jffs filesystem on 
> flash, to reduce initrd size. Any thoughts appreciated of what (else) i 
> could do.

You can mount your cramfs from flash,  most of our systems do this.
Setup a MTD driver and put your cramfs filesystem into flash.

> The thing I want to ask, is:
> In order to upgrade my device, I used to transfer a firmware image via 
> ethernet to some deamon that rawwritted it to flash. In case of jffs, that 
> the deamon is running from flash, is it safe to umount the jffs partition 
> and raw-write? Will the deomon exit because its executable is umounted, or 
> as long as it is initilized in ram, it can do the trick?

It is possible,  we have done this with the "netflash" utility included
in the dist.  We definately do it with cramfs,  and althopught
technically it is very unsafe, as long as the working set of the
application is in RAM and it doesn't try and page/swap anything out
netflash wil lcomplete it's update to flash and reboot without any
problems.  I would recommend cramfs since thats what I have seen work
reliably,

Cheers,
Davidm

-- 
David McCullough, davidm at cyberguard.com.au, Custom Embedded Solutions + Security
Ph:+61 734352815 Fx:+61 738913630 http://www.uCdot.org http://www.cyberguard.com



More information about the uClinux-dev mailing list