[U-Boot] ubifsmount reports "Error reading superblock", but linux can mount FS

Wolfgang Denk wd at denx.de
Fri Mar 9 15:02:16 CET 2012


Dear Alex,

In message <CANNiwJKREXiOBfiA_1v_-QGMoV_A59Ce0ADcVfK1xLMFkReFgw at mail.gmail.com> you wrote:
>
> > Can you please try out and test what happens when you increase the
> > size of the malloc arena?  "include/configs/openrd.h" includes
> > "include/configs/mv-common.h" which sets CONFIG_SYS_MALLOC_LEN to
> > 1 MiB - try changing it to 4 MiB.
> 
> Thanks Wolfgang, that worked!  Is there any reason why you would not
> set this variable to the maximum possible. ...

Define "maximum possible".  The more memory we reserve here, the less
will be available for loading Linux and root filesystem images and
such.  So it's always a compromize: make it as big as needed, but not
(much) bigger.

>                                        ...  For example, is this
> memory available to the kernel after it is booted?  ...

When the kernel boots, all of U-Boot is gone. The kernel has no idea
of how U-Boot used the memory; all such information is gone, too.

>                                                ...  How do you know
> how big this might need to be in order to mount a filesystem that
> "needs recovery"?

I don't know of ways to determine this in advance.  Eventually all we
can do is thry what you did: increase the malloc arena when it turns
out to be too small.

If you are willing to invest a little more time, it would be
interesting to test how much memory is actually needed on your system.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
In the realm of scientific observation, luck is granted only to those
who are prepared.                                     - Louis Pasteur


More information about the U-Boot mailing list